@veloceapps/api 10.0.0-50 → 10.0.0-52

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.
@@ -4,7 +4,7 @@ import * as i0 from '@angular/core';
4
4
  import { Injectable, NgModule } from '@angular/core';
5
5
  import * as i1 from '@veloceapps/core';
6
6
  import { uiDefinitionFromDTO, DomainComputation, ConfigurationContextMode, isLegacyDocumentTemplate, DocxTemplater, QuoteDraft, StringUtils, Expression, toLatestFlow, isDefined, Operator, isApexError, isCanvasError, ModelTranslatorUtils, ProductModelsContainer, ModelUtils, EntityUtil, RuleGroupTypes, parseJsonSafely, uiDefinitionToDTO, BaseHttpService, XrayService } from '@veloceapps/core';
7
- import { noop, throwError, of, zip, forkJoin, map as map$1, from, catchError as catchError$1, switchMap as switchMap$1 } from 'rxjs';
7
+ import { noop, throwError, of, zip, forkJoin, from, 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 i1$2 from 'primeng/api';
10
10
  import { CurrencyPipe } from '@angular/common';
@@ -1502,77 +1502,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1502
1502
  type: Injectable
1503
1503
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1504
1504
 
1505
- class OffersApiService {
1506
- constructor(baseHttpService) {
1507
- this.baseHttpService = baseHttpService;
1508
- this.serviceUrl = '/admin/offers';
1509
- }
1510
- createOffer$(body) {
1511
- return this.baseHttpService.api({
1512
- url: `${this.serviceUrl}`,
1513
- method: 'post',
1514
- body,
1515
- });
1516
- }
1517
- fetchOffers$() {
1518
- return this.baseHttpService.api({
1519
- url: `${this.serviceUrl}`,
1520
- });
1521
- }
1522
- fetchOffer$(id) {
1523
- return this.baseHttpService.api({
1524
- url: `${this.serviceUrl}/${id}`,
1525
- });
1526
- }
1527
- updateOffer$(offer) {
1528
- return this.baseHttpService.api({
1529
- url: `${this.serviceUrl}/${offer.id}`,
1530
- method: 'put',
1531
- body: offer,
1532
- });
1533
- }
1534
- removeOffer$(id) {
1535
- return this.baseHttpService.api({
1536
- url: `${this.serviceUrl}/${id}`,
1537
- method: 'delete',
1538
- });
1539
- }
1540
- searchOffers$(expression, skip, count) {
1541
- let params = new HttpParams();
1542
- params = params.set('skip', '' + skip);
1543
- params = params.set('count', '' + count);
1544
- return this.baseHttpService.api({
1545
- method: 'post',
1546
- url: `${this.serviceUrl}/search`,
1547
- params,
1548
- body: expression,
1549
- });
1550
- }
1551
- fetchOfferProducts$(id) {
1552
- return this.baseHttpService
1553
- .api({
1554
- url: `${this.serviceUrl}/${id}/products`,
1555
- })
1556
- .pipe(map$1(response => response.products));
1557
- }
1558
- upsertOfferProducts$(id, products) {
1559
- const request = { products };
1560
- return this.baseHttpService
1561
- .api({
1562
- url: `${this.serviceUrl}/${id}/products`,
1563
- method: 'put',
1564
- body: request,
1565
- })
1566
- .pipe(map$1(response => response.products));
1567
- }
1568
- }
1569
- OffersApiService.MAX_RESULTS = 60;
1570
- OffersApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OffersApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1571
- OffersApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OffersApiService });
1572
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OffersApiService, decorators: [{
1573
- type: Injectable
1574
- }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1575
-
1576
1505
  /**
1577
1506
  * Parses the response from Canvas and checks for errors.
1578
1507
  * - If an error is found, publishes an error message and returns the failover value.
@@ -1788,13 +1717,12 @@ class PriceApiService {
1788
1717
  url: `/price-lists/${id}`,
1789
1718
  });
1790
1719
  }
1791
- getSellingTermByEndDate(planId, offeringId, startDate, endDate, frequencyUnit, frequencyDuration) {
1720
+ getSellingTermByEndDate(planId, startDate, endDate, frequencyUnit, frequencyDuration) {
1792
1721
  return this.httpService.api({
1793
1722
  method: 'post',
1794
1723
  url: `${this.SERVICE_URL}/selling-term-by-end-date`,
1795
1724
  body: {
1796
1725
  planId: planId,
1797
- offeringId: offeringId,
1798
1726
  startDate: startDate,
1799
1727
  endDate: endDate,
1800
1728
  frequencyUnit: frequencyUnit,
@@ -1802,13 +1730,12 @@ class PriceApiService {
1802
1730
  },
1803
1731
  });
1804
1732
  }
1805
- getSellingTermByTerm(planId, offeringId, startDate, term, frequencyUnit, frequencyDuration) {
1733
+ getSellingTermByTerm(planId, startDate, term, frequencyUnit, frequencyDuration) {
1806
1734
  return this.httpService.api({
1807
1735
  method: 'post',
1808
1736
  url: `${this.SERVICE_URL}/selling-term-by-term`,
1809
1737
  body: {
1810
1738
  planId: planId,
1811
- offeringId: offeringId,
1812
1739
  startDate: startDate,
1813
1740
  term: term,
1814
1741
  frequencyUnit: frequencyUnit,
@@ -2956,9 +2883,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2956
2883
  type: Injectable
2957
2884
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2958
2885
 
2959
- const fromUIComponentStoryDTO = (dto, attachments) => {
2886
+ const fromUIComponentStoryDTO = (dto, templateId, attachments) => {
2960
2887
  return {
2961
2888
  id: dto.id,
2889
+ templateId,
2962
2890
  name: dto.name,
2963
2891
  uiComponentId: dto.uiComponentId,
2964
2892
  description: dto.description,
@@ -3096,7 +3024,7 @@ class UITemplatesApiService {
3096
3024
  this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'js'),
3097
3025
  this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'css'),
3098
3026
  this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'json'),
3099
- ]).pipe(map$1(([html, js, css, json]) => ({ html, js, css, json })), map$1(attachments => fromUIComponentStoryDTO(storyDto, attachments)));
3027
+ ]).pipe(map$1(([html, js, css, json]) => ({ html, js, css, json })), map$1(attachments => fromUIComponentStoryDTO(storyDto, templateId, attachments)));
3100
3028
  };
3101
3029
  this.fetchStories$ = (templateId, componentId, name) => {
3102
3030
  let params = new HttpParams();
@@ -3137,12 +3065,12 @@ class UITemplatesApiService {
3137
3065
  url: `${this.serviceUrl}/${templateId}/components/${story.uiComponentId}/stories/${story.id}`,
3138
3066
  body: rest,
3139
3067
  })
3140
- .pipe(map$1(dto => fromUIComponentStoryDTO(dto, { html: template, js: script, css: styles, json: section })));
3068
+ .pipe(map$1(dto => fromUIComponentStoryDTO(dto, templateId, { html: template, js: script, css: styles, json: section })));
3141
3069
  };
3142
3070
  this.duplicateComponentStory$ = (story, cloneRequest) => {
3143
3071
  return this.baseHttpService
3144
3072
  .api({
3145
- url: `${this.serviceUrl}/${story.template}/components/${story.uiComponentId}/stories/${story.id}/clone`,
3073
+ url: `${this.serviceUrl}/${story.templateId}/components/${story.uiComponentId}/stories/${story.id}/clone`,
3146
3074
  method: 'post',
3147
3075
  body: cloneRequest,
3148
3076
  })
@@ -3541,7 +3469,6 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
3541
3469
  PicklistsApiService,
3542
3470
  EndpointsApiService,
3543
3471
  OrgInfoApiService,
3544
- OffersApiService,
3545
3472
  UIDefinitionsApiService,
3546
3473
  VeloceObjectsApiService,
3547
3474
  StatefulConfigurationApiService,
@@ -3591,7 +3518,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
3591
3518
  PicklistsApiService,
3592
3519
  EndpointsApiService,
3593
3520
  OrgInfoApiService,
3594
- OffersApiService,
3595
3521
  UIDefinitionsApiService,
3596
3522
  VeloceObjectsApiService,
3597
3523
  StatefulConfigurationApiService,
@@ -3614,5 +3540,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
3614
3540
  * Generated bundle index. Do not edit.
3615
3541
  */
3616
3542
 
3617
- export { AccountApiService, ApiModule, CatalogAdminApiService, CatalogApiService, ConfigurationApiService, ConfigurationProcessorsApiService, ConfigurationSettingsApiService, ContextApiService, ContractedPriceApiService, DeltaApiService, DocumentAttachmentApiService, DocumentTemplatesApiService, EndpointsApiService, FlowStateApiService, FlowsApiService, GuidedSellingApiService, GuidedSellingsAdminApiService, OffersApiService, OrgInfoApiService, PicklistsApiService, PortalsApiService, PriceApiService, ProceduresApiService, ProductApiService, ProductModelApiService, PromotionsApiService, QuoteApiService, RampApiService, RebateProgramApiService, RebateTypeApiService, RlmApiService, RlmQuoteApiService, RuleGroupsApiService, RulesApiService, SalesforceApiService, SandboxManagerApiService, ScriptsApiService, ShoppingCartSettingsApiService, StatefulConfigurationApiService, UIDefinitionsApiService, UITemplatesApiService, VeloceAuthService, VeloceObjectsApiService, fromUIComponentStoryDTO, handleCanvasResponse };
3543
+ export { AccountApiService, ApiModule, CatalogAdminApiService, CatalogApiService, ConfigurationApiService, ConfigurationProcessorsApiService, ConfigurationSettingsApiService, ContextApiService, ContractedPriceApiService, DeltaApiService, DocumentAttachmentApiService, DocumentTemplatesApiService, EndpointsApiService, FlowStateApiService, FlowsApiService, GuidedSellingApiService, GuidedSellingsAdminApiService, OrgInfoApiService, PicklistsApiService, PortalsApiService, PriceApiService, ProceduresApiService, ProductApiService, ProductModelApiService, PromotionsApiService, QuoteApiService, RampApiService, RebateProgramApiService, RebateTypeApiService, RlmApiService, RlmQuoteApiService, RuleGroupsApiService, RulesApiService, SalesforceApiService, SandboxManagerApiService, ScriptsApiService, ShoppingCartSettingsApiService, StatefulConfigurationApiService, UIDefinitionsApiService, UITemplatesApiService, VeloceAuthService, VeloceObjectsApiService, fromUIComponentStoryDTO, handleCanvasResponse };
3618
3544
  //# sourceMappingURL=veloceapps-api.mjs.map