@veloceapps/api 8.0.0-9 → 8.0.0-91

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 (61) hide show
  1. package/esm2020/index.mjs +8 -2
  2. package/esm2020/lib/api.module.mjs +24 -6
  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/flows-api.service.mjs +6 -7
  17. package/esm2020/lib/services/guided-sellings-admin-api.service.mjs +3 -3
  18. package/esm2020/lib/services/guided-sellings-api.service.mjs +3 -3
  19. package/esm2020/lib/services/offers-api.service.mjs +3 -3
  20. package/esm2020/lib/services/org-info-api.service.mjs +3 -3
  21. package/esm2020/lib/services/picklists-api.service.mjs +3 -3
  22. package/esm2020/lib/services/portals-api.service.mjs +76 -0
  23. package/esm2020/lib/services/price-api.service.mjs +3 -3
  24. package/esm2020/lib/services/procedures-api.service.mjs +3 -3
  25. package/esm2020/lib/services/product-api.service.mjs +3 -3
  26. package/esm2020/lib/services/product-model-api.service.mjs +3 -3
  27. package/esm2020/lib/services/promotions-api.service.mjs +68 -0
  28. package/esm2020/lib/services/quote-api.service.mjs +3 -3
  29. package/esm2020/lib/services/ramp-api.service.mjs +3 -3
  30. package/esm2020/lib/services/rebate-program-api.service.mjs +20 -4
  31. package/esm2020/lib/services/rebate-type-api.service.mjs +68 -0
  32. package/esm2020/lib/services/rule-groups-api.service.mjs +3 -3
  33. package/esm2020/lib/services/rules-api.service.mjs +20 -7
  34. package/esm2020/lib/services/salesforce-api.service.mjs +6 -4
  35. package/esm2020/lib/services/scripts-api.service.mjs +3 -3
  36. package/esm2020/lib/services/shopping-cart-settings-api.service.mjs +3 -3
  37. package/esm2020/lib/services/stateful-configuration-api.mjs +3 -3
  38. package/esm2020/lib/services/ui-definitions-api.service.mjs +3 -3
  39. package/esm2020/lib/services/ui-templates-api.service.mjs +3 -3
  40. package/esm2020/lib/services/veloce-objects-api.service.mjs +14 -4
  41. package/esm2020/lib/types/auth.types.mjs +2 -0
  42. package/esm2020/lib/types/index.mjs +2 -1
  43. package/fesm2015/veloceapps-api.mjs +492 -143
  44. package/fesm2015/veloceapps-api.mjs.map +1 -1
  45. package/fesm2020/veloceapps-api.mjs +497 -142
  46. package/fesm2020/veloceapps-api.mjs.map +1 -1
  47. package/index.d.ts +7 -1
  48. package/lib/services/auth.service.d.ts +11 -0
  49. package/lib/services/configuration-api.service.d.ts +5 -0
  50. package/lib/services/configuration-processors-api.service.d.ts +14 -0
  51. package/lib/services/contracted-price-api.service.d.ts +16 -0
  52. package/lib/services/portals-api.service.d.ts +20 -0
  53. package/lib/services/promotions-api.service.d.ts +19 -0
  54. package/lib/services/rebate-program-api.service.d.ts +4 -1
  55. package/lib/services/rebate-type-api.service.d.ts +19 -0
  56. package/lib/services/rules-api.service.d.ts +2 -1
  57. package/lib/services/salesforce-api.service.d.ts +1 -1
  58. package/lib/services/veloce-objects-api.service.d.ts +2 -1
  59. package/lib/types/auth.types.d.ts +4 -0
  60. package/lib/types/index.d.ts +1 -0
  61. 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,16 @@ 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: [{
395
424
  type: Injectable
396
425
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
397
426
 
@@ -464,9 +493,9 @@ class ConfigurationSettingsApiService {
464
493
  return this.httpService.api(Object.assign({ method: 'get', url: '/cache/evict/' + name }, options));
465
494
  }
466
495
  }
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: [{
496
+ 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 });
497
+ ConfigurationSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService });
498
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService, decorators: [{
470
499
  type: Injectable
471
500
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i2.MessageService }]; } });
472
501
 
@@ -486,9 +515,50 @@ class ContextApiService {
486
515
  });
487
516
  }
488
517
  }
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: [{
518
+ ContextApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
519
+ ContextApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextApiService });
520
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextApiService, decorators: [{
521
+ type: Injectable
522
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
523
+
524
+ class ContractedPriceApiService {
525
+ constructor(baseHttpService) {
526
+ this.baseHttpService = baseHttpService;
527
+ this.serviceUrl = '/admin/contracted-price';
528
+ this.fetchContractedPrices$ = () => {
529
+ return this.baseHttpService.api({ url: `${this.serviceUrl}` });
530
+ };
531
+ this.fetchContractedPrice$ = (id) => {
532
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
533
+ };
534
+ this.createContractedPrice$ = (data) => {
535
+ return this.baseHttpService.api({
536
+ url: `${this.serviceUrl}`,
537
+ method: 'put',
538
+ body: data,
539
+ });
540
+ };
541
+ this.updateContractedPrice$ = (data) => {
542
+ return this.baseHttpService.api({
543
+ url: `${this.serviceUrl}/${data.id}`,
544
+ method: 'put',
545
+ body: data,
546
+ });
547
+ };
548
+ this.searchContractedPrices$ = (searchParams, expression) => {
549
+ const params = new HttpParams({ fromObject: Object.assign({}, searchParams) });
550
+ return this.baseHttpService.api({
551
+ method: 'post',
552
+ url: `${this.serviceUrl}/search`,
553
+ params,
554
+ body: expression || {},
555
+ });
556
+ };
557
+ }
558
+ }
559
+ ContractedPriceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContractedPriceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
560
+ ContractedPriceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContractedPriceApiService });
561
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContractedPriceApiService, decorators: [{
492
562
  type: Injectable
493
563
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
494
564
 
@@ -506,9 +576,9 @@ class DeltaApiService {
506
576
  });
507
577
  }
508
578
  }
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: [{
579
+ DeltaApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeltaApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
580
+ DeltaApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeltaApiService });
581
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeltaApiService, decorators: [{
512
582
  type: Injectable
513
583
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
514
584
 
@@ -568,9 +638,9 @@ class DocumentAttachmentApiService {
568
638
  });
569
639
  }
570
640
  }
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: [{
641
+ 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 });
642
+ DocumentAttachmentApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentAttachmentApiService });
643
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentAttachmentApiService, decorators: [{
574
644
  type: Injectable
575
645
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i1.FileDownloadService }]; } });
576
646
 
@@ -612,6 +682,8 @@ class SalesforceApiService {
612
682
  return this.httpService.api(Object.assign({ method: 'post', url: methodUrl, body: fields }, options));
613
683
  }
614
684
  apexGetRequest(path, params, options) {
685
+ // this line is needed because HttpParams instance from Integration behaves wrong in studio instance of Angular
686
+ // const httpParams = new HttpParams({ fromString: params.toString() });
615
687
  return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/apex${path}`, params }, options));
616
688
  }
617
689
  apexPostRequest(path, body, options) {
@@ -630,9 +702,9 @@ class SalesforceApiService {
630
702
  });
631
703
  }
632
704
  }
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: [{
705
+ SalesforceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
706
+ SalesforceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService });
707
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, decorators: [{
636
708
  type: Injectable
637
709
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
638
710
 
@@ -884,11 +956,11 @@ class DocumentTemplatesApiService {
884
956
  return forkJoin(attachmentIds.map(id => this.documentAttachmentService.getAttachmentFile(id, true)));
885
957
  }
886
958
  queryObject({ objectName, resultObjectName, fields, statement }, { properties }) {
887
- var _a;
959
+ var _a, _b;
888
960
  const patternLimit = /(\s*limit\s\d*)/i;
889
961
  let limit = 1;
890
962
  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();
963
+ 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
964
  if (limitStr) {
893
965
  limit = Number.parseInt(limitStr, 10);
894
966
  }
@@ -901,11 +973,11 @@ class DocumentTemplatesApiService {
901
973
  return this.salesforceApiService.query(searchRequest, objectName).pipe(this.mapSfQueryResult(limit), map(value => ({ [resultObjectName]: value })));
902
974
  }
903
975
  }
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: [{
976
+ 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 });
977
+ DocumentTemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentTemplatesApiService });
978
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentTemplatesApiService, decorators: [{
907
979
  type: Injectable
908
- }], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: SalesforceApiService }, { type: i1.FileDownloadService }, { type: DocumentAttachmentApiService }, { type: i4.HttpClient }]; } });
980
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: SalesforceApiService }, { type: i1.FileDownloadService }, { type: DocumentAttachmentApiService }, { type: i1$1.HttpClient }]; } });
909
981
 
910
982
  class EndpointsApiService {
911
983
  constructor(baseHttpService) {
@@ -976,9 +1048,9 @@ class EndpointsApiService {
976
1048
  });
977
1049
  }
978
1050
  }
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: [{
1051
+ EndpointsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1052
+ EndpointsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsApiService });
1053
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsApiService, decorators: [{
982
1054
  type: Injectable
983
1055
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
984
1056
 
@@ -991,14 +1063,12 @@ class FlowsApiService {
991
1063
  return this.fetchFlows().pipe(map(flows => flows.find(flow => flow.id == id)));
992
1064
  }
993
1065
  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) : [])));
1066
+ 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
1067
  }
998
1068
  }
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: [{
1069
+ FlowsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1070
+ FlowsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService });
1071
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, decorators: [{
1002
1072
  type: Injectable
1003
1073
  }], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
1004
1074
 
@@ -1057,9 +1127,9 @@ class GuidedSellingsAdminApiService {
1057
1127
  }
1058
1128
  }
1059
1129
  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: [{
1130
+ GuidedSellingsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1131
+ GuidedSellingsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingsAdminApiService });
1132
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingsAdminApiService, decorators: [{
1063
1133
  type: Injectable
1064
1134
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1065
1135
 
@@ -1089,9 +1159,9 @@ class GuidedSellingApiService {
1089
1159
  });
1090
1160
  }
1091
1161
  }
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: [{
1162
+ GuidedSellingApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1163
+ GuidedSellingApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingApiService });
1164
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingApiService, decorators: [{
1095
1165
  type: Injectable
1096
1166
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1097
1167
 
@@ -1160,9 +1230,9 @@ class OffersApiService {
1160
1230
  }
1161
1231
  }
1162
1232
  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: [{
1233
+ OffersApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OffersApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1234
+ OffersApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OffersApiService });
1235
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OffersApiService, decorators: [{
1166
1236
  type: Injectable
1167
1237
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1168
1238
 
@@ -1177,11 +1247,11 @@ class OrgInfoApiService {
1177
1247
  return this.http.get(`${this.hostUrl}/org-info/${organizationId}`);
1178
1248
  }
1179
1249
  }
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: [{
1250
+ 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 });
1251
+ OrgInfoApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService });
1252
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService, decorators: [{
1183
1253
  type: Injectable
1184
- }], ctorParameters: function () { return [{ type: i4.HttpClient }]; } });
1254
+ }], ctorParameters: function () { return [{ type: i1$1.HttpClient }]; } });
1185
1255
 
1186
1256
  class PicklistsApiService {
1187
1257
  constructor(baseHttpService) {
@@ -1212,9 +1282,9 @@ class PicklistsApiService {
1212
1282
  };
1213
1283
  }
1214
1284
  }
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: [{
1285
+ PicklistsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1286
+ PicklistsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService });
1287
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService, decorators: [{
1218
1288
  type: Injectable
1219
1289
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1220
1290
 
@@ -1272,9 +1342,9 @@ class PriceApiService {
1272
1342
  });
1273
1343
  }
1274
1344
  }
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: [{
1345
+ PriceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PriceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1346
+ PriceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PriceApiService });
1347
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PriceApiService, decorators: [{
1278
1348
  type: Injectable
1279
1349
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1280
1350
 
@@ -1366,9 +1436,9 @@ class ProceduresApiService {
1366
1436
  });
1367
1437
  }
1368
1438
  }
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: [{
1439
+ ProceduresApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1440
+ ProceduresApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService });
1441
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService, decorators: [{
1372
1442
  type: Injectable
1373
1443
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1374
1444
 
@@ -1514,9 +1584,9 @@ class ProductApiService {
1514
1584
  return `${this.serviceUrl}/${productId}/image`;
1515
1585
  }
1516
1586
  }
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: [{
1587
+ ProductApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1588
+ ProductApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService });
1589
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService, decorators: [{
1520
1590
  type: Injectable
1521
1591
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1522
1592
 
@@ -1745,9 +1815,72 @@ class ProductModelApiService {
1745
1815
  }
1746
1816
  }
1747
1817
  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: [{
1818
+ ProductModelApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModelApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1819
+ ProductModelApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModelApiService });
1820
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModelApiService, decorators: [{
1821
+ type: Injectable
1822
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1823
+
1824
+ class PromotionsApiService {
1825
+ constructor(baseHttpService) {
1826
+ this.baseHttpService = baseHttpService;
1827
+ this.serviceUrl = '/admin/promotion';
1828
+ this.fetchAll$ = () => {
1829
+ return this.baseHttpService.api({ url: this.serviceUrl });
1830
+ };
1831
+ this.fetchOne$ = (id) => {
1832
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
1833
+ };
1834
+ this.remove$ = (id) => {
1835
+ return this.baseHttpService.api({
1836
+ url: `${this.serviceUrl}/${id}`,
1837
+ method: 'delete',
1838
+ });
1839
+ };
1840
+ this.restore$ = (id) => {
1841
+ return this.baseHttpService.api({
1842
+ method: 'patch',
1843
+ url: `${this.serviceUrl}/${id}/restore`,
1844
+ });
1845
+ };
1846
+ this.duplicate$ = (body) => {
1847
+ return this.baseHttpService
1848
+ .api({
1849
+ url: `${this.serviceUrl}/${body.id}/clone`,
1850
+ method: 'post',
1851
+ body,
1852
+ })
1853
+ .pipe(map$1(response => response.clonedRecordId));
1854
+ };
1855
+ }
1856
+ search$(expression, skip, count) {
1857
+ let params = new HttpParams();
1858
+ if (typeof skip === 'number') {
1859
+ params = params.set('skip', '' + skip);
1860
+ }
1861
+ if (typeof count === 'number') {
1862
+ params = params.set('count', '' + count);
1863
+ }
1864
+ return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
1865
+ }
1866
+ create$(body) {
1867
+ return this.baseHttpService.api({
1868
+ url: `${this.serviceUrl}`,
1869
+ method: 'post',
1870
+ body,
1871
+ });
1872
+ }
1873
+ update$(body) {
1874
+ return this.baseHttpService.api({
1875
+ url: `${this.serviceUrl}/${body.id}`,
1876
+ method: 'put',
1877
+ body,
1878
+ });
1879
+ }
1880
+ }
1881
+ PromotionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1882
+ PromotionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService });
1883
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService, decorators: [{
1751
1884
  type: Injectable
1752
1885
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1753
1886
 
@@ -1783,9 +1916,9 @@ class QuoteApiService {
1783
1916
  });
1784
1917
  }
1785
1918
  }
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: [{
1919
+ QuoteApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1920
+ QuoteApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService });
1921
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService, decorators: [{
1789
1922
  type: Injectable
1790
1923
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1791
1924
 
@@ -1801,9 +1934,135 @@ class RampApiService {
1801
1934
  return this.httpService.api(Object.assign({ method: 'post', url: `${this.SERVICE_URL}/renew`, body: request }, options));
1802
1935
  }
1803
1936
  }
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: [{
1937
+ RampApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RampApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1938
+ RampApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RampApiService });
1939
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RampApiService, decorators: [{
1940
+ type: Injectable
1941
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1942
+
1943
+ class RebateProgramApiService {
1944
+ constructor(baseHttpService) {
1945
+ this.baseHttpService = baseHttpService;
1946
+ this.serviceUrl = '/admin/rebate-program';
1947
+ this.fetchAll$ = () => {
1948
+ return this.baseHttpService.api({ url: this.serviceUrl });
1949
+ };
1950
+ this.fetchOne$ = (id) => {
1951
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
1952
+ };
1953
+ this.remove$ = (id) => {
1954
+ return this.baseHttpService.api({
1955
+ url: `${this.serviceUrl}/${id}`,
1956
+ method: 'delete',
1957
+ });
1958
+ };
1959
+ this.restore$ = (id) => {
1960
+ return this.baseHttpService.api({
1961
+ method: 'patch',
1962
+ url: `${this.serviceUrl}/${id}/restore`,
1963
+ });
1964
+ };
1965
+ this.duplicate$ = (body) => {
1966
+ return this.baseHttpService
1967
+ .api({
1968
+ url: `${this.serviceUrl}/${body.id}/clone`,
1969
+ method: 'post',
1970
+ body,
1971
+ })
1972
+ .pipe(map$1(response => response.clonedRecordId));
1973
+ };
1974
+ }
1975
+ search$(expression, skip, count) {
1976
+ let params = new HttpParams();
1977
+ if (typeof skip === 'number') {
1978
+ params = params.set('skip', '' + skip);
1979
+ }
1980
+ if (typeof count === 'number') {
1981
+ params = params.set('count', '' + count);
1982
+ }
1983
+ return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
1984
+ }
1985
+ create$(body) {
1986
+ return this.baseHttpService.api({
1987
+ url: `${this.serviceUrl}`,
1988
+ method: 'post',
1989
+ body,
1990
+ });
1991
+ }
1992
+ update$(body) {
1993
+ return this.baseHttpService.api({
1994
+ url: `${this.serviceUrl}/${body.id}`,
1995
+ method: 'put',
1996
+ body,
1997
+ });
1998
+ }
1999
+ }
2000
+ RebateProgramApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2001
+ RebateProgramApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService });
2002
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, decorators: [{
2003
+ type: Injectable
2004
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2005
+
2006
+ class RebateTypeApiService {
2007
+ constructor(baseHttpService) {
2008
+ this.baseHttpService = baseHttpService;
2009
+ this.serviceUrl = '/admin/rebate-type';
2010
+ this.fetchAll$ = () => {
2011
+ return this.baseHttpService.api({ url: this.serviceUrl });
2012
+ };
2013
+ this.fetchOne$ = (id) => {
2014
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
2015
+ };
2016
+ this.remove$ = (id) => {
2017
+ return this.baseHttpService.api({
2018
+ url: `${this.serviceUrl}/${id}`,
2019
+ method: 'delete',
2020
+ });
2021
+ };
2022
+ this.restore$ = (id) => {
2023
+ return this.baseHttpService.api({
2024
+ method: 'patch',
2025
+ url: `${this.serviceUrl}/${id}/restore`,
2026
+ });
2027
+ };
2028
+ this.duplicate$ = (body) => {
2029
+ return this.baseHttpService
2030
+ .api({
2031
+ url: `${this.serviceUrl}/${body.id}/clone`,
2032
+ method: 'post',
2033
+ body,
2034
+ })
2035
+ .pipe(map$1(response => response.clonedRecordId));
2036
+ };
2037
+ }
2038
+ search$(expression, skip, count) {
2039
+ let params = new HttpParams();
2040
+ if (typeof skip === 'number') {
2041
+ params = params.set('skip', '' + skip);
2042
+ }
2043
+ if (typeof count === 'number') {
2044
+ params = params.set('count', '' + count);
2045
+ }
2046
+ return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
2047
+ }
2048
+ create$(body) {
2049
+ return this.baseHttpService.api({
2050
+ url: `${this.serviceUrl}`,
2051
+ method: 'post',
2052
+ body,
2053
+ });
2054
+ }
2055
+ update$(body) {
2056
+ return this.baseHttpService.api({
2057
+ url: `${this.serviceUrl}/${body.id}`,
2058
+ method: 'put',
2059
+ body,
2060
+ });
2061
+ }
2062
+ }
2063
+ RebateTypeApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2064
+ RebateTypeApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService });
2065
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, decorators: [{
1807
2066
  type: Injectable
1808
2067
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1809
2068
 
@@ -1857,9 +2116,9 @@ class RuleGroupsApiService {
1857
2116
  };
1858
2117
  }
1859
2118
  }
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: [{
2119
+ RuleGroupsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2120
+ RuleGroupsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService });
2121
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService, decorators: [{
1863
2122
  type: Injectable
1864
2123
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1865
2124
 
@@ -1872,8 +2131,12 @@ class RulesApiService {
1872
2131
  };
1873
2132
  this.searchRules$ = (expression, skip, count) => {
1874
2133
  let params = new HttpParams();
1875
- params = params.set('skip', '' + skip);
1876
- params = params.set('count', '' + count);
2134
+ if (typeof skip === 'number') {
2135
+ params = params.set('skip', '' + skip);
2136
+ }
2137
+ if (typeof count === 'number') {
2138
+ params = params.set('count', '' + count);
2139
+ }
1877
2140
  return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
1878
2141
  };
1879
2142
  this.createRule$ = (rule) => {
@@ -1925,17 +2188,26 @@ class RulesApiService {
1925
2188
  });
1926
2189
  }
1927
2190
  execute$(body) {
1928
- const url = body.rule.ruleGroupType === RuleGroupTypes.eligibility ? '/rules/eligibility/execute' : '/rules/execute';
2191
+ const url = this.getExecuteRuleUrl(body.rule.ruleGroupType);
1929
2192
  return this.baseHttpService.api({
1930
2193
  url,
1931
2194
  method: 'post',
1932
2195
  body,
1933
2196
  });
1934
2197
  }
2198
+ getExecuteRuleUrl(ruleGroupType) {
2199
+ if (ruleGroupType === RuleGroupTypes.eligibility) {
2200
+ return '/rules/eligibility/execute';
2201
+ }
2202
+ if (ruleGroupType === RuleGroupTypes.catalog) {
2203
+ return '/rules/catalog/execute';
2204
+ }
2205
+ return '/rules/execute';
2206
+ }
1935
2207
  }
1936
- RulesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RulesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1937
- RulesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RulesApiService });
1938
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RulesApiService, decorators: [{
2208
+ RulesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2209
+ RulesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService });
2210
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService, decorators: [{
1939
2211
  type: Injectable
1940
2212
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1941
2213
 
@@ -2009,9 +2281,9 @@ class ScriptsApiService {
2009
2281
  };
2010
2282
  }
2011
2283
  }
2012
- ScriptsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ScriptsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2013
- ScriptsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ScriptsApiService });
2014
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ScriptsApiService, decorators: [{
2284
+ ScriptsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2285
+ ScriptsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService });
2286
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService, decorators: [{
2015
2287
  type: Injectable
2016
2288
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2017
2289
 
@@ -2032,9 +2304,9 @@ class ShoppingCartSettingsApiService {
2032
2304
  }, {})));
2033
2305
  }
2034
2306
  }
2035
- ShoppingCartSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ShoppingCartSettingsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
2036
- ShoppingCartSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ShoppingCartSettingsApiService });
2037
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ShoppingCartSettingsApiService, decorators: [{
2307
+ ShoppingCartSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
2308
+ ShoppingCartSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService });
2309
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService, decorators: [{
2038
2310
  type: Injectable
2039
2311
  }], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
2040
2312
 
@@ -2080,9 +2352,9 @@ class StatefulConfigurationApiService {
2080
2352
  });
2081
2353
  }
2082
2354
  }
2083
- StatefulConfigurationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: StatefulConfigurationApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2084
- StatefulConfigurationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: StatefulConfigurationApiService });
2085
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: StatefulConfigurationApiService, decorators: [{
2355
+ StatefulConfigurationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StatefulConfigurationApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2356
+ StatefulConfigurationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StatefulConfigurationApiService });
2357
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StatefulConfigurationApiService, decorators: [{
2086
2358
  type: Injectable
2087
2359
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2088
2360
 
@@ -2146,9 +2418,9 @@ class UIDefinitionsApiService {
2146
2418
  return `/models/${modelId}/uidefinitions`;
2147
2419
  }
2148
2420
  }
2149
- UIDefinitionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: UIDefinitionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2150
- UIDefinitionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: UIDefinitionsApiService });
2151
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: UIDefinitionsApiService, decorators: [{
2421
+ UIDefinitionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2422
+ UIDefinitionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService });
2423
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService, decorators: [{
2152
2424
  type: Injectable
2153
2425
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2154
2426
 
@@ -2434,9 +2706,9 @@ class UITemplatesApiService {
2434
2706
  });
2435
2707
  }
2436
2708
  }
2437
- UITemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: UITemplatesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2438
- UITemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: UITemplatesApiService });
2439
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: UITemplatesApiService, decorators: [{
2709
+ UITemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2710
+ UITemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService });
2711
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService, decorators: [{
2440
2712
  type: Injectable
2441
2713
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2442
2714
 
@@ -2472,6 +2744,15 @@ class VeloceObjectsApiService {
2472
2744
  url: `${this.serviceUrl}/${id}`,
2473
2745
  });
2474
2746
  };
2747
+ this.duplicateObject$ = (body) => {
2748
+ return this.baseHttpService
2749
+ .api({
2750
+ method: 'post',
2751
+ url: `${this.serviceUrl}/${body.id}/clone`,
2752
+ body,
2753
+ })
2754
+ .pipe(map(response => response.clonedRecordId));
2755
+ };
2475
2756
  this.restoreObject$ = (id) => {
2476
2757
  return this.baseHttpService.api({
2477
2758
  method: 'patch',
@@ -2510,65 +2791,121 @@ class VeloceObjectsApiService {
2510
2791
  });
2511
2792
  }
2512
2793
  }
2513
- VeloceObjectsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloceObjectsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2514
- VeloceObjectsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloceObjectsApiService });
2515
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloceObjectsApiService, decorators: [{
2794
+ VeloceObjectsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2795
+ VeloceObjectsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService });
2796
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService, decorators: [{
2516
2797
  type: Injectable
2517
2798
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2518
2799
 
2519
- class RebateProgramApiService {
2800
+ class PortalsApiService {
2520
2801
  constructor(baseHttpService) {
2521
2802
  this.baseHttpService = baseHttpService;
2522
- this.serviceUrl = '/admin/rebate-program';
2523
- this.fetchAll$ = () => {
2524
- return this.baseHttpService.api({ url: this.serviceUrl });
2803
+ this.serviceUrl = '/admin/portal';
2804
+ this.getPortals$ = (skip = 1, name = '') => {
2805
+ let params = new HttpParams();
2806
+ params = params.append('count', (PortalsApiService.MAX_RESULTS * skip).toString());
2807
+ params = params.append('skip', '0');
2808
+ params = params.append('name', name);
2809
+ return this.baseHttpService.api({ url: `${this.serviceUrl}`, params });
2525
2810
  };
2526
- this.fetchOne$ = (id) => {
2527
- return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
2811
+ this.searchPortals$ = (skip = 0, expression) => {
2812
+ let params = new HttpParams();
2813
+ params = params.set('skip', '' + skip);
2814
+ params = params.set('count', '' + PortalsApiService.MAX_RESULTS);
2815
+ return this.baseHttpService.api({
2816
+ method: 'post',
2817
+ url: `${this.serviceUrl}/search`,
2818
+ params,
2819
+ body: expression || {},
2820
+ });
2528
2821
  };
2529
- this.remove$ = (id) => {
2822
+ this.removePortal$ = (id) => {
2530
2823
  return this.baseHttpService.api({
2531
2824
  url: `${this.serviceUrl}/${id}`,
2532
2825
  method: 'delete',
2533
2826
  });
2534
2827
  };
2828
+ this.restore$ = (id) => {
2829
+ return this.baseHttpService.api({
2830
+ method: 'patch',
2831
+ url: `${this.serviceUrl}/${id}/restore`,
2832
+ });
2833
+ };
2834
+ this.duplicatePortal$ = (cloneRequest) => {
2835
+ return this.baseHttpService.api({
2836
+ url: `${this.serviceUrl}/${cloneRequest.id}/clone`,
2837
+ method: 'post',
2838
+ body: cloneRequest,
2839
+ });
2840
+ };
2841
+ this.getPortal$ = (id) => {
2842
+ return this.baseHttpService.api({
2843
+ url: `${this.serviceUrl}/${id}`,
2844
+ });
2845
+ };
2535
2846
  }
2536
- search$(expression, skip, count) {
2537
- let params = new HttpParams();
2538
- if (typeof skip === 'number') {
2539
- params = params.set('skip', '' + skip);
2540
- }
2541
- if (typeof count === 'number') {
2542
- params = params.set('count', '' + count);
2543
- }
2544
- return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
2545
- }
2546
- create$(body) {
2847
+ createNewPortal$(body) {
2547
2848
  return this.baseHttpService.api({
2548
2849
  url: `${this.serviceUrl}`,
2549
2850
  method: 'post',
2550
2851
  body,
2551
2852
  });
2552
2853
  }
2553
- update$(body) {
2854
+ updatePortal$(portal, settings) {
2554
2855
  return this.baseHttpService.api({
2555
- url: `${this.serviceUrl}/${body.id}`,
2856
+ url: `${this.serviceUrl}/${portal.id}`,
2556
2857
  method: 'put',
2557
- body,
2858
+ body: Object.assign(Object.assign({}, portal), { settings: JSON.stringify(settings) }),
2558
2859
  });
2559
2860
  }
2560
2861
  }
2561
- RebateProgramApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateProgramApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2562
- RebateProgramApiServiceprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateProgramApiService });
2563
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateProgramApiService, decorators: [{
2862
+ PortalsApiService.MAX_RESULTS = 60;
2863
+ PortalsApiServicefac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PortalsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2864
+ PortalsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PortalsApiService });
2865
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PortalsApiService, decorators: [{
2866
+ type: Injectable
2867
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2868
+
2869
+ class ConfigurationProcessorsApiService {
2870
+ constructor(baseHttpService) {
2871
+ this.baseHttpService = baseHttpService;
2872
+ this.serviceUrl = '/configuration/processors/owners';
2873
+ this.fetchConfigurationProcessors$ = (ownerId) => {
2874
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${ownerId}` });
2875
+ };
2876
+ this.createConfigurationProcessors$ = (configurationProcessor) => {
2877
+ return this.baseHttpService.api({
2878
+ method: 'post',
2879
+ url: `${this.serviceUrl}/${configurationProcessor.ownerId}`,
2880
+ body: configurationProcessor,
2881
+ });
2882
+ };
2883
+ this.updateConfigurationProcessors$ = (configurationProcessor) => {
2884
+ return this.baseHttpService.api({
2885
+ method: 'put',
2886
+ url: `${this.serviceUrl}/${configurationProcessor.ownerId}/${configurationProcessor.id}`,
2887
+ body: configurationProcessor,
2888
+ });
2889
+ };
2890
+ this.deleteConfigurationProcessors$ = (configurationProcessor) => {
2891
+ return this.baseHttpService.api({
2892
+ method: 'delete',
2893
+ url: `${this.serviceUrl}/${configurationProcessor.ownerId}/${configurationProcessor.id}`,
2894
+ });
2895
+ };
2896
+ }
2897
+ }
2898
+ ConfigurationProcessorsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2899
+ ConfigurationProcessorsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService });
2900
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService, decorators: [{
2564
2901
  type: Injectable
2565
2902
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2566
2903
 
2567
2904
  class ApiModule {
2568
2905
  }
2569
- ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2570
- ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: ApiModule, imports: [HttpClientModule] });
2571
- ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ApiModule, providers: [
2906
+ ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2907
+ ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, imports: [HttpClientModule] });
2908
+ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, providers: [
2572
2909
  BaseHttpService,
2573
2910
  XrayService,
2574
2911
  ConfigurationApiService,
@@ -2603,8 +2940,14 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
2603
2940
  VeloceObjectsApiService,
2604
2941
  StatefulConfigurationApiService,
2605
2942
  RebateProgramApiService,
2943
+ RebateTypeApiService,
2944
+ PromotionsApiService,
2945
+ VeloceAuthService,
2946
+ ContractedPriceApiService,
2947
+ PortalsApiService,
2948
+ ConfigurationProcessorsApiService,
2606
2949
  ], imports: [HttpClientModule] });
2607
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ApiModule, decorators: [{
2950
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, decorators: [{
2608
2951
  type: NgModule,
2609
2952
  args: [{
2610
2953
  imports: [HttpClientModule],
@@ -2643,6 +2986,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
2643
2986
  VeloceObjectsApiService,
2644
2987
  StatefulConfigurationApiService,
2645
2988
  RebateProgramApiService,
2989
+ RebateTypeApiService,
2990
+ PromotionsApiService,
2991
+ VeloceAuthService,
2992
+ ContractedPriceApiService,
2993
+ PortalsApiService,
2994
+ ConfigurationProcessorsApiService,
2646
2995
  ],
2647
2996
  }]
2648
2997
  }] });
@@ -2651,5 +3000,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
2651
3000
  * Generated bundle index. Do not edit.
2652
3001
  */
2653
3002
 
2654
- 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, RuleGroupsApiService, RulesApiService, SalesforceApiService, ScriptsApiService, ShoppingCartSettingsApiService, StatefulConfigurationApiService, UIDefinitionsApiService, UITemplatesApiService, VeloceObjectsApiService };
3003
+ export { AccountApiService, ApiModule, CatalogAdminApiService, CatalogApiService, ConfigurationApiService, ConfigurationProcessorsApiService, ConfigurationSettingsApiService, ContextApiService, ContractedPriceApiService, DeltaApiService, DocumentAttachmentApiService, DocumentTemplatesApiService, EndpointsApiService, 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 };
2655
3004
  //# sourceMappingURL=veloceapps-api.mjs.map