@veloceapps/api 8.0.0-8 → 8.0.0-80

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 +7 -2
  2. package/esm2020/lib/api.module.mjs +23 -8
  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-settings-api.service.mjs +3 -3
  9. package/esm2020/lib/services/context-api.service.mjs +3 -3
  10. package/esm2020/lib/services/contracted-price-api.service.mjs +45 -0
  11. package/esm2020/lib/services/delta-api.service.mjs +3 -3
  12. package/esm2020/lib/services/document-attachment-api.service.mjs +3 -3
  13. package/esm2020/lib/services/document-templates-api.service.mjs +5 -5
  14. package/esm2020/lib/services/endpoints-api.service.mjs +3 -3
  15. package/esm2020/lib/services/flows-api.service.mjs +3 -3
  16. package/esm2020/lib/services/guided-sellings-admin-api.service.mjs +3 -3
  17. package/esm2020/lib/services/guided-sellings-api.service.mjs +3 -3
  18. package/esm2020/lib/services/offers-api.service.mjs +3 -3
  19. package/esm2020/lib/services/org-info-api.service.mjs +3 -3
  20. package/esm2020/lib/services/picklists-api.service.mjs +3 -3
  21. package/esm2020/lib/services/portals-api.service.mjs +76 -0
  22. package/esm2020/lib/services/price-api.service.mjs +3 -3
  23. package/esm2020/lib/services/procedures-api.service.mjs +3 -3
  24. package/esm2020/lib/services/product-api.service.mjs +3 -3
  25. package/esm2020/lib/services/product-model-api.service.mjs +3 -3
  26. package/esm2020/lib/services/promotions-api.service.mjs +68 -0
  27. package/esm2020/lib/services/quote-api.service.mjs +3 -3
  28. package/esm2020/lib/services/ramp-api.service.mjs +3 -3
  29. package/esm2020/lib/services/rebate-program-api.service.mjs +68 -0
  30. package/esm2020/lib/services/rebate-type-api.service.mjs +68 -0
  31. package/esm2020/lib/services/rule-groups-api.service.mjs +3 -3
  32. package/esm2020/lib/services/rules-api.service.mjs +20 -7
  33. package/esm2020/lib/services/salesforce-api.service.mjs +6 -4
  34. package/esm2020/lib/services/scripts-api.service.mjs +3 -3
  35. package/esm2020/lib/services/shopping-cart-settings-api.service.mjs +3 -3
  36. package/esm2020/lib/services/stateful-configuration-api.mjs +3 -3
  37. package/esm2020/lib/services/ui-definitions-api.service.mjs +3 -3
  38. package/esm2020/lib/services/ui-templates-api.service.mjs +3 -3
  39. package/esm2020/lib/services/veloce-objects-api.service.mjs +14 -4
  40. package/esm2020/lib/types/auth.types.mjs +2 -0
  41. package/esm2020/lib/types/index.mjs +2 -1
  42. package/fesm2015/veloceapps-api.mjs +471 -154
  43. package/fesm2015/veloceapps-api.mjs.map +1 -1
  44. package/fesm2020/veloceapps-api.mjs +476 -153
  45. package/fesm2020/veloceapps-api.mjs.map +1 -1
  46. package/index.d.ts +6 -1
  47. package/lib/services/auth.service.d.ts +11 -0
  48. package/lib/services/configuration-api.service.d.ts +5 -0
  49. package/lib/services/contracted-price-api.service.d.ts +16 -0
  50. package/lib/services/portals-api.service.d.ts +20 -0
  51. package/lib/services/promotions-api.service.d.ts +19 -0
  52. package/lib/services/rebate-program-api.service.d.ts +19 -0
  53. package/lib/services/rebate-type-api.service.d.ts +19 -0
  54. package/lib/services/rules-api.service.d.ts +2 -1
  55. package/lib/services/salesforce-api.service.d.ts +1 -1
  56. package/lib/services/veloce-objects-api.service.d.ts +2 -1
  57. package/lib/types/auth.types.d.ts +4 -0
  58. package/lib/types/index.d.ts +1 -0
  59. package/package.json +1 -1
  60. package/esm2020/lib/services/rebate-api.service.mjs +0 -49
  61. package/lib/services/rebate-api.service.d.ts +0 -15
@@ -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, 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
 
@@ -996,9 +1068,9 @@ class FlowsApiService {
996
1068
  .pipe(map((flow) => ((flow === null || flow === void 0 ? void 0 : flow.value) ? JSON.parse(flow.value) : [])));
997
1069
  }
998
1070
  }
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: [{
1071
+ FlowsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1072
+ FlowsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService });
1073
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, decorators: [{
1002
1074
  type: Injectable
1003
1075
  }], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
1004
1076
 
@@ -1057,9 +1129,9 @@ class GuidedSellingsAdminApiService {
1057
1129
  }
1058
1130
  }
1059
1131
  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: [{
1132
+ GuidedSellingsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1133
+ GuidedSellingsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingsAdminApiService });
1134
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingsAdminApiService, decorators: [{
1063
1135
  type: Injectable
1064
1136
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1065
1137
 
@@ -1089,9 +1161,9 @@ class GuidedSellingApiService {
1089
1161
  });
1090
1162
  }
1091
1163
  }
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: [{
1164
+ GuidedSellingApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1165
+ GuidedSellingApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingApiService });
1166
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingApiService, decorators: [{
1095
1167
  type: Injectable
1096
1168
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1097
1169
 
@@ -1160,9 +1232,9 @@ class OffersApiService {
1160
1232
  }
1161
1233
  }
1162
1234
  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: [{
1235
+ OffersApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OffersApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1236
+ OffersApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OffersApiService });
1237
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OffersApiService, decorators: [{
1166
1238
  type: Injectable
1167
1239
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1168
1240
 
@@ -1177,11 +1249,11 @@ class OrgInfoApiService {
1177
1249
  return this.http.get(`${this.hostUrl}/org-info/${organizationId}`);
1178
1250
  }
1179
1251
  }
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: [{
1252
+ 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 });
1253
+ OrgInfoApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService });
1254
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService, decorators: [{
1183
1255
  type: Injectable
1184
- }], ctorParameters: function () { return [{ type: i4.HttpClient }]; } });
1256
+ }], ctorParameters: function () { return [{ type: i1$1.HttpClient }]; } });
1185
1257
 
1186
1258
  class PicklistsApiService {
1187
1259
  constructor(baseHttpService) {
@@ -1212,9 +1284,9 @@ class PicklistsApiService {
1212
1284
  };
1213
1285
  }
1214
1286
  }
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: [{
1287
+ PicklistsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1288
+ PicklistsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService });
1289
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService, decorators: [{
1218
1290
  type: Injectable
1219
1291
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1220
1292
 
@@ -1272,9 +1344,9 @@ class PriceApiService {
1272
1344
  });
1273
1345
  }
1274
1346
  }
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: [{
1347
+ PriceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PriceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1348
+ PriceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PriceApiService });
1349
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PriceApiService, decorators: [{
1278
1350
  type: Injectable
1279
1351
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1280
1352
 
@@ -1366,9 +1438,9 @@ class ProceduresApiService {
1366
1438
  });
1367
1439
  }
1368
1440
  }
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: [{
1441
+ ProceduresApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1442
+ ProceduresApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService });
1443
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService, decorators: [{
1372
1444
  type: Injectable
1373
1445
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1374
1446
 
@@ -1514,9 +1586,9 @@ class ProductApiService {
1514
1586
  return `${this.serviceUrl}/${productId}/image`;
1515
1587
  }
1516
1588
  }
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: [{
1589
+ ProductApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1590
+ ProductApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService });
1591
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService, decorators: [{
1520
1592
  type: Injectable
1521
1593
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1522
1594
 
@@ -1745,9 +1817,72 @@ class ProductModelApiService {
1745
1817
  }
1746
1818
  }
1747
1819
  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: [{
1820
+ ProductModelApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModelApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1821
+ ProductModelApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModelApiService });
1822
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModelApiService, decorators: [{
1823
+ type: Injectable
1824
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1825
+
1826
+ class PromotionsApiService {
1827
+ constructor(baseHttpService) {
1828
+ this.baseHttpService = baseHttpService;
1829
+ this.serviceUrl = '/admin/promotion';
1830
+ this.fetchAll$ = () => {
1831
+ return this.baseHttpService.api({ url: this.serviceUrl });
1832
+ };
1833
+ this.fetchOne$ = (id) => {
1834
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
1835
+ };
1836
+ this.remove$ = (id) => {
1837
+ return this.baseHttpService.api({
1838
+ url: `${this.serviceUrl}/${id}`,
1839
+ method: 'delete',
1840
+ });
1841
+ };
1842
+ this.restore$ = (id) => {
1843
+ return this.baseHttpService.api({
1844
+ method: 'patch',
1845
+ url: `${this.serviceUrl}/${id}/restore`,
1846
+ });
1847
+ };
1848
+ this.duplicate$ = (body) => {
1849
+ return this.baseHttpService
1850
+ .api({
1851
+ url: `${this.serviceUrl}/${body.id}/clone`,
1852
+ method: 'post',
1853
+ body,
1854
+ })
1855
+ .pipe(map$1(response => response.clonedRecordId));
1856
+ };
1857
+ }
1858
+ search$(expression, skip, count) {
1859
+ let params = new HttpParams();
1860
+ if (typeof skip === 'number') {
1861
+ params = params.set('skip', '' + skip);
1862
+ }
1863
+ if (typeof count === 'number') {
1864
+ params = params.set('count', '' + count);
1865
+ }
1866
+ return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
1867
+ }
1868
+ create$(body) {
1869
+ return this.baseHttpService.api({
1870
+ url: `${this.serviceUrl}`,
1871
+ method: 'post',
1872
+ body,
1873
+ });
1874
+ }
1875
+ update$(body) {
1876
+ return this.baseHttpService.api({
1877
+ url: `${this.serviceUrl}/${body.id}`,
1878
+ method: 'put',
1879
+ body,
1880
+ });
1881
+ }
1882
+ }
1883
+ PromotionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1884
+ PromotionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService });
1885
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService, decorators: [{
1751
1886
  type: Injectable
1752
1887
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1753
1888
 
@@ -1783,9 +1918,9 @@ class QuoteApiService {
1783
1918
  });
1784
1919
  }
1785
1920
  }
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: [{
1921
+ QuoteApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1922
+ QuoteApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService });
1923
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService, decorators: [{
1789
1924
  type: Injectable
1790
1925
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1791
1926
 
@@ -1801,9 +1936,135 @@ class RampApiService {
1801
1936
  return this.httpService.api(Object.assign({ method: 'post', url: `${this.SERVICE_URL}/renew`, body: request }, options));
1802
1937
  }
1803
1938
  }
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: [{
1939
+ RampApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RampApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1940
+ RampApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RampApiService });
1941
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RampApiService, decorators: [{
1942
+ type: Injectable
1943
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1944
+
1945
+ class RebateProgramApiService {
1946
+ constructor(baseHttpService) {
1947
+ this.baseHttpService = baseHttpService;
1948
+ this.serviceUrl = '/admin/rebate-program';
1949
+ this.fetchAll$ = () => {
1950
+ return this.baseHttpService.api({ url: this.serviceUrl });
1951
+ };
1952
+ this.fetchOne$ = (id) => {
1953
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
1954
+ };
1955
+ this.remove$ = (id) => {
1956
+ return this.baseHttpService.api({
1957
+ url: `${this.serviceUrl}/${id}`,
1958
+ method: 'delete',
1959
+ });
1960
+ };
1961
+ this.restore$ = (id) => {
1962
+ return this.baseHttpService.api({
1963
+ method: 'patch',
1964
+ url: `${this.serviceUrl}/${id}/restore`,
1965
+ });
1966
+ };
1967
+ this.duplicate$ = (body) => {
1968
+ return this.baseHttpService
1969
+ .api({
1970
+ url: `${this.serviceUrl}/${body.id}/clone`,
1971
+ method: 'post',
1972
+ body,
1973
+ })
1974
+ .pipe(map$1(response => response.clonedRecordId));
1975
+ };
1976
+ }
1977
+ search$(expression, skip, count) {
1978
+ let params = new HttpParams();
1979
+ if (typeof skip === 'number') {
1980
+ params = params.set('skip', '' + skip);
1981
+ }
1982
+ if (typeof count === 'number') {
1983
+ params = params.set('count', '' + count);
1984
+ }
1985
+ return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
1986
+ }
1987
+ create$(body) {
1988
+ return this.baseHttpService.api({
1989
+ url: `${this.serviceUrl}`,
1990
+ method: 'post',
1991
+ body,
1992
+ });
1993
+ }
1994
+ update$(body) {
1995
+ return this.baseHttpService.api({
1996
+ url: `${this.serviceUrl}/${body.id}`,
1997
+ method: 'put',
1998
+ body,
1999
+ });
2000
+ }
2001
+ }
2002
+ RebateProgramApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2003
+ RebateProgramApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService });
2004
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, decorators: [{
2005
+ type: Injectable
2006
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2007
+
2008
+ class RebateTypeApiService {
2009
+ constructor(baseHttpService) {
2010
+ this.baseHttpService = baseHttpService;
2011
+ this.serviceUrl = '/admin/rebate-type';
2012
+ this.fetchAll$ = () => {
2013
+ return this.baseHttpService.api({ url: this.serviceUrl });
2014
+ };
2015
+ this.fetchOne$ = (id) => {
2016
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
2017
+ };
2018
+ this.remove$ = (id) => {
2019
+ return this.baseHttpService.api({
2020
+ url: `${this.serviceUrl}/${id}`,
2021
+ method: 'delete',
2022
+ });
2023
+ };
2024
+ this.restore$ = (id) => {
2025
+ return this.baseHttpService.api({
2026
+ method: 'patch',
2027
+ url: `${this.serviceUrl}/${id}/restore`,
2028
+ });
2029
+ };
2030
+ this.duplicate$ = (body) => {
2031
+ return this.baseHttpService
2032
+ .api({
2033
+ url: `${this.serviceUrl}/${body.id}/clone`,
2034
+ method: 'post',
2035
+ body,
2036
+ })
2037
+ .pipe(map$1(response => response.clonedRecordId));
2038
+ };
2039
+ }
2040
+ search$(expression, skip, count) {
2041
+ let params = new HttpParams();
2042
+ if (typeof skip === 'number') {
2043
+ params = params.set('skip', '' + skip);
2044
+ }
2045
+ if (typeof count === 'number') {
2046
+ params = params.set('count', '' + count);
2047
+ }
2048
+ return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
2049
+ }
2050
+ create$(body) {
2051
+ return this.baseHttpService.api({
2052
+ url: `${this.serviceUrl}`,
2053
+ method: 'post',
2054
+ body,
2055
+ });
2056
+ }
2057
+ update$(body) {
2058
+ return this.baseHttpService.api({
2059
+ url: `${this.serviceUrl}/${body.id}`,
2060
+ method: 'put',
2061
+ body,
2062
+ });
2063
+ }
2064
+ }
2065
+ RebateTypeApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2066
+ RebateTypeApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService });
2067
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, decorators: [{
1807
2068
  type: Injectable
1808
2069
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1809
2070
 
@@ -1857,9 +2118,9 @@ class RuleGroupsApiService {
1857
2118
  };
1858
2119
  }
1859
2120
  }
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: [{
2121
+ RuleGroupsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2122
+ RuleGroupsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService });
2123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService, decorators: [{
1863
2124
  type: Injectable
1864
2125
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1865
2126
 
@@ -1872,8 +2133,12 @@ class RulesApiService {
1872
2133
  };
1873
2134
  this.searchRules$ = (expression, skip, count) => {
1874
2135
  let params = new HttpParams();
1875
- params = params.set('skip', '' + skip);
1876
- params = params.set('count', '' + count);
2136
+ if (typeof skip === 'number') {
2137
+ params = params.set('skip', '' + skip);
2138
+ }
2139
+ if (typeof count === 'number') {
2140
+ params = params.set('count', '' + count);
2141
+ }
1877
2142
  return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
1878
2143
  };
1879
2144
  this.createRule$ = (rule) => {
@@ -1925,17 +2190,26 @@ class RulesApiService {
1925
2190
  });
1926
2191
  }
1927
2192
  execute$(body) {
1928
- const url = body.rule.ruleGroupType === RuleGroupTypes.eligibility ? '/rules/eligibility/execute' : '/rules/execute';
2193
+ const url = this.getExecuteRuleUrl(body.rule.ruleGroupType);
1929
2194
  return this.baseHttpService.api({
1930
2195
  url,
1931
2196
  method: 'post',
1932
2197
  body,
1933
2198
  });
1934
2199
  }
2200
+ getExecuteRuleUrl(ruleGroupType) {
2201
+ if (ruleGroupType === RuleGroupTypes.eligibility) {
2202
+ return '/rules/eligibility/execute';
2203
+ }
2204
+ if (ruleGroupType === RuleGroupTypes.catalog) {
2205
+ return '/rules/catalog/execute';
2206
+ }
2207
+ return '/rules/execute';
2208
+ }
1935
2209
  }
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: [{
2210
+ RulesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2211
+ RulesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService });
2212
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService, decorators: [{
1939
2213
  type: Injectable
1940
2214
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1941
2215
 
@@ -2009,9 +2283,9 @@ class ScriptsApiService {
2009
2283
  };
2010
2284
  }
2011
2285
  }
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: [{
2286
+ ScriptsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2287
+ ScriptsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService });
2288
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService, decorators: [{
2015
2289
  type: Injectable
2016
2290
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2017
2291
 
@@ -2032,9 +2306,9 @@ class ShoppingCartSettingsApiService {
2032
2306
  }, {})));
2033
2307
  }
2034
2308
  }
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: [{
2309
+ ShoppingCartSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
2310
+ ShoppingCartSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService });
2311
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService, decorators: [{
2038
2312
  type: Injectable
2039
2313
  }], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
2040
2314
 
@@ -2080,9 +2354,9 @@ class StatefulConfigurationApiService {
2080
2354
  });
2081
2355
  }
2082
2356
  }
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: [{
2357
+ StatefulConfigurationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StatefulConfigurationApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2358
+ StatefulConfigurationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StatefulConfigurationApiService });
2359
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StatefulConfigurationApiService, decorators: [{
2086
2360
  type: Injectable
2087
2361
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2088
2362
 
@@ -2146,9 +2420,9 @@ class UIDefinitionsApiService {
2146
2420
  return `/models/${modelId}/uidefinitions`;
2147
2421
  }
2148
2422
  }
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: [{
2423
+ UIDefinitionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2424
+ UIDefinitionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService });
2425
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService, decorators: [{
2152
2426
  type: Injectable
2153
2427
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2154
2428
 
@@ -2434,9 +2708,9 @@ class UITemplatesApiService {
2434
2708
  });
2435
2709
  }
2436
2710
  }
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: [{
2711
+ UITemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2712
+ UITemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService });
2713
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService, decorators: [{
2440
2714
  type: Injectable
2441
2715
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2442
2716
 
@@ -2472,6 +2746,15 @@ class VeloceObjectsApiService {
2472
2746
  url: `${this.serviceUrl}/${id}`,
2473
2747
  });
2474
2748
  };
2749
+ this.duplicateObject$ = (body) => {
2750
+ return this.baseHttpService
2751
+ .api({
2752
+ method: 'post',
2753
+ url: `${this.serviceUrl}/${body.id}/clone`,
2754
+ body,
2755
+ })
2756
+ .pipe(map(response => response.clonedRecordId));
2757
+ };
2475
2758
  this.restoreObject$ = (id) => {
2476
2759
  return this.baseHttpService.api({
2477
2760
  method: 'patch',
@@ -2510,62 +2793,86 @@ class VeloceObjectsApiService {
2510
2793
  });
2511
2794
  }
2512
2795
  }
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: [{
2796
+ VeloceObjectsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2797
+ VeloceObjectsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService });
2798
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService, decorators: [{
2516
2799
  type: Injectable
2517
2800
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2518
2801
 
2519
- const rebatePrograms = [
2520
- // todo remove when api ready DM-1150
2521
- {
2522
- id: '1',
2523
- name: 'First Rebate Program',
2524
- eligibleAccounts: 'a188B000000M1zoQAC',
2525
- active: false,
2526
- endDate: '2023-12-31',
2527
- startDate: '2023-01-01',
2528
- payoutFrequency: 'UOM_MILE',
2529
- },
2530
- ];
2531
- class RebateApiService {
2802
+ class PortalsApiService {
2532
2803
  constructor(baseHttpService) {
2533
2804
  this.baseHttpService = baseHttpService;
2534
- this.serviceUrl = '/admin/rebates';
2535
- }
2536
- fetchPrograms$() {
2537
- //return of([]);
2538
- return of([...rebatePrograms]);
2539
- //return this.baseHttpService.api<RebateProgram[]>({ url: `${this.serviceUrl}` });
2540
- }
2541
- removeProgram$(id) {
2542
- return of(null);
2543
- }
2544
- fetchProgram$(id) {
2545
- return of(Object.assign(Object.assign({}, rebatePrograms[0]), { id }));
2546
- // return this.baseHttpService.api({
2547
- // url: `${this.serviceUrl}/${id}`,
2548
- // method: 'get',
2549
- // });
2805
+ this.serviceUrl = '/admin/portal';
2806
+ this.getPortals$ = (skip = 1, name = '') => {
2807
+ let params = new HttpParams();
2808
+ params = params.append('count', (PortalsApiService.MAX_RESULTS * skip).toString());
2809
+ params = params.append('skip', '0');
2810
+ params = params.append('name', name);
2811
+ return this.baseHttpService.api({ url: `${this.serviceUrl}`, params });
2812
+ };
2813
+ this.searchPortals$ = (skip = 0, expression) => {
2814
+ let params = new HttpParams();
2815
+ params = params.set('skip', '' + skip);
2816
+ params = params.set('count', '' + PortalsApiService.MAX_RESULTS);
2817
+ return this.baseHttpService.api({
2818
+ method: 'post',
2819
+ url: `${this.serviceUrl}/search`,
2820
+ params,
2821
+ body: expression || {},
2822
+ });
2823
+ };
2824
+ this.removePortal$ = (id) => {
2825
+ return this.baseHttpService.api({
2826
+ url: `${this.serviceUrl}/${id}`,
2827
+ method: 'delete',
2828
+ });
2829
+ };
2830
+ this.restore$ = (id) => {
2831
+ return this.baseHttpService.api({
2832
+ method: 'patch',
2833
+ url: `${this.serviceUrl}/${id}/restore`,
2834
+ });
2835
+ };
2836
+ this.duplicatePortal$ = (cloneRequest) => {
2837
+ return this.baseHttpService.api({
2838
+ url: `${this.serviceUrl}/${cloneRequest.id}/clone`,
2839
+ method: 'post',
2840
+ body: cloneRequest,
2841
+ });
2842
+ };
2843
+ this.getPortal$ = (id) => {
2844
+ return this.baseHttpService.api({
2845
+ url: `${this.serviceUrl}/${id}`,
2846
+ });
2847
+ };
2550
2848
  }
2551
- createProgram$(data) {
2552
- return of(Object.assign(Object.assign({}, rebatePrograms[0]), { id: Math.random() + '' }));
2849
+ createNewPortal$(body) {
2850
+ return this.baseHttpService.api({
2851
+ url: `${this.serviceUrl}`,
2852
+ method: 'post',
2853
+ body,
2854
+ });
2553
2855
  }
2554
- updateProgram$(data) {
2555
- return of(Object.assign({}, data));
2856
+ updatePortal$(portal, settings) {
2857
+ return this.baseHttpService.api({
2858
+ url: `${this.serviceUrl}/${portal.id}`,
2859
+ method: 'put',
2860
+ body: Object.assign(Object.assign({}, portal), { settings: JSON.stringify(settings) }),
2861
+ });
2556
2862
  }
2557
2863
  }
2558
- RebateApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2559
- RebateApiServiceprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateApiService });
2560
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateApiService, decorators: [{
2864
+ PortalsApiService.MAX_RESULTS = 60;
2865
+ PortalsApiServicefac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PortalsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2866
+ PortalsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PortalsApiService });
2867
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PortalsApiService, decorators: [{
2561
2868
  type: Injectable
2562
2869
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2563
2870
 
2564
2871
  class ApiModule {
2565
2872
  }
2566
- ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2567
- ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: ApiModule, imports: [HttpClientModule] });
2568
- ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ApiModule, providers: [
2873
+ ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2874
+ ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, imports: [HttpClientModule] });
2875
+ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, providers: [
2569
2876
  BaseHttpService,
2570
2877
  XrayService,
2571
2878
  ConfigurationApiService,
@@ -2599,9 +2906,14 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
2599
2906
  UIDefinitionsApiService,
2600
2907
  VeloceObjectsApiService,
2601
2908
  StatefulConfigurationApiService,
2602
- RebateApiService,
2909
+ RebateProgramApiService,
2910
+ RebateTypeApiService,
2911
+ PromotionsApiService,
2912
+ VeloceAuthService,
2913
+ ContractedPriceApiService,
2914
+ PortalsApiService,
2603
2915
  ], imports: [HttpClientModule] });
2604
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ApiModule, decorators: [{
2916
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, decorators: [{
2605
2917
  type: NgModule,
2606
2918
  args: [{
2607
2919
  imports: [HttpClientModule],
@@ -2639,7 +2951,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
2639
2951
  UIDefinitionsApiService,
2640
2952
  VeloceObjectsApiService,
2641
2953
  StatefulConfigurationApiService,
2642
- RebateApiService,
2954
+ RebateProgramApiService,
2955
+ RebateTypeApiService,
2956
+ PromotionsApiService,
2957
+ VeloceAuthService,
2958
+ ContractedPriceApiService,
2959
+ PortalsApiService,
2643
2960
  ],
2644
2961
  }]
2645
2962
  }] });
@@ -2648,5 +2965,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
2648
2965
  * Generated bundle index. Do not edit.
2649
2966
  */
2650
2967
 
2651
- export { AccountApiService, ApiModule, CatalogAdminApiService, CatalogApiService, ConfigurationApiService, ConfigurationSettingsApiService, ContextApiService, DeltaApiService, DocumentAttachmentApiService, DocumentTemplatesApiService, EndpointsApiService, FlowsApiService, GuidedSellingApiService, GuidedSellingsAdminApiService, OffersApiService, OrgInfoApiService, PicklistsApiService, PriceApiService, ProceduresApiService, ProductApiService, ProductModelApiService, QuoteApiService, RampApiService, RebateApiService, RuleGroupsApiService, RulesApiService, SalesforceApiService, ScriptsApiService, ShoppingCartSettingsApiService, StatefulConfigurationApiService, UIDefinitionsApiService, UITemplatesApiService, VeloceObjectsApiService };
2968
+ export { AccountApiService, ApiModule, CatalogAdminApiService, CatalogApiService, ConfigurationApiService, 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 };
2652
2969
  //# sourceMappingURL=veloceapps-api.mjs.map