@veloceapps/api 11.0.0-11 → 11.0.0-13
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.
- package/esm2020/index.mjs +2 -45
- package/esm2020/src/index.mjs +34 -0
- package/esm2020/src/lib/api.module.mjs +114 -0
- package/esm2020/src/lib/services/account-api.service.mjs +87 -0
- package/esm2020/src/lib/services/auth.service.mjs +22 -0
- package/esm2020/src/lib/services/catalog-admin-api.service.mjs +192 -0
- package/esm2020/src/lib/services/catalog-api.service.mjs +90 -0
- package/esm2020/src/lib/services/configuration-api.service.mjs +122 -0
- package/esm2020/src/lib/services/configuration-settings-api.service.mjs +96 -0
- package/esm2020/src/lib/services/contracted-price-api.service.mjs +45 -0
- package/esm2020/src/lib/services/delta-api.service.mjs +23 -0
- package/esm2020/src/lib/services/document-attachment-api.service.mjs +66 -0
- package/esm2020/src/lib/services/endpoints-api.service.mjs +80 -0
- package/esm2020/src/lib/services/flow-state-api.mjs +142 -0
- package/esm2020/src/lib/services/flows-api.service.mjs +29 -0
- package/esm2020/src/lib/services/guided-sellings-admin-api.service.mjs +65 -0
- package/esm2020/src/lib/services/guided-sellings-api.service.mjs +37 -0
- package/esm2020/src/lib/services/offers-api.service.mjs +76 -0
- package/esm2020/src/lib/services/org-info-api.service.mjs +54 -0
- package/esm2020/src/lib/services/picklists-api.service.mjs +41 -0
- package/esm2020/src/lib/services/portals-api.service.mjs +76 -0
- package/esm2020/src/lib/services/price-api.service.mjs +63 -0
- package/esm2020/src/lib/services/product-api.service.mjs +153 -0
- package/esm2020/src/lib/services/product-model-api.service.mjs +223 -0
- package/esm2020/src/lib/services/promotions-api.service.mjs +68 -0
- package/esm2020/src/lib/services/ramp-api.service.mjs +31 -0
- package/esm2020/src/lib/services/rebate-program-api.service.mjs +68 -0
- package/esm2020/src/lib/services/rebate-type-api.service.mjs +68 -0
- package/esm2020/src/lib/services/salesforce-api.service.mjs +79 -0
- package/esm2020/src/lib/services/sandbox-manager-api.service.mjs +94 -0
- package/esm2020/src/lib/services/shopping-cart-settings-api.service.mjs +28 -0
- package/esm2020/src/lib/services/stateful-configuration-api.mjs +51 -0
- package/esm2020/src/lib/services/veloce-objects-api.service.mjs +90 -0
- package/esm2020/src/lib/types/attachment.types.mjs +2 -0
- package/esm2020/src/lib/types/auth.types.mjs +2 -0
- package/esm2020/src/lib/types/clone-request.types.mjs +2 -0
- package/esm2020/src/lib/types/delta-request.types.mjs +2 -0
- package/esm2020/src/lib/types/dto/configuration-settings-dto.types.mjs +22 -0
- package/esm2020/src/lib/types/dto/offers-dto.types.mjs +2 -0
- package/esm2020/src/lib/types/index.mjs +8 -0
- package/esm2020/src/lib/types/org-info.types.mjs +2 -0
- package/esm2020/src/lib/types/price.types.mjs +2 -0
- package/esm2020/src/lib/types/quote.types.mjs +2 -0
- package/esm2020/src/lib/types/ramp-request.types.mjs +2 -0
- package/esm2020/src/lib/types/search-request.types.mjs +2 -0
- package/esm2020/src/lib/types/stateful-configuration.types.mjs +2 -0
- package/esm2020/src/lib/utils/canvas.utils.mjs +33 -0
- package/esm2020/src/lib/utils/index.mjs +2 -0
- package/esm2020/v2/api-v2.module.mjs +48 -0
- package/esm2020/v2/index.mjs +4 -0
- package/esm2020/v2/services/configuration-processors-api.service.mjs +38 -0
- package/esm2020/v2/services/context-definition-api.service.mjs +62 -0
- package/esm2020/v2/services/index.mjs +13 -0
- package/esm2020/v2/services/procedures-admin-api.service.mjs +82 -0
- package/esm2020/v2/services/procedures-api.service.mjs +44 -0
- package/esm2020/v2/services/rule-groups-admin-api.service.mjs +62 -0
- package/esm2020/v2/services/rules-admin-api.service.mjs +98 -0
- package/esm2020/v2/services/rules-api.service.mjs +36 -0
- package/esm2020/v2/services/sales-transactions-api.service.mjs +68 -0
- package/esm2020/v2/services/scripts-admin-api.service.mjs +75 -0
- package/esm2020/v2/services/scripts-api.service.mjs +23 -0
- package/esm2020/v2/services/ui-definitions-api.service.mjs +132 -0
- package/esm2020/{lib → v2}/services/ui-templates-api.service.mjs +2 -2
- package/esm2020/v2/types/clone-request.types.mjs +2 -0
- package/esm2020/v2/types/dto/ui-template-dto.types.mjs +2 -0
- package/esm2020/v2/types/index.mjs +4 -0
- package/esm2020/v2/types/procedure.types.mjs +2 -0
- package/esm2020/v2/types/sales-transaction.types.mjs +2 -0
- package/esm2020/v2/utils/ui-template.utils.mjs +13 -0
- package/esm2020/v2/veloceapps-api-v2.mjs +5 -0
- package/esm2020/veloceapps-api.mjs +1 -1
- package/fesm2015/veloceapps-api-v2.mjs +1005 -0
- package/fesm2015/veloceapps-api-v2.mjs.map +1 -0
- package/fesm2015/veloceapps-api.mjs +8 -939
- package/fesm2015/veloceapps-api.mjs.map +1 -1
- package/fesm2020/veloceapps-api-v2.mjs +1019 -0
- package/fesm2020/veloceapps-api-v2.mjs.map +1 -0
- package/fesm2020/veloceapps-api.mjs +78 -1033
- package/fesm2020/veloceapps-api.mjs.map +1 -1
- package/index.d.ts +1 -44
- package/package.json +9 -1
- package/src/index.d.ts +33 -0
- package/{lib → src/lib}/api.module.d.ts +2 -1
- package/src/lib/utils/index.d.ts +1 -0
- package/v2/api-v2.module.d.ts +7 -0
- package/v2/index.d.ts +3 -0
- package/{lib/services/rlm-api.service.d.ts → v2/services/context-definition-api.service.d.ts} +3 -3
- package/v2/services/index.d.ts +12 -0
- package/{lib/services/procedures-api.service.d.ts → v2/services/procedures-admin-api.service.d.ts} +6 -13
- package/v2/services/procedures-api.service.d.ts +15 -0
- package/{lib/services/rule-groups-api.service.d.ts → v2/services/rule-groups-admin-api.service.d.ts} +3 -3
- package/{lib/services/rules-api.service.d.ts → v2/services/rules-admin-api.service.d.ts} +4 -4
- package/v2/services/rules-api.service.d.ts +11 -0
- package/v2/services/sales-transactions-api.service.d.ts +20 -0
- package/{lib/services/scripts-api.service.d.ts → v2/services/scripts-admin-api.service.d.ts} +4 -5
- package/v2/services/scripts-api.service.d.ts +11 -0
- package/{lib → v2}/services/ui-definitions-api.service.d.ts +5 -2
- package/v2/types/clone-request.types.d.ts +5 -0
- package/v2/types/index.d.ts +3 -0
- package/v2/types/procedure.types.d.ts +10 -0
- package/v2/types/sales-transaction.types.d.ts +10 -0
- package/esm2020/lib/api.module.mjs +0 -146
- package/esm2020/lib/services/account-api.service.mjs +0 -87
- package/esm2020/lib/services/auth.service.mjs +0 -22
- package/esm2020/lib/services/catalog-admin-api.service.mjs +0 -192
- package/esm2020/lib/services/catalog-api.service.mjs +0 -90
- package/esm2020/lib/services/configuration-api.service.mjs +0 -122
- package/esm2020/lib/services/configuration-processors-api.service.mjs +0 -38
- package/esm2020/lib/services/configuration-settings-api.service.mjs +0 -96
- package/esm2020/lib/services/context-api.service.mjs +0 -26
- package/esm2020/lib/services/contracted-price-api.service.mjs +0 -45
- package/esm2020/lib/services/delta-api.service.mjs +0 -23
- package/esm2020/lib/services/document-attachment-api.service.mjs +0 -66
- package/esm2020/lib/services/endpoints-api.service.mjs +0 -80
- package/esm2020/lib/services/flow-state-api.mjs +0 -142
- package/esm2020/lib/services/flows-api.service.mjs +0 -29
- package/esm2020/lib/services/guided-sellings-admin-api.service.mjs +0 -65
- package/esm2020/lib/services/guided-sellings-api.service.mjs +0 -37
- package/esm2020/lib/services/offers-api.service.mjs +0 -76
- package/esm2020/lib/services/org-info-api.service.mjs +0 -54
- package/esm2020/lib/services/picklists-api.service.mjs +0 -41
- package/esm2020/lib/services/portals-api.service.mjs +0 -76
- package/esm2020/lib/services/price-api.service.mjs +0 -63
- package/esm2020/lib/services/procedures-api.service.mjs +0 -113
- package/esm2020/lib/services/product-api.service.mjs +0 -153
- package/esm2020/lib/services/product-model-api.service.mjs +0 -223
- package/esm2020/lib/services/promotions-api.service.mjs +0 -68
- package/esm2020/lib/services/quote-api.service.mjs +0 -56
- package/esm2020/lib/services/ramp-api.service.mjs +0 -31
- package/esm2020/lib/services/rebate-program-api.service.mjs +0 -68
- package/esm2020/lib/services/rebate-type-api.service.mjs +0 -68
- package/esm2020/lib/services/rlm-api.service.mjs +0 -64
- package/esm2020/lib/services/rlm-quote-api.service.mjs +0 -27
- package/esm2020/lib/services/rule-groups-api.service.mjs +0 -62
- package/esm2020/lib/services/rules-api.service.mjs +0 -98
- package/esm2020/lib/services/salesforce-api.service.mjs +0 -79
- package/esm2020/lib/services/sandbox-manager-api.service.mjs +0 -94
- package/esm2020/lib/services/scripts-api.service.mjs +0 -83
- package/esm2020/lib/services/shopping-cart-settings-api.service.mjs +0 -28
- package/esm2020/lib/services/stateful-configuration-api.mjs +0 -51
- package/esm2020/lib/services/ui-definitions-api.service.mjs +0 -122
- package/esm2020/lib/services/veloce-objects-api.service.mjs +0 -90
- package/esm2020/lib/types/attachment.types.mjs +0 -2
- package/esm2020/lib/types/auth.types.mjs +0 -2
- package/esm2020/lib/types/clone-request.types.mjs +0 -2
- package/esm2020/lib/types/delta-request.types.mjs +0 -2
- package/esm2020/lib/types/dto/configuration-settings-dto.types.mjs +0 -22
- package/esm2020/lib/types/dto/offers-dto.types.mjs +0 -2
- package/esm2020/lib/types/dto/ui-template-dto.types.mjs +0 -2
- package/esm2020/lib/types/index.mjs +0 -8
- package/esm2020/lib/types/org-info.types.mjs +0 -2
- package/esm2020/lib/types/price.types.mjs +0 -2
- package/esm2020/lib/types/quote.types.mjs +0 -2
- package/esm2020/lib/types/ramp-request.types.mjs +0 -2
- package/esm2020/lib/types/search-request.types.mjs +0 -2
- package/esm2020/lib/types/stateful-configuration.types.mjs +0 -2
- package/esm2020/lib/utils/canvas.utils.mjs +0 -33
- package/esm2020/lib/utils/index.mjs +0 -3
- package/esm2020/lib/utils/ui-template.utils.mjs +0 -13
- package/lib/services/context-api.service.d.ts +0 -11
- package/lib/services/quote-api.service.d.ts +0 -22
- package/lib/services/rlm-quote-api.service.d.ts +0 -11
- package/lib/utils/index.d.ts +0 -2
- /package/{lib → src/lib}/services/account-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/auth.service.d.ts +0 -0
- /package/{lib → src/lib}/services/catalog-admin-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/catalog-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/configuration-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/configuration-settings-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/contracted-price-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/delta-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/document-attachment-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/endpoints-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/flow-state-api.d.ts +0 -0
- /package/{lib → src/lib}/services/flows-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/guided-sellings-admin-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/guided-sellings-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/offers-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/org-info-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/picklists-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/portals-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/price-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/product-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/product-model-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/promotions-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/ramp-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/rebate-program-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/rebate-type-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/salesforce-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/sandbox-manager-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/shopping-cart-settings-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/stateful-configuration-api.d.ts +0 -0
- /package/{lib → src/lib}/services/veloce-objects-api.service.d.ts +0 -0
- /package/{lib → src/lib}/types/attachment.types.d.ts +0 -0
- /package/{lib → src/lib}/types/auth.types.d.ts +0 -0
- /package/{lib → src/lib}/types/clone-request.types.d.ts +0 -0
- /package/{lib → src/lib}/types/delta-request.types.d.ts +0 -0
- /package/{lib → src/lib}/types/dto/configuration-settings-dto.types.d.ts +0 -0
- /package/{lib → src/lib}/types/dto/offers-dto.types.d.ts +0 -0
- /package/{lib → src/lib}/types/index.d.ts +0 -0
- /package/{lib → src/lib}/types/org-info.types.d.ts +0 -0
- /package/{lib → src/lib}/types/price.types.d.ts +0 -0
- /package/{lib → src/lib}/types/quote.types.d.ts +0 -0
- /package/{lib → src/lib}/types/ramp-request.types.d.ts +0 -0
- /package/{lib → src/lib}/types/search-request.types.d.ts +0 -0
- /package/{lib → src/lib}/types/stateful-configuration.types.d.ts +0 -0
- /package/{lib → src/lib}/utils/canvas.utils.d.ts +0 -0
- /package/{lib → v2}/services/configuration-processors-api.service.d.ts +0 -0
- /package/{lib → v2}/services/ui-templates-api.service.d.ts +0 -0
- /package/{lib → v2}/types/dto/ui-template-dto.types.d.ts +0 -0
- /package/{lib → v2}/utils/ui-template.utils.d.ts +0 -0
@@ -2,12 +2,13 @@ import * as i1$1 from '@angular/common/http';
|
|
2
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
|
+
import { ApiV2Module } from '@veloceapps/api/v2';
|
5
6
|
import * as i1 from '@veloceapps/core';
|
6
|
-
import { uiDefinitionFromDTO, DomainComputation,
|
7
|
-
import { noop, throwError, switchMap, of, map as map$1, from, catchError as catchError$1
|
7
|
+
import { uiDefinitionFromDTO, DomainComputation, Expression, Operator, isApexError, isCanvasError, ModelTranslatorUtils, EntityUtil, parseJsonSafely, BaseHttpService, XrayService } from '@veloceapps/core';
|
8
|
+
import { noop, throwError, switchMap, of, map as map$1, from, catchError as catchError$1 } from 'rxjs';
|
8
9
|
import { map, catchError, tap } from 'rxjs/operators';
|
9
10
|
import * as i1$2 from 'primeng/api';
|
10
|
-
import { isArray
|
11
|
+
import { isArray } from 'lodash';
|
11
12
|
|
12
13
|
class AccountApiService {
|
13
14
|
constructor(httpService) {
|
@@ -499,41 +500,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
499
500
|
type: Injectable
|
500
501
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
501
502
|
|
502
|
-
class ConfigurationProcessorsApiService {
|
503
|
-
constructor(baseHttpService) {
|
504
|
-
this.baseHttpService = baseHttpService;
|
505
|
-
this.serviceUrl = '/configuration/processors/owners';
|
506
|
-
this.fetchConfigurationProcessors$ = (ownerId) => {
|
507
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/${ownerId}` });
|
508
|
-
};
|
509
|
-
this.createConfigurationProcessors$ = (configurationProcessor) => {
|
510
|
-
return this.baseHttpService.api({
|
511
|
-
method: 'post',
|
512
|
-
url: `${this.serviceUrl}/${configurationProcessor.ownerId}`,
|
513
|
-
body: configurationProcessor,
|
514
|
-
});
|
515
|
-
};
|
516
|
-
this.updateConfigurationProcessors$ = (configurationProcessor) => {
|
517
|
-
return this.baseHttpService.api({
|
518
|
-
method: 'put',
|
519
|
-
url: `${this.serviceUrl}/${configurationProcessor.ownerId}/${configurationProcessor.id}`,
|
520
|
-
body: configurationProcessor,
|
521
|
-
});
|
522
|
-
};
|
523
|
-
this.deleteConfigurationProcessors$ = (configurationProcessor) => {
|
524
|
-
return this.baseHttpService.api({
|
525
|
-
method: 'delete',
|
526
|
-
url: `${this.serviceUrl}/${configurationProcessor.ownerId}/${configurationProcessor.id}`,
|
527
|
-
});
|
528
|
-
};
|
529
|
-
}
|
530
|
-
}
|
531
|
-
ConfigurationProcessorsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
532
|
-
ConfigurationProcessorsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService });
|
533
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService, decorators: [{
|
534
|
-
type: Injectable
|
535
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
536
|
-
|
537
503
|
class ConfigurationSettingsDTO {
|
538
504
|
static fromDTO(dto, key) {
|
539
505
|
return {
|
@@ -644,28 +610,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
644
610
|
type: Injectable
|
645
611
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i1$2.MessageService }]; } });
|
646
612
|
|
647
|
-
class ContextApiService {
|
648
|
-
constructor(httpService) {
|
649
|
-
this.httpService = httpService;
|
650
|
-
this.SERVICE_URL = '/context';
|
651
|
-
}
|
652
|
-
getContext(headerId, mode) {
|
653
|
-
return this.httpService.api({
|
654
|
-
method: 'post',
|
655
|
-
body: {
|
656
|
-
headerId: headerId,
|
657
|
-
contextMode: ConfigurationContextMode[mode],
|
658
|
-
},
|
659
|
-
url: `${this.SERVICE_URL}`,
|
660
|
-
});
|
661
|
-
}
|
662
|
-
}
|
663
|
-
ContextApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
664
|
-
ContextApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextApiService });
|
665
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextApiService, decorators: [{
|
666
|
-
type: Injectable
|
667
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
668
|
-
|
669
613
|
class ContractedPriceApiService {
|
670
614
|
constructor(baseHttpService) {
|
671
615
|
this.baseHttpService = baseHttpService;
|
@@ -1442,113 +1386,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1442
1386
|
type: Injectable
|
1443
1387
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1444
1388
|
|
1445
|
-
class ProceduresApiService {
|
1446
|
-
constructor(baseHttpService) {
|
1447
|
-
this.baseHttpService = baseHttpService;
|
1448
|
-
this.ADMIN_SERVICE_URL = '/admin/procedures';
|
1449
|
-
this.SERVICE_URL = '/procedures';
|
1450
|
-
this.fetchProcedures$ = () => {
|
1451
|
-
return this.searchProcedures$(new Expression(), 0, 100);
|
1452
|
-
};
|
1453
|
-
this.searchProcedures$ = (expression, skip, count) => {
|
1454
|
-
let params = new HttpParams();
|
1455
|
-
params = params.set('skip', '' + skip);
|
1456
|
-
params = params.set('count', '' + count);
|
1457
|
-
return this.baseHttpService.api({
|
1458
|
-
method: 'post',
|
1459
|
-
url: `${this.ADMIN_SERVICE_URL}/search`,
|
1460
|
-
params,
|
1461
|
-
body: expression,
|
1462
|
-
});
|
1463
|
-
};
|
1464
|
-
this.createProcedure$ = (newProcedure) => {
|
1465
|
-
return this.baseHttpService.api({
|
1466
|
-
url: `${this.ADMIN_SERVICE_URL}`,
|
1467
|
-
method: 'post',
|
1468
|
-
body: newProcedure,
|
1469
|
-
});
|
1470
|
-
};
|
1471
|
-
this.updateProcedure$ = (procedure) => {
|
1472
|
-
return this.baseHttpService.api({
|
1473
|
-
url: `${this.ADMIN_SERVICE_URL}/${procedure.id}`,
|
1474
|
-
method: 'put',
|
1475
|
-
body: procedure,
|
1476
|
-
});
|
1477
|
-
};
|
1478
|
-
this.duplicateProcedure$ = (body) => {
|
1479
|
-
return this.baseHttpService
|
1480
|
-
.api({
|
1481
|
-
url: `${this.ADMIN_SERVICE_URL}/${body.id}/clone`,
|
1482
|
-
method: 'post',
|
1483
|
-
body,
|
1484
|
-
})
|
1485
|
-
.pipe(map(response => response.clonedRecordId));
|
1486
|
-
};
|
1487
|
-
this.removeProcedure$ = (id) => {
|
1488
|
-
return this.baseHttpService.api({
|
1489
|
-
url: `${this.ADMIN_SERVICE_URL}/${id}`,
|
1490
|
-
method: 'delete',
|
1491
|
-
});
|
1492
|
-
};
|
1493
|
-
this.restoreProcedure$ = (id) => {
|
1494
|
-
return this.baseHttpService.api({
|
1495
|
-
url: `${this.ADMIN_SERVICE_URL}/${id}/restore`,
|
1496
|
-
method: 'patch',
|
1497
|
-
});
|
1498
|
-
};
|
1499
|
-
}
|
1500
|
-
fetchProcedure$(id) {
|
1501
|
-
return this.baseHttpService.api({
|
1502
|
-
url: `${this.ADMIN_SERVICE_URL}/${id}`,
|
1503
|
-
method: 'get',
|
1504
|
-
});
|
1505
|
-
}
|
1506
|
-
execute$(body) {
|
1507
|
-
return this.baseHttpService.api({
|
1508
|
-
url: `${this.SERVICE_URL}/execute`,
|
1509
|
-
method: 'post',
|
1510
|
-
body,
|
1511
|
-
});
|
1512
|
-
}
|
1513
|
-
catalogExecute$(body) {
|
1514
|
-
return this.baseHttpService.api({
|
1515
|
-
url: `${this.SERVICE_URL}/catalog/execute`,
|
1516
|
-
method: 'post',
|
1517
|
-
body,
|
1518
|
-
});
|
1519
|
-
}
|
1520
|
-
rlmExecute$(body) {
|
1521
|
-
return this.baseHttpService.api({
|
1522
|
-
url: `${this.SERVICE_URL}/rlm/execute`,
|
1523
|
-
method: 'post',
|
1524
|
-
body,
|
1525
|
-
});
|
1526
|
-
}
|
1527
|
-
/**
|
1528
|
-
* Run active procedure against QuoteDraft
|
1529
|
-
* @param body
|
1530
|
-
* @returns
|
1531
|
-
*/
|
1532
|
-
apply$(body) {
|
1533
|
-
return this.baseHttpService.api({
|
1534
|
-
url: `${this.SERVICE_URL}/apply`,
|
1535
|
-
method: 'post',
|
1536
|
-
body,
|
1537
|
-
});
|
1538
|
-
}
|
1539
|
-
fetchDefaultPricingSteps$() {
|
1540
|
-
return this.baseHttpService.api({
|
1541
|
-
url: `${this.ADMIN_SERVICE_URL}/pricing-steps`,
|
1542
|
-
method: 'get',
|
1543
|
-
});
|
1544
|
-
}
|
1545
|
-
}
|
1546
|
-
ProceduresApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1547
|
-
ProceduresApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService });
|
1548
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService, decorators: [{
|
1549
|
-
type: Injectable
|
1550
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1551
|
-
|
1552
1389
|
class ProductApiService {
|
1553
1390
|
constructor(baseHttpService) {
|
1554
1391
|
this.baseHttpService = baseHttpService;
|
@@ -1978,59 +1815,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1978
1815
|
type: Injectable
|
1979
1816
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1980
1817
|
|
1981
|
-
class QuoteApiService {
|
1982
|
-
constructor(httpService) {
|
1983
|
-
this.httpService = httpService;
|
1984
|
-
this.SERVICE_URL = '/quotes';
|
1985
|
-
}
|
1986
|
-
/**
|
1987
|
-
* This endpoint doesn't include orders and assets
|
1988
|
-
* @param objectId quoteId | accountId | opportunityId | orderId
|
1989
|
-
* @param params Query params
|
1990
|
-
* @param options Request options
|
1991
|
-
*/
|
1992
|
-
getQuoteState(objectId, params, options) {
|
1993
|
-
return this.httpService.api({
|
1994
|
-
method: 'get',
|
1995
|
-
url: `/v2${this.SERVICE_URL}/${objectId}`,
|
1996
|
-
params,
|
1997
|
-
...options,
|
1998
|
-
});
|
1999
|
-
}
|
2000
|
-
upsertQuote(request, options) {
|
2001
|
-
return this.httpService.api({
|
2002
|
-
method: 'post',
|
2003
|
-
url: `${this.SERVICE_URL}`,
|
2004
|
-
body: request,
|
2005
|
-
...options,
|
2006
|
-
});
|
2007
|
-
}
|
2008
|
-
submitQuote(request, options) {
|
2009
|
-
return this.httpService.api({
|
2010
|
-
method: 'post',
|
2011
|
-
url: `${this.SERVICE_URL}/submit`,
|
2012
|
-
body: request,
|
2013
|
-
...options,
|
2014
|
-
});
|
2015
|
-
}
|
2016
|
-
attachDocument(id, documentName, data) {
|
2017
|
-
const formData = new FormData();
|
2018
|
-
const blob = new Blob([data]);
|
2019
|
-
formData.append('file', blob, documentName);
|
2020
|
-
return this.httpService.upload({
|
2021
|
-
url: `${this.SERVICE_URL}/${id}/attach-document`,
|
2022
|
-
responseType: 'arraybuffer',
|
2023
|
-
method: 'post',
|
2024
|
-
body: formData,
|
2025
|
-
});
|
2026
|
-
}
|
2027
|
-
}
|
2028
|
-
QuoteApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2029
|
-
QuoteApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService });
|
2030
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService, decorators: [{
|
2031
|
-
type: Injectable
|
2032
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2033
|
-
|
2034
1818
|
class RampApiService {
|
2035
1819
|
constructor(httpService) {
|
2036
1820
|
this.httpService = httpService;
|
@@ -2185,322 +1969,91 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
2185
1969
|
type: Injectable
|
2186
1970
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2187
1971
|
|
2188
|
-
class
|
2189
|
-
constructor(
|
2190
|
-
this.
|
2191
|
-
this.
|
2192
|
-
}
|
2193
|
-
fetchContextDefinitions$() {
|
2194
|
-
return this.baseHttpService
|
2195
|
-
.api({ url: `${this.serviceUrl}/context`, skipErrorHandler: true })
|
2196
|
-
.pipe(catchError(() => {
|
2197
|
-
return of([]);
|
2198
|
-
}));
|
2199
|
-
}
|
2200
|
-
fetchContextMappings$(id) {
|
2201
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/context/${id}/mappings` });
|
1972
|
+
class SalesforceApiService {
|
1973
|
+
constructor(httpService) {
|
1974
|
+
this.httpService = httpService;
|
1975
|
+
this.SERVICE_URL = '/proxy';
|
2202
1976
|
}
|
2203
|
-
|
2204
|
-
return this.
|
2205
|
-
|
2206
|
-
|
2207
|
-
|
2208
|
-
|
2209
|
-
|
2210
|
-
return of([]);
|
2211
|
-
}), map(objects => {
|
2212
|
-
return objects.map(object => {
|
2213
|
-
const tag = object.tags?.[0]?.title;
|
2214
|
-
const objectAttributes = object.attributes || [];
|
2215
|
-
return {
|
2216
|
-
id: object.id,
|
2217
|
-
title: tag || object.title,
|
2218
|
-
attributes: objectAttributes.map(attribute => {
|
2219
|
-
const tag = attribute.tags?.[0]?.title;
|
2220
|
-
return {
|
2221
|
-
title: tag || attribute.title,
|
2222
|
-
fieldType: attribute.fieldType,
|
2223
|
-
dataType: attribute.dataType,
|
2224
|
-
};
|
2225
|
-
}),
|
2226
|
-
};
|
2227
|
-
});
|
2228
|
-
}));
|
1977
|
+
query(searchRequest, objectName, options) {
|
1978
|
+
return this.httpService.api({
|
1979
|
+
method: 'post',
|
1980
|
+
body: { ...searchRequest, count: searchRequest.count || 100 },
|
1981
|
+
url: `${this.SERVICE_URL}/query/${objectName}`,
|
1982
|
+
...options,
|
1983
|
+
});
|
2229
1984
|
}
|
2230
|
-
|
2231
|
-
|
2232
|
-
if (
|
2233
|
-
params
|
1985
|
+
queryObjects(search, options) {
|
1986
|
+
let params = new HttpParams();
|
1987
|
+
if (search) {
|
1988
|
+
params = params.append('search', search);
|
2234
1989
|
}
|
2235
|
-
return this.
|
2236
|
-
url: `${this.
|
1990
|
+
return this.httpService.api({
|
1991
|
+
url: `${this.SERVICE_URL}/query`,
|
2237
1992
|
params,
|
1993
|
+
...options,
|
2238
1994
|
});
|
2239
1995
|
}
|
2240
|
-
|
2241
|
-
|
2242
|
-
|
2243
|
-
|
2244
|
-
|
2245
|
-
}
|
2246
|
-
|
2247
|
-
class RlmQuoteApiService {
|
2248
|
-
constructor(httpService) {
|
2249
|
-
this.httpService = httpService;
|
2250
|
-
this.SERVICE_URL = '/quotes/rlm';
|
1996
|
+
search(req, options) {
|
1997
|
+
return this.httpService.api({
|
1998
|
+
url: `${this.SERVICE_URL}/rest/search`,
|
1999
|
+
params: { q: req.searchString },
|
2000
|
+
...options,
|
2001
|
+
});
|
2251
2002
|
}
|
2252
|
-
|
2253
|
-
const
|
2254
|
-
|
2255
|
-
|
2256
|
-
|
2003
|
+
describeObject(objectName, options) {
|
2004
|
+
const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields`;
|
2005
|
+
return this.httpService.api({ url: methodUrl, ...options });
|
2006
|
+
}
|
2007
|
+
describeField(objectName, fieldName, options) {
|
2008
|
+
const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields/${fieldName}`;
|
2009
|
+
return this.httpService.api({ url: methodUrl, ...options });
|
2010
|
+
}
|
2011
|
+
describe2(objectName, fields, options) {
|
2012
|
+
const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields`;
|
2013
|
+
return this.httpService.api({ method: 'post', url: methodUrl, body: fields, ...options });
|
2014
|
+
}
|
2015
|
+
apexGetRequest(path, params, options) {
|
2016
|
+
// this line is needed because HttpParams instance from Integration behaves wrong in studio instance of Angular
|
2017
|
+
const httpParams = new HttpParams({ fromString: params.toString() });
|
2018
|
+
return this.httpService.api({ url: `${this.SERVICE_URL}/apex${path}`, params: httpParams, ...options });
|
2019
|
+
}
|
2020
|
+
apexPostRequest(path, body, options) {
|
2257
2021
|
return this.httpService.api({
|
2258
|
-
method: '
|
2259
|
-
|
2260
|
-
|
2022
|
+
method: 'post',
|
2023
|
+
body,
|
2024
|
+
url: `${this.SERVICE_URL}/apex${path}`,
|
2261
2025
|
...options,
|
2262
2026
|
});
|
2263
2027
|
}
|
2028
|
+
getGlobalPicklists() {
|
2029
|
+
return this.httpService.api({
|
2030
|
+
method: 'get',
|
2031
|
+
url: `${this.SERVICE_URL}/globalvalueset`,
|
2032
|
+
});
|
2033
|
+
}
|
2034
|
+
getGlobalPicklistValues(id) {
|
2035
|
+
return this.httpService.api({
|
2036
|
+
method: 'get',
|
2037
|
+
url: `${this.SERVICE_URL}/globalvalueset/${id}/values`,
|
2038
|
+
});
|
2039
|
+
}
|
2264
2040
|
}
|
2265
|
-
|
2266
|
-
|
2267
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type:
|
2041
|
+
SalesforceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2042
|
+
SalesforceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService });
|
2043
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, decorators: [{
|
2268
2044
|
type: Injectable
|
2269
2045
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2270
2046
|
|
2271
|
-
class
|
2272
|
-
constructor(
|
2273
|
-
this.
|
2274
|
-
|
2275
|
-
|
2276
|
-
|
2277
|
-
|
2278
|
-
|
2279
|
-
|
2280
|
-
|
2281
|
-
params = params.set('count', '' + count);
|
2282
|
-
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2283
|
-
};
|
2284
|
-
this.createRuleGroup$ = (ruleGroup) => {
|
2285
|
-
return this.baseHttpService.api({
|
2286
|
-
url: `${this.serviceUrl}`,
|
2287
|
-
method: 'post',
|
2288
|
-
body: ruleGroup,
|
2289
|
-
});
|
2290
|
-
};
|
2291
|
-
this.updateRuleGroup$ = (ruleGroup) => {
|
2292
|
-
return this.baseHttpService.api({
|
2293
|
-
url: `${this.serviceUrl}/${ruleGroup.id}`,
|
2294
|
-
method: 'post',
|
2295
|
-
body: ruleGroup,
|
2296
|
-
});
|
2297
|
-
};
|
2298
|
-
this.duplicateRuleGroup$ = (body) => {
|
2299
|
-
return this.baseHttpService
|
2300
|
-
.api({
|
2301
|
-
url: `${this.serviceUrl}/${body.id}/clone`,
|
2302
|
-
method: 'post',
|
2303
|
-
body,
|
2304
|
-
})
|
2305
|
-
.pipe(map$1(response => response.clonedRecordId));
|
2306
|
-
};
|
2307
|
-
this.removeRuleGroup$ = (id) => {
|
2308
|
-
return this.baseHttpService.api({
|
2309
|
-
url: `${this.serviceUrl}/${id}`,
|
2310
|
-
method: 'delete',
|
2311
|
-
});
|
2312
|
-
};
|
2313
|
-
this.restoreRuleGroup$ = (id) => {
|
2314
|
-
return this.baseHttpService.api({
|
2315
|
-
url: `${this.serviceUrl}/${id}/restore`,
|
2316
|
-
method: 'patch',
|
2317
|
-
});
|
2318
|
-
};
|
2319
|
-
}
|
2320
|
-
}
|
2321
|
-
RuleGroupsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2322
|
-
RuleGroupsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService });
|
2323
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService, decorators: [{
|
2324
|
-
type: Injectable
|
2325
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2326
|
-
|
2327
|
-
class RulesApiService {
|
2328
|
-
constructor(baseHttpService) {
|
2329
|
-
this.baseHttpService = baseHttpService;
|
2330
|
-
this.serviceUrl = '/admin/rules';
|
2331
|
-
this.fetchRules$ = () => {
|
2332
|
-
return this.searchRules$(new Expression(), 0, 100);
|
2333
|
-
};
|
2334
|
-
this.searchRules$ = (expression, skip, count) => {
|
2335
|
-
let params = new HttpParams();
|
2336
|
-
if (typeof skip === 'number') {
|
2337
|
-
params = params.set('skip', '' + skip);
|
2338
|
-
}
|
2339
|
-
if (typeof count === 'number') {
|
2340
|
-
params = params.set('count', '' + count);
|
2341
|
-
}
|
2342
|
-
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2343
|
-
};
|
2344
|
-
this.createRule$ = (rule) => {
|
2345
|
-
return this.baseHttpService.api({
|
2346
|
-
url: `${this.serviceUrl}`,
|
2347
|
-
method: 'post',
|
2348
|
-
body: rule,
|
2349
|
-
});
|
2350
|
-
};
|
2351
|
-
this.updateRule$ = (rule) => {
|
2352
|
-
return this.baseHttpService.api({
|
2353
|
-
url: `${this.serviceUrl}/${rule.id}`,
|
2354
|
-
method: 'put',
|
2355
|
-
body: rule,
|
2356
|
-
});
|
2357
|
-
};
|
2358
|
-
this.duplicateRule$ = (body) => {
|
2359
|
-
return this.baseHttpService
|
2360
|
-
.api({
|
2361
|
-
url: `${this.serviceUrl}/${body.id}/clone`,
|
2362
|
-
method: 'post',
|
2363
|
-
body,
|
2364
|
-
})
|
2365
|
-
.pipe(map(response => response.clonedRecordId));
|
2366
|
-
};
|
2367
|
-
this.removeRule$ = (id) => {
|
2368
|
-
return this.baseHttpService.api({
|
2369
|
-
url: `${this.serviceUrl}/${id}`,
|
2370
|
-
method: 'delete',
|
2371
|
-
});
|
2372
|
-
};
|
2373
|
-
this.restoreRule$ = (id) => {
|
2374
|
-
return this.baseHttpService.api({
|
2375
|
-
url: `${this.serviceUrl}/${id}/restore`,
|
2376
|
-
method: 'patch',
|
2377
|
-
});
|
2378
|
-
};
|
2379
|
-
}
|
2380
|
-
fetchRule$(id) {
|
2381
|
-
return this.baseHttpService.api({
|
2382
|
-
url: `${this.serviceUrl}/${id}`,
|
2383
|
-
method: 'get',
|
2384
|
-
});
|
2385
|
-
}
|
2386
|
-
fetchHeaderFields$() {
|
2387
|
-
return this.baseHttpService.api({
|
2388
|
-
url: `${this.serviceUrl}/describe/Header`,
|
2389
|
-
method: 'get',
|
2390
|
-
});
|
2391
|
-
}
|
2392
|
-
execute$(body) {
|
2393
|
-
const url = this.getExecuteRuleUrl(body.rule.ruleGroupType);
|
2394
|
-
return this.baseHttpService.api({
|
2395
|
-
url,
|
2396
|
-
method: 'post',
|
2397
|
-
body,
|
2398
|
-
});
|
2399
|
-
}
|
2400
|
-
getExecuteRuleUrl(ruleGroupType) {
|
2401
|
-
if (ruleGroupType === RuleGroupTypes.eligibility) {
|
2402
|
-
return '/rules/eligibility/execute';
|
2403
|
-
}
|
2404
|
-
if (ruleGroupType === RuleGroupTypes.catalog) {
|
2405
|
-
return '/rules/catalog/execute';
|
2406
|
-
}
|
2407
|
-
if (ruleGroupType === RuleGroupTypes.rlmContextBased) {
|
2408
|
-
return '/rules/rlm/execute';
|
2409
|
-
}
|
2410
|
-
return '/rules/execute';
|
2411
|
-
}
|
2412
|
-
}
|
2413
|
-
RulesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2414
|
-
RulesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService });
|
2415
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService, decorators: [{
|
2416
|
-
type: Injectable
|
2417
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2418
|
-
|
2419
|
-
class SalesforceApiService {
|
2420
|
-
constructor(httpService) {
|
2421
|
-
this.httpService = httpService;
|
2422
|
-
this.SERVICE_URL = '/proxy';
|
2423
|
-
}
|
2424
|
-
query(searchRequest, objectName, options) {
|
2425
|
-
return this.httpService.api({
|
2426
|
-
method: 'post',
|
2427
|
-
body: { ...searchRequest, count: searchRequest.count || 100 },
|
2428
|
-
url: `${this.SERVICE_URL}/query/${objectName}`,
|
2429
|
-
...options,
|
2430
|
-
});
|
2431
|
-
}
|
2432
|
-
queryObjects(search, options) {
|
2433
|
-
let params = new HttpParams();
|
2434
|
-
if (search) {
|
2435
|
-
params = params.append('search', search);
|
2436
|
-
}
|
2437
|
-
return this.httpService.api({
|
2438
|
-
url: `${this.SERVICE_URL}/query`,
|
2439
|
-
params,
|
2440
|
-
...options,
|
2441
|
-
});
|
2442
|
-
}
|
2443
|
-
search(req, options) {
|
2444
|
-
return this.httpService.api({
|
2445
|
-
url: `${this.SERVICE_URL}/rest/search`,
|
2446
|
-
params: { q: req.searchString },
|
2447
|
-
...options,
|
2448
|
-
});
|
2449
|
-
}
|
2450
|
-
describeObject(objectName, options) {
|
2451
|
-
const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields`;
|
2452
|
-
return this.httpService.api({ url: methodUrl, ...options });
|
2453
|
-
}
|
2454
|
-
describeField(objectName, fieldName, options) {
|
2455
|
-
const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields/${fieldName}`;
|
2456
|
-
return this.httpService.api({ url: methodUrl, ...options });
|
2457
|
-
}
|
2458
|
-
describe2(objectName, fields, options) {
|
2459
|
-
const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields`;
|
2460
|
-
return this.httpService.api({ method: 'post', url: methodUrl, body: fields, ...options });
|
2461
|
-
}
|
2462
|
-
apexGetRequest(path, params, options) {
|
2463
|
-
// this line is needed because HttpParams instance from Integration behaves wrong in studio instance of Angular
|
2464
|
-
const httpParams = new HttpParams({ fromString: params.toString() });
|
2465
|
-
return this.httpService.api({ url: `${this.SERVICE_URL}/apex${path}`, params: httpParams, ...options });
|
2466
|
-
}
|
2467
|
-
apexPostRequest(path, body, options) {
|
2468
|
-
return this.httpService.api({
|
2469
|
-
method: 'post',
|
2470
|
-
body,
|
2471
|
-
url: `${this.SERVICE_URL}/apex${path}`,
|
2472
|
-
...options,
|
2473
|
-
});
|
2474
|
-
}
|
2475
|
-
getGlobalPicklists() {
|
2476
|
-
return this.httpService.api({
|
2477
|
-
method: 'get',
|
2478
|
-
url: `${this.SERVICE_URL}/globalvalueset`,
|
2479
|
-
});
|
2480
|
-
}
|
2481
|
-
getGlobalPicklistValues(id) {
|
2482
|
-
return this.httpService.api({
|
2483
|
-
method: 'get',
|
2484
|
-
url: `${this.SERVICE_URL}/globalvalueset/${id}/values`,
|
2485
|
-
});
|
2486
|
-
}
|
2487
|
-
}
|
2488
|
-
SalesforceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2489
|
-
SalesforceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService });
|
2490
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, decorators: [{
|
2491
|
-
type: Injectable
|
2492
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2493
|
-
|
2494
|
-
class SandboxManagerApiService {
|
2495
|
-
constructor(messageService) {
|
2496
|
-
this.messageService = messageService;
|
2497
|
-
/**
|
2498
|
-
* Shows an error message using the message service.
|
2499
|
-
*
|
2500
|
-
* @param {string} message - the error message to be published.
|
2501
|
-
*/
|
2502
|
-
this.publishErrorMessage = (message) => {
|
2503
|
-
this.messageService.add({ severity: 'error', summary: message, sticky: true });
|
2047
|
+
class SandboxManagerApiService {
|
2048
|
+
constructor(messageService) {
|
2049
|
+
this.messageService = messageService;
|
2050
|
+
/**
|
2051
|
+
* Shows an error message using the message service.
|
2052
|
+
*
|
2053
|
+
* @param {string} message - the error message to be published.
|
2054
|
+
*/
|
2055
|
+
this.publishErrorMessage = (message) => {
|
2056
|
+
this.messageService.add({ severity: 'error', summary: message, sticky: true });
|
2504
2057
|
};
|
2505
2058
|
}
|
2506
2059
|
getSalesforceOrganizations$() {
|
@@ -2580,84 +2133,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
2580
2133
|
type: Injectable
|
2581
2134
|
}], ctorParameters: function () { return [{ type: i1$2.MessageService }]; } });
|
2582
2135
|
|
2583
|
-
class ScriptsApiService {
|
2584
|
-
constructor(baseHttpService) {
|
2585
|
-
this.baseHttpService = baseHttpService;
|
2586
|
-
this.serviceUrl = '/admin/scripts';
|
2587
|
-
this.fetchScripts$ = () => {
|
2588
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}` });
|
2589
|
-
};
|
2590
|
-
this.searchScripts$ = (expression, skip, count) => {
|
2591
|
-
let params = new HttpParams();
|
2592
|
-
if (typeof skip === 'number') {
|
2593
|
-
params = params.set('skip', '' + skip);
|
2594
|
-
}
|
2595
|
-
if (typeof count === 'number') {
|
2596
|
-
params = params.set('count', '' + count);
|
2597
|
-
}
|
2598
|
-
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2599
|
-
};
|
2600
|
-
this.fetchScript$ = (id) => {
|
2601
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
2602
|
-
};
|
2603
|
-
this.createScript$ = (script) => {
|
2604
|
-
return this.baseHttpService.api({
|
2605
|
-
url: `${this.serviceUrl}`,
|
2606
|
-
method: 'post',
|
2607
|
-
body: script,
|
2608
|
-
});
|
2609
|
-
};
|
2610
|
-
this.updateScriptMeta$ = (script) => {
|
2611
|
-
return this.baseHttpService.api({
|
2612
|
-
url: `${this.serviceUrl}/${script.id}`,
|
2613
|
-
method: 'put',
|
2614
|
-
body: script,
|
2615
|
-
});
|
2616
|
-
};
|
2617
|
-
this.updateScriptDetails$ = (script) => {
|
2618
|
-
return this.baseHttpService.api({
|
2619
|
-
url: `${this.serviceUrl}/${script.id}`,
|
2620
|
-
method: 'put',
|
2621
|
-
body: script,
|
2622
|
-
});
|
2623
|
-
};
|
2624
|
-
this.cloneScript$ = (cloneRequest) => {
|
2625
|
-
return this.baseHttpService
|
2626
|
-
.api({
|
2627
|
-
url: `${this.serviceUrl}/${cloneRequest.id}/clone`,
|
2628
|
-
method: 'post',
|
2629
|
-
body: cloneRequest,
|
2630
|
-
})
|
2631
|
-
.pipe(map(response => response.clonedRecordId));
|
2632
|
-
};
|
2633
|
-
this.removeScript$ = (id) => {
|
2634
|
-
return this.baseHttpService.api({
|
2635
|
-
url: `${this.serviceUrl}/${id}`,
|
2636
|
-
method: 'delete',
|
2637
|
-
});
|
2638
|
-
};
|
2639
|
-
this.restoreScript$ = (id) => {
|
2640
|
-
return this.baseHttpService.api({
|
2641
|
-
url: `${this.serviceUrl}/${id}/restore`,
|
2642
|
-
method: 'patch',
|
2643
|
-
});
|
2644
|
-
};
|
2645
|
-
this.execute$ = (body) => {
|
2646
|
-
return this.baseHttpService.api({
|
2647
|
-
url: `/scripts/execute`,
|
2648
|
-
method: 'post',
|
2649
|
-
body,
|
2650
|
-
errorHandler: () => null,
|
2651
|
-
});
|
2652
|
-
};
|
2653
|
-
}
|
2654
|
-
}
|
2655
|
-
ScriptsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2656
|
-
ScriptsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService });
|
2657
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService, decorators: [{
|
2658
|
-
type: Injectable
|
2659
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2660
|
-
|
2661
2136
|
class ShoppingCartSettingsApiService {
|
2662
2137
|
constructor(configurationSettingsApiService) {
|
2663
2138
|
this.configurationSettingsApiService = configurationSettingsApiService;
|
@@ -2729,414 +2204,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
2729
2204
|
type: Injectable
|
2730
2205
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2731
2206
|
|
2732
|
-
class UIDefinitionsApiService {
|
2733
|
-
constructor(baseHttpService) {
|
2734
|
-
this.baseHttpService = baseHttpService;
|
2735
|
-
this.serviceUrl = '/uidefinitions';
|
2736
|
-
}
|
2737
|
-
fetch$(modelId, version) {
|
2738
|
-
const serviceUrl = this.getServiceUrl(modelId);
|
2739
|
-
let params = new HttpParams();
|
2740
|
-
if (version != null) {
|
2741
|
-
params = params.set('modelVersion', version);
|
2742
|
-
}
|
2743
|
-
return this.baseHttpService
|
2744
|
-
.api({
|
2745
|
-
method: 'get',
|
2746
|
-
url: serviceUrl,
|
2747
|
-
params: params,
|
2748
|
-
})
|
2749
|
-
.pipe(map$1(containers => containers.map(uiDefinitionFromDTO)));
|
2750
|
-
}
|
2751
|
-
create$(modelId, uiDefinitionContainer) {
|
2752
|
-
const serviceUrl = this.getServiceUrl(modelId);
|
2753
|
-
const dto = {
|
2754
|
-
...omit(uiDefinitionContainer, 'source'),
|
2755
|
-
name: uiDefinitionContainer.source.name,
|
2756
|
-
modelId: uiDefinitionContainer.source.modelId,
|
2757
|
-
templateName: uiDefinitionContainer.source.uiTemplateData?.TEMPLATE_NAME,
|
2758
|
-
rootType: uiDefinitionContainer.source.uiTemplateData?.ROOT_TYPE,
|
2759
|
-
defaultFlag: uiDefinitionContainer.source.primary,
|
2760
|
-
sourceBlob: JSON.stringify(uiDefinitionContainer.source),
|
2761
|
-
};
|
2762
|
-
return this.baseHttpService
|
2763
|
-
.api({
|
2764
|
-
method: 'post',
|
2765
|
-
url: serviceUrl,
|
2766
|
-
body: dto,
|
2767
|
-
})
|
2768
|
-
.pipe(map$1(container => uiDefinitionFromDTO(container)));
|
2769
|
-
}
|
2770
|
-
get$(modelId, uiDefinitionId) {
|
2771
|
-
const serviceUrl = this.getServiceUrl(modelId);
|
2772
|
-
return this.baseHttpService
|
2773
|
-
.api({
|
2774
|
-
method: 'get',
|
2775
|
-
url: `${serviceUrl}/${uiDefinitionId}`,
|
2776
|
-
})
|
2777
|
-
.pipe(map$1(container => uiDefinitionFromDTO({ ...container, id: uiDefinitionId })));
|
2778
|
-
}
|
2779
|
-
update$(uiDefinitionContainer) {
|
2780
|
-
const serviceUrl = this.getServiceUrl(uiDefinitionContainer.modelId);
|
2781
|
-
const dto = uiDefinitionToDTO(uiDefinitionContainer);
|
2782
|
-
return this.baseHttpService
|
2783
|
-
.api({
|
2784
|
-
method: 'put',
|
2785
|
-
url: `${serviceUrl}/${uiDefinitionContainer.id}`,
|
2786
|
-
body: dto,
|
2787
|
-
})
|
2788
|
-
.pipe(map$1(container => uiDefinitionFromDTO(container)));
|
2789
|
-
}
|
2790
|
-
delete$(uiDefinitionContainer) {
|
2791
|
-
const serviceUrl = this.getServiceUrl(uiDefinitionContainer.modelId);
|
2792
|
-
return this.baseHttpService.api({
|
2793
|
-
method: 'delete',
|
2794
|
-
url: `${serviceUrl}/${uiDefinitionContainer.id}`,
|
2795
|
-
});
|
2796
|
-
}
|
2797
|
-
getServiceUrl(modelId) {
|
2798
|
-
return `/models/${modelId}/uidefinitions`;
|
2799
|
-
}
|
2800
|
-
fetchUIDefinitions$() {
|
2801
|
-
return this.baseHttpService.api({
|
2802
|
-
method: 'get',
|
2803
|
-
url: this.serviceUrl,
|
2804
|
-
});
|
2805
|
-
}
|
2806
|
-
fetchUIDefinition$(id) {
|
2807
|
-
return this.baseHttpService
|
2808
|
-
.api({
|
2809
|
-
method: 'get',
|
2810
|
-
url: `${this.serviceUrl}/${id}`,
|
2811
|
-
})
|
2812
|
-
.pipe(map$1(container => uiDefinitionFromDTO({ ...container, id })), map$1(uiDefinition => {
|
2813
|
-
const result = uiDefinition;
|
2814
|
-
if (!uiDefinition.modelId && uiDefinition.source.modelId) {
|
2815
|
-
result['modelId'] = uiDefinition.source.modelId;
|
2816
|
-
}
|
2817
|
-
return result;
|
2818
|
-
}));
|
2819
|
-
}
|
2820
|
-
createUIDefinition$(body) {
|
2821
|
-
return this.baseHttpService.api({
|
2822
|
-
method: 'post',
|
2823
|
-
url: this.serviceUrl,
|
2824
|
-
body,
|
2825
|
-
});
|
2826
|
-
}
|
2827
|
-
updateUIDefinition$(uiDefinition) {
|
2828
|
-
return this.baseHttpService.api({
|
2829
|
-
method: 'put',
|
2830
|
-
url: `${this.serviceUrl}/${uiDefinition.id}`,
|
2831
|
-
body: uiDefinition,
|
2832
|
-
});
|
2833
|
-
}
|
2834
|
-
deleteUIDefinition$(id) {
|
2835
|
-
return this.baseHttpService.api({
|
2836
|
-
method: 'delete',
|
2837
|
-
url: `${this.serviceUrl}/${id}`,
|
2838
|
-
});
|
2839
|
-
}
|
2840
|
-
}
|
2841
|
-
UIDefinitionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2842
|
-
UIDefinitionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService });
|
2843
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService, decorators: [{
|
2844
|
-
type: Injectable
|
2845
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2846
|
-
|
2847
|
-
const fromUIComponentStoryDTO = (dto, attachments) => {
|
2848
|
-
return {
|
2849
|
-
id: dto.id,
|
2850
|
-
name: dto.name,
|
2851
|
-
uiComponentId: dto.uiComponentId,
|
2852
|
-
description: dto.description,
|
2853
|
-
section: attachments.json,
|
2854
|
-
template: attachments.html,
|
2855
|
-
script: attachments.js,
|
2856
|
-
styles: attachments.css,
|
2857
|
-
};
|
2858
|
-
};
|
2859
|
-
|
2860
|
-
class UITemplatesApiService {
|
2861
|
-
constructor(baseHttpService) {
|
2862
|
-
this.baseHttpService = baseHttpService;
|
2863
|
-
this.serviceUrl = '/uitemplates';
|
2864
|
-
this.fetchTemplates$ = (name) => {
|
2865
|
-
let params = new HttpParams();
|
2866
|
-
if (name) {
|
2867
|
-
params = params.append('name', name);
|
2868
|
-
}
|
2869
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}`, params });
|
2870
|
-
};
|
2871
|
-
this.createTemplate$ = (template) => {
|
2872
|
-
return this.baseHttpService.api({
|
2873
|
-
method: 'post',
|
2874
|
-
url: `${this.serviceUrl}`,
|
2875
|
-
body: template,
|
2876
|
-
});
|
2877
|
-
};
|
2878
|
-
this.updateTemplate$ = (template) => {
|
2879
|
-
return this.baseHttpService.api({
|
2880
|
-
method: 'put',
|
2881
|
-
url: `${this.serviceUrl}/${template.id}`,
|
2882
|
-
body: template,
|
2883
|
-
});
|
2884
|
-
};
|
2885
|
-
this.duplicateTemplate$ = (template, cloneRequest) => {
|
2886
|
-
return this.baseHttpService
|
2887
|
-
.api({
|
2888
|
-
url: `${this.serviceUrl}/${template.id}/clone`,
|
2889
|
-
method: 'post',
|
2890
|
-
body: cloneRequest,
|
2891
|
-
})
|
2892
|
-
.pipe(map$1(response => response.clonedRecordId));
|
2893
|
-
};
|
2894
|
-
this.removeTemplate$ = (id) => {
|
2895
|
-
return this.baseHttpService.api({
|
2896
|
-
method: 'delete',
|
2897
|
-
url: `${this.serviceUrl}/${id}`,
|
2898
|
-
});
|
2899
|
-
};
|
2900
|
-
this.restoreTemplate$ = (id) => {
|
2901
|
-
return this.baseHttpService.api({
|
2902
|
-
method: 'patch',
|
2903
|
-
url: `${this.serviceUrl}/${id}`,
|
2904
|
-
});
|
2905
|
-
};
|
2906
|
-
this.searchTemplates$ = (data) => {
|
2907
|
-
return this.baseHttpService.api({
|
2908
|
-
method: 'post',
|
2909
|
-
url: `${this.serviceUrl}/search`,
|
2910
|
-
params: data.params,
|
2911
|
-
body: data.expression,
|
2912
|
-
});
|
2913
|
-
};
|
2914
|
-
this.fetchComponents$ = (templateId, name) => {
|
2915
|
-
let params = new HttpParams();
|
2916
|
-
if (name) {
|
2917
|
-
params = params.append('name', name);
|
2918
|
-
}
|
2919
|
-
return this.baseHttpService.api({
|
2920
|
-
url: `${this.serviceUrl}/${templateId}/components`,
|
2921
|
-
params,
|
2922
|
-
});
|
2923
|
-
};
|
2924
|
-
this.fetchComponent$ = (templateId, componentId) => {
|
2925
|
-
return this.baseHttpService.api({
|
2926
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}`,
|
2927
|
-
});
|
2928
|
-
};
|
2929
|
-
this.createComponent$ = (component) => {
|
2930
|
-
return this.baseHttpService.api({
|
2931
|
-
method: 'post',
|
2932
|
-
url: `${this.serviceUrl}/${component.uiTemplateId}/components`,
|
2933
|
-
body: component,
|
2934
|
-
});
|
2935
|
-
};
|
2936
|
-
this.updateComponent$ = (component) => {
|
2937
|
-
return this.baseHttpService.api({
|
2938
|
-
method: 'put',
|
2939
|
-
url: `${this.serviceUrl}/${component.uiTemplateId}/components/${component.id}`,
|
2940
|
-
body: component,
|
2941
|
-
});
|
2942
|
-
};
|
2943
|
-
this.duplicateComponent$ = (component, cloneRequest) => {
|
2944
|
-
return this.baseHttpService
|
2945
|
-
.api({
|
2946
|
-
url: `${this.serviceUrl}/${component.uiTemplateId}/components/${component.id}/clone`,
|
2947
|
-
method: 'post',
|
2948
|
-
body: cloneRequest,
|
2949
|
-
})
|
2950
|
-
.pipe(map$1(response => response.clonedRecordId));
|
2951
|
-
};
|
2952
|
-
this.removeComponent$ = (templateId, componentId) => {
|
2953
|
-
return this.baseHttpService.api({
|
2954
|
-
method: 'delete',
|
2955
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}`,
|
2956
|
-
});
|
2957
|
-
};
|
2958
|
-
this.restoreComponent$ = (templateId, componentId) => {
|
2959
|
-
return this.baseHttpService.api({
|
2960
|
-
method: 'patch',
|
2961
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}`,
|
2962
|
-
});
|
2963
|
-
};
|
2964
|
-
this.searchComponents$ = (templateId, data) => {
|
2965
|
-
return this.baseHttpService.api({
|
2966
|
-
method: 'post',
|
2967
|
-
url: `${this.serviceUrl}/${templateId}/components/search`,
|
2968
|
-
params: data.params,
|
2969
|
-
body: data.expression,
|
2970
|
-
});
|
2971
|
-
};
|
2972
|
-
this.fetchStoryAttachment = (templateId, componentId, storyId, type) => {
|
2973
|
-
return this.baseHttpService
|
2974
|
-
.api({
|
2975
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories/${storyId}/attachments/${type}/file`,
|
2976
|
-
responseType: 'text',
|
2977
|
-
errorHandler: noop,
|
2978
|
-
})
|
2979
|
-
.pipe(catchError$1(() => of('')));
|
2980
|
-
};
|
2981
|
-
this.convertToComponentStory$ = (templateId, componentId, storyDto) => {
|
2982
|
-
return forkJoin([
|
2983
|
-
this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'html'),
|
2984
|
-
this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'js'),
|
2985
|
-
this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'css'),
|
2986
|
-
this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'json'),
|
2987
|
-
]).pipe(map$1(([html, js, css, json]) => ({ html, js, css, json })), map$1(attachments => fromUIComponentStoryDTO(storyDto, attachments)));
|
2988
|
-
};
|
2989
|
-
this.fetchStories$ = (templateId, componentId, name) => {
|
2990
|
-
let params = new HttpParams();
|
2991
|
-
if (name) {
|
2992
|
-
params = params.append('name', name);
|
2993
|
-
}
|
2994
|
-
return this.baseHttpService
|
2995
|
-
.api({
|
2996
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories`,
|
2997
|
-
params,
|
2998
|
-
})
|
2999
|
-
.pipe(switchMap(dtos => {
|
3000
|
-
if (!dtos.length) {
|
3001
|
-
return of([]);
|
3002
|
-
}
|
3003
|
-
return forkJoin(dtos.map(dto => this.convertToComponentStory$(templateId, componentId, dto)));
|
3004
|
-
}));
|
3005
|
-
};
|
3006
|
-
this.fetchStory$ = (templateId, componentId, storyId) => {
|
3007
|
-
return this.baseHttpService
|
3008
|
-
.api({
|
3009
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories/${storyId}`,
|
3010
|
-
})
|
3011
|
-
.pipe(switchMap(dto => this.convertToComponentStory$(templateId, componentId, dto)));
|
3012
|
-
};
|
3013
|
-
this.createComponentStory$ = (templateId, story) => {
|
3014
|
-
return this.baseHttpService.api({
|
3015
|
-
method: 'post',
|
3016
|
-
url: `${this.serviceUrl}/${templateId}/components/${story.uiComponentId}/stories`,
|
3017
|
-
body: story,
|
3018
|
-
});
|
3019
|
-
};
|
3020
|
-
this.updateComponentStory$ = (templateId, story) => {
|
3021
|
-
const { script, template, styles, section, ...rest } = story;
|
3022
|
-
return this.baseHttpService
|
3023
|
-
.api({
|
3024
|
-
method: 'put',
|
3025
|
-
url: `${this.serviceUrl}/${templateId}/components/${story.uiComponentId}/stories/${story.id}`,
|
3026
|
-
body: rest,
|
3027
|
-
})
|
3028
|
-
.pipe(map$1(dto => fromUIComponentStoryDTO(dto, { html: template, js: script, css: styles, json: section })));
|
3029
|
-
};
|
3030
|
-
this.duplicateComponentStory$ = (story, cloneRequest) => {
|
3031
|
-
return this.baseHttpService
|
3032
|
-
.api({
|
3033
|
-
url: `${this.serviceUrl}/${story.template}/components/${story.uiComponentId}/stories/${story.id}/clone`,
|
3034
|
-
method: 'post',
|
3035
|
-
body: cloneRequest,
|
3036
|
-
})
|
3037
|
-
.pipe(map$1(response => response.clonedRecordId));
|
3038
|
-
};
|
3039
|
-
this.deleteComponentStory$ = (templateId, componentId, storyId) => {
|
3040
|
-
return this.baseHttpService.api({
|
3041
|
-
method: 'delete',
|
3042
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories/${storyId}`,
|
3043
|
-
});
|
3044
|
-
};
|
3045
|
-
this.restoreComponentStory$ = (templateId, componentId, storyId) => {
|
3046
|
-
return this.baseHttpService.api({
|
3047
|
-
method: 'patch',
|
3048
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories/${storyId}`,
|
3049
|
-
});
|
3050
|
-
};
|
3051
|
-
this.uploadStoryAttachments$ = (templateId, componentId, storyId, attachments) => {
|
3052
|
-
const formData = new FormData();
|
3053
|
-
if (attachments.html != null) {
|
3054
|
-
formData.append('html', new Blob([attachments.html]), 'story-template.html');
|
3055
|
-
}
|
3056
|
-
if (attachments.css != null) {
|
3057
|
-
formData.append('css', new Blob([attachments.css]), 'story-styles.css');
|
3058
|
-
}
|
3059
|
-
if (attachments.js != null) {
|
3060
|
-
formData.append('js', new Blob([attachments.js]), 'story-script.js');
|
3061
|
-
}
|
3062
|
-
if (attachments.json != null) {
|
3063
|
-
formData.append('json', new Blob([attachments.json]), 'story-section.json');
|
3064
|
-
}
|
3065
|
-
return this.baseHttpService.upload({
|
3066
|
-
method: 'post',
|
3067
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories/${storyId}/attachments`,
|
3068
|
-
body: formData,
|
3069
|
-
});
|
3070
|
-
};
|
3071
|
-
this.fetchComponentAttachments$ = (templateId, component) => {
|
3072
|
-
return forkJoin([
|
3073
|
-
this.fetchComponentAttachmentFile$(templateId, component.id, 'html'),
|
3074
|
-
this.fetchComponentAttachmentFile$(templateId, component.id, 'js'),
|
3075
|
-
this.fetchComponentAttachmentFile$(templateId, component.id, 'css'),
|
3076
|
-
this.fetchComponentAttachmentFile$(templateId, component.id, 'json'),
|
3077
|
-
]).pipe(map$1(([html, js, css, json]) => ({ html, js, css, json })));
|
3078
|
-
};
|
3079
|
-
this.fetchComponentsAttachments$ = (templateId) => {
|
3080
|
-
return this.fetchComponents$(templateId).pipe(switchMap(components => {
|
3081
|
-
return forkJoin(components.map(component => this.fetchComponentAttachments$(templateId, component)));
|
3082
|
-
}));
|
3083
|
-
};
|
3084
|
-
this.fetchComponentAttachmentFile$ = (templateId, componentId, attachmentType) => {
|
3085
|
-
return this.baseHttpService
|
3086
|
-
.api({
|
3087
|
-
method: 'get',
|
3088
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}/attachments/${attachmentType}/file`,
|
3089
|
-
responseType: 'text',
|
3090
|
-
errorHandler: noop,
|
3091
|
-
})
|
3092
|
-
.pipe(catchError$1(() => of('')));
|
3093
|
-
};
|
3094
|
-
this.uploadComponentAttachments$ = (templateId, componentId, attachments) => {
|
3095
|
-
const formData = new FormData();
|
3096
|
-
if (attachments.html != null) {
|
3097
|
-
formData.append('html', new Blob([attachments.html]), 'template.html');
|
3098
|
-
}
|
3099
|
-
if (attachments.css != null) {
|
3100
|
-
formData.append('css', new Blob([attachments.css]), 'styles.css');
|
3101
|
-
}
|
3102
|
-
if (attachments.js != null) {
|
3103
|
-
formData.append('js', new Blob([attachments.js]), 'script.js');
|
3104
|
-
}
|
3105
|
-
if (attachments.json != null) {
|
3106
|
-
formData.append('json', new Blob([attachments.json]), 'section.json');
|
3107
|
-
}
|
3108
|
-
return this.baseHttpService.upload({
|
3109
|
-
method: 'post',
|
3110
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}/attachments`,
|
3111
|
-
body: formData,
|
3112
|
-
});
|
3113
|
-
};
|
3114
|
-
}
|
3115
|
-
getTemplateThumbnailUrl(templateId) {
|
3116
|
-
return `${this.serviceUrl}/${templateId}/thumbnail/file`;
|
3117
|
-
}
|
3118
|
-
attachTemplateThumbnail$(templateId, file) {
|
3119
|
-
const data = new FormData();
|
3120
|
-
data.append('thumb', file);
|
3121
|
-
return this.baseHttpService.upload({
|
3122
|
-
method: 'post',
|
3123
|
-
url: `${this.serviceUrl}/${templateId}/thumbnail`,
|
3124
|
-
body: data,
|
3125
|
-
});
|
3126
|
-
}
|
3127
|
-
removeTemplateThumbnail$(templateId) {
|
3128
|
-
return this.baseHttpService.api({
|
3129
|
-
method: 'delete',
|
3130
|
-
url: `${this.serviceUrl}/${templateId}/thumbnail`,
|
3131
|
-
});
|
3132
|
-
}
|
3133
|
-
}
|
3134
|
-
UITemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
3135
|
-
UITemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService });
|
3136
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService, decorators: [{
|
3137
|
-
type: Injectable
|
3138
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
3139
|
-
|
3140
2207
|
class VeloceObjectsApiService {
|
3141
2208
|
constructor(baseHttpService) {
|
3142
2209
|
this.baseHttpService = baseHttpService;
|
@@ -3225,24 +2292,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
3225
2292
|
class ApiModule {
|
3226
2293
|
}
|
3227
2294
|
ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
3228
|
-
ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, imports: [HttpClientModule] });
|
2295
|
+
ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, imports: [HttpClientModule, ApiV2Module] });
|
3229
2296
|
ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, providers: [
|
3230
2297
|
BaseHttpService,
|
3231
2298
|
XrayService,
|
3232
2299
|
ConfigurationApiService,
|
3233
2300
|
ConfigurationSettingsApiService,
|
3234
|
-
ContextApiService,
|
3235
2301
|
DocumentAttachmentApiService,
|
3236
2302
|
PriceApiService,
|
3237
2303
|
ProductModelApiService,
|
3238
|
-
ProceduresApiService,
|
3239
|
-
QuoteApiService,
|
3240
2304
|
RampApiService,
|
3241
2305
|
SalesforceApiService,
|
3242
|
-
UITemplatesApiService,
|
3243
|
-
ScriptsApiService,
|
3244
|
-
RulesApiService,
|
3245
|
-
RuleGroupsApiService,
|
3246
2306
|
FlowsApiService,
|
3247
2307
|
GuidedSellingsAdminApiService,
|
3248
2308
|
ShoppingCartSettingsApiService,
|
@@ -3256,7 +2316,6 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
|
3256
2316
|
EndpointsApiService,
|
3257
2317
|
OrgInfoApiService,
|
3258
2318
|
OffersApiService,
|
3259
|
-
UIDefinitionsApiService,
|
3260
2319
|
VeloceObjectsApiService,
|
3261
2320
|
StatefulConfigurationApiService,
|
3262
2321
|
RebateProgramApiService,
|
@@ -3265,33 +2324,23 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
|
3265
2324
|
VeloceAuthService,
|
3266
2325
|
ContractedPriceApiService,
|
3267
2326
|
PortalsApiService,
|
3268
|
-
ConfigurationProcessorsApiService,
|
3269
2327
|
FlowStateApiService,
|
3270
2328
|
SandboxManagerApiService,
|
3271
|
-
|
3272
|
-
RlmQuoteApiService,
|
3273
|
-
], imports: [HttpClientModule] });
|
2329
|
+
], imports: [HttpClientModule, ApiV2Module] });
|
3274
2330
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, decorators: [{
|
3275
2331
|
type: NgModule,
|
3276
2332
|
args: [{
|
3277
|
-
imports: [HttpClientModule],
|
2333
|
+
imports: [HttpClientModule, ApiV2Module],
|
3278
2334
|
providers: [
|
3279
2335
|
BaseHttpService,
|
3280
2336
|
XrayService,
|
3281
2337
|
ConfigurationApiService,
|
3282
2338
|
ConfigurationSettingsApiService,
|
3283
|
-
ContextApiService,
|
3284
2339
|
DocumentAttachmentApiService,
|
3285
2340
|
PriceApiService,
|
3286
2341
|
ProductModelApiService,
|
3287
|
-
ProceduresApiService,
|
3288
|
-
QuoteApiService,
|
3289
2342
|
RampApiService,
|
3290
2343
|
SalesforceApiService,
|
3291
|
-
UITemplatesApiService,
|
3292
|
-
ScriptsApiService,
|
3293
|
-
RulesApiService,
|
3294
|
-
RuleGroupsApiService,
|
3295
2344
|
FlowsApiService,
|
3296
2345
|
GuidedSellingsAdminApiService,
|
3297
2346
|
ShoppingCartSettingsApiService,
|
@@ -3305,7 +2354,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
3305
2354
|
EndpointsApiService,
|
3306
2355
|
OrgInfoApiService,
|
3307
2356
|
OffersApiService,
|
3308
|
-
UIDefinitionsApiService,
|
3309
2357
|
VeloceObjectsApiService,
|
3310
2358
|
StatefulConfigurationApiService,
|
3311
2359
|
RebateProgramApiService,
|
@@ -3314,11 +2362,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
3314
2362
|
VeloceAuthService,
|
3315
2363
|
ContractedPriceApiService,
|
3316
2364
|
PortalsApiService,
|
3317
|
-
ConfigurationProcessorsApiService,
|
3318
2365
|
FlowStateApiService,
|
3319
2366
|
SandboxManagerApiService,
|
3320
|
-
RlmApiService,
|
3321
|
-
RlmQuoteApiService,
|
3322
2367
|
],
|
3323
2368
|
}]
|
3324
2369
|
}] });
|
@@ -3327,5 +2372,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
3327
2372
|
* Generated bundle index. Do not edit.
|
3328
2373
|
*/
|
3329
2374
|
|
3330
|
-
export { AccountApiService, ApiModule, CatalogAdminApiService, CatalogApiService, ConfigurationApiService,
|
2375
|
+
export { AccountApiService, ApiModule, CatalogAdminApiService, CatalogApiService, ConfigurationApiService, ConfigurationSettingsApiService, ContractedPriceApiService, DeltaApiService, DocumentAttachmentApiService, EndpointsApiService, FlowStateApiService, FlowsApiService, GuidedSellingApiService, GuidedSellingsAdminApiService, OffersApiService, OrgInfoApiService, PicklistsApiService, PortalsApiService, PriceApiService, ProductApiService, ProductModelApiService, PromotionsApiService, RampApiService, RebateProgramApiService, RebateTypeApiService, SalesforceApiService, SandboxManagerApiService, ShoppingCartSettingsApiService, StatefulConfigurationApiService, VeloceAuthService, VeloceObjectsApiService, handleCanvasResponse };
|
3331
2376
|
//# sourceMappingURL=veloceapps-api.mjs.map
|