@veloceapps/api 8.0.0-20 → 8.0.0-201
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 +6 -1
- package/esm2020/lib/api.module.mjs +16 -1
- package/esm2020/lib/services/account-api.service.mjs +8 -1
- package/esm2020/lib/services/configuration-api.service.mjs +45 -12
- package/esm2020/lib/services/configuration-processors-api.service.mjs +38 -0
- package/esm2020/lib/services/contracted-price-api.service.mjs +45 -0
- package/esm2020/lib/services/document-templates-api.service.mjs +6 -4
- package/esm2020/lib/services/flow-state-api.mjs +142 -0
- package/esm2020/lib/services/flows-api.service.mjs +9 -5
- package/esm2020/lib/services/org-info-api.service.mjs +45 -10
- package/esm2020/lib/services/portals-api.service.mjs +76 -0
- package/esm2020/lib/services/procedures-api.service.mjs +7 -1
- package/esm2020/lib/services/quote-api.service.mjs +18 -2
- package/esm2020/lib/services/rebate-program-api.service.mjs +1 -1
- package/esm2020/lib/services/rules-api.service.mjs +11 -2
- package/esm2020/lib/services/salesforce-api.service.mjs +4 -2
- package/esm2020/lib/services/sandbox-manager-api.service.mjs +94 -0
- package/esm2020/lib/services/scripts-api.service.mjs +6 -3
- package/esm2020/lib/services/stateful-configuration-api.mjs +1 -1
- package/esm2020/lib/services/ui-templates-api.service.mjs +6 -1
- package/esm2020/lib/services/veloce-objects-api.service.mjs +11 -1
- package/esm2020/lib/types/index.mjs +2 -1
- package/esm2020/lib/types/org-info.types.mjs +1 -1
- package/esm2020/lib/types/quote.types.mjs +2 -0
- package/esm2020/lib/types/stateful-configuration.types.mjs +1 -1
- package/esm2020/lib/utils/canvas.utils.mjs +33 -0
- package/fesm2015/veloceapps-api.mjs +566 -41
- package/fesm2015/veloceapps-api.mjs.map +1 -1
- package/fesm2020/veloceapps-api.mjs +581 -37
- package/fesm2020/veloceapps-api.mjs.map +1 -1
- package/index.d.ts +5 -0
- package/lib/services/account-api.service.d.ts +2 -1
- package/lib/services/configuration-api.service.d.ts +5 -0
- package/lib/services/configuration-processors-api.service.d.ts +14 -0
- package/lib/services/contracted-price-api.service.d.ts +16 -0
- package/lib/services/flow-state-api.d.ts +84 -0
- package/lib/services/flows-api.service.d.ts +1 -1
- package/lib/services/org-info-api.service.d.ts +13 -7
- package/lib/services/portals-api.service.d.ts +20 -0
- package/lib/services/procedures-api.service.d.ts +1 -0
- package/lib/services/quote-api.service.d.ts +13 -6
- package/lib/services/rebate-program-api.service.d.ts +1 -1
- package/lib/services/rules-api.service.d.ts +1 -0
- package/lib/services/salesforce-api.service.d.ts +1 -1
- package/lib/services/sandbox-manager-api.service.d.ts +24 -0
- package/lib/services/scripts-api.service.d.ts +1 -1
- package/lib/services/stateful-configuration-api.d.ts +2 -2
- package/lib/services/ui-templates-api.service.d.ts +1 -0
- package/lib/services/veloce-objects-api.service.d.ts +2 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/org-info.types.d.ts +19 -0
- package/lib/types/quote.types.d.ts +8 -0
- package/lib/types/stateful-configuration.types.d.ts +1 -1
- package/lib/utils/canvas.utils.d.ts +18 -0
- package/package.json +1 -1
@@ -3,13 +3,13 @@ import { HttpParams, HttpHeaders, HttpErrorResponse, HttpClientModule } from '@a
|
|
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,
|
7
|
-
import { noop, throwError, of, zip, forkJoin, map as map$1, catchError as catchError$1, switchMap as switchMap$1 } from 'rxjs';
|
6
|
+
import { uiDefinitionFromDTO, 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';
|
8
8
|
import { map, catchError, tap, switchMap, defaultIfEmpty } from 'rxjs/operators';
|
9
|
-
import * as
|
9
|
+
import * as i1$2 from 'primeng/api';
|
10
10
|
import { CurrencyPipe } from '@angular/common';
|
11
11
|
import * as _ from 'lodash';
|
12
|
-
import { omit } from 'lodash';
|
12
|
+
import { isArray, omit } from 'lodash';
|
13
13
|
import moment from 'moment';
|
14
14
|
|
15
15
|
class AccountApiService {
|
@@ -38,6 +38,13 @@ class AccountApiService {
|
|
38
38
|
...options,
|
39
39
|
});
|
40
40
|
}
|
41
|
+
getAssetsState(accountId, options) {
|
42
|
+
return this.httpService.api({
|
43
|
+
method: 'get',
|
44
|
+
url: `/v2${this.SERVICE_URL}/${accountId}/assets`,
|
45
|
+
...options,
|
46
|
+
});
|
47
|
+
}
|
41
48
|
getAssets(accountId, options) {
|
42
49
|
return this.httpService.api({ url: `${this.SERVICE_URL}/${accountId}/assets`, ...options });
|
43
50
|
}
|
@@ -404,6 +411,26 @@ class ConfigurationApiService {
|
|
404
411
|
}
|
405
412
|
}));
|
406
413
|
}
|
414
|
+
customConfigurePrice({ url, configurationRequest, runtimeModel, }) {
|
415
|
+
return this.httpService
|
416
|
+
.api({
|
417
|
+
method: 'post',
|
418
|
+
url,
|
419
|
+
body: configurationRequest,
|
420
|
+
errorHandler: e => throwError(e),
|
421
|
+
})
|
422
|
+
.pipe(map(configurePrice => {
|
423
|
+
if (runtimeModel) {
|
424
|
+
return {
|
425
|
+
...configurePrice,
|
426
|
+
lineItem: this.updatePortDomains(configurePrice.lineItem, runtimeModel),
|
427
|
+
};
|
428
|
+
}
|
429
|
+
else {
|
430
|
+
return configurePrice;
|
431
|
+
}
|
432
|
+
}));
|
433
|
+
}
|
407
434
|
getRuntimeDataByProductId(productId, offeringId) {
|
408
435
|
return this.httpService
|
409
436
|
.api({
|
@@ -413,13 +440,7 @@ class ConfigurationApiService {
|
|
413
440
|
.pipe(map(runtimeData => {
|
414
441
|
return {
|
415
442
|
...runtimeData,
|
416
|
-
uiDefinitions: runtimeData.uiDefinitions.map(dto =>
|
417
|
-
const uiDefinitionContainer = uiDefinitionFromDTO(dto);
|
418
|
-
if (isLegacyUIDefinition(uiDefinitionContainer.source)) {
|
419
|
-
ModelTranslatorUtils.toLocalUIDefinition(uiDefinitionContainer.source);
|
420
|
-
}
|
421
|
-
return uiDefinitionContainer;
|
422
|
-
}),
|
443
|
+
uiDefinitions: runtimeData.uiDefinitions.map(dto => uiDefinitionFromDTO(dto)),
|
423
444
|
};
|
424
445
|
}));
|
425
446
|
}
|
@@ -432,10 +453,29 @@ class ConfigurationApiService {
|
|
432
453
|
updatePortDomains(lineItem, runtimeModel) {
|
433
454
|
const type = runtimeModel.components.get(lineItem.type);
|
434
455
|
const portDomains = { ...lineItem.portDomains };
|
456
|
+
// loop through ports to look for 'None' type domain computations
|
435
457
|
for (const port of type?.ports ?? []) {
|
436
|
-
const
|
437
|
-
|
438
|
-
|
458
|
+
const { name: portName, type: typeName, min, max, domainTypes, properties } = port;
|
459
|
+
const portDomain = portDomains[portName];
|
460
|
+
if (portDomain) {
|
461
|
+
// there's a 'None' type domain computation
|
462
|
+
if (portDomain.properties?.['domainComputation'] === ('None')) {
|
463
|
+
portDomain.domainTypes = domainTypes;
|
464
|
+
}
|
465
|
+
}
|
466
|
+
else {
|
467
|
+
// there's no port domain so consider that as 'None' type domain computation
|
468
|
+
portDomains[portName] = {
|
469
|
+
name: portName,
|
470
|
+
type: typeName,
|
471
|
+
minCard: Number(min),
|
472
|
+
maxCard: Number(max),
|
473
|
+
domainTypes: domainTypes,
|
474
|
+
properties: {
|
475
|
+
...properties,
|
476
|
+
domainComputation: 'None',
|
477
|
+
},
|
478
|
+
};
|
439
479
|
}
|
440
480
|
}
|
441
481
|
return {
|
@@ -451,6 +491,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
451
491
|
type: Injectable
|
452
492
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
453
493
|
|
494
|
+
class ConfigurationProcessorsApiService {
|
495
|
+
constructor(baseHttpService) {
|
496
|
+
this.baseHttpService = baseHttpService;
|
497
|
+
this.serviceUrl = '/configuration/processors/owners';
|
498
|
+
this.fetchConfigurationProcessors$ = (ownerId) => {
|
499
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${ownerId}` });
|
500
|
+
};
|
501
|
+
this.createConfigurationProcessors$ = (configurationProcessor) => {
|
502
|
+
return this.baseHttpService.api({
|
503
|
+
method: 'post',
|
504
|
+
url: `${this.serviceUrl}/${configurationProcessor.ownerId}`,
|
505
|
+
body: configurationProcessor,
|
506
|
+
});
|
507
|
+
};
|
508
|
+
this.updateConfigurationProcessors$ = (configurationProcessor) => {
|
509
|
+
return this.baseHttpService.api({
|
510
|
+
method: 'put',
|
511
|
+
url: `${this.serviceUrl}/${configurationProcessor.ownerId}/${configurationProcessor.id}`,
|
512
|
+
body: configurationProcessor,
|
513
|
+
});
|
514
|
+
};
|
515
|
+
this.deleteConfigurationProcessors$ = (configurationProcessor) => {
|
516
|
+
return this.baseHttpService.api({
|
517
|
+
method: 'delete',
|
518
|
+
url: `${this.serviceUrl}/${configurationProcessor.ownerId}/${configurationProcessor.id}`,
|
519
|
+
});
|
520
|
+
};
|
521
|
+
}
|
522
|
+
}
|
523
|
+
ConfigurationProcessorsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
524
|
+
ConfigurationProcessorsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService });
|
525
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService, decorators: [{
|
526
|
+
type: Injectable
|
527
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
528
|
+
|
454
529
|
class ConfigurationSettingsDTO {
|
455
530
|
static fromDTO(dto, key) {
|
456
531
|
return {
|
@@ -555,11 +630,11 @@ class ConfigurationSettingsApiService {
|
|
555
630
|
});
|
556
631
|
}
|
557
632
|
}
|
558
|
-
ConfigurationSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService, deps: [{ token: i1.BaseHttpService }, { token:
|
633
|
+
ConfigurationSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService, deps: [{ token: i1.BaseHttpService }, { token: i1$2.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
559
634
|
ConfigurationSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService });
|
560
635
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService, decorators: [{
|
561
636
|
type: Injectable
|
562
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type:
|
637
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i1$2.MessageService }]; } });
|
563
638
|
|
564
639
|
class ContextApiService {
|
565
640
|
constructor(httpService) {
|
@@ -583,6 +658,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
583
658
|
type: Injectable
|
584
659
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
585
660
|
|
661
|
+
class ContractedPriceApiService {
|
662
|
+
constructor(baseHttpService) {
|
663
|
+
this.baseHttpService = baseHttpService;
|
664
|
+
this.serviceUrl = '/admin/contracted-price';
|
665
|
+
this.fetchContractedPrices$ = () => {
|
666
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}` });
|
667
|
+
};
|
668
|
+
this.fetchContractedPrice$ = (id) => {
|
669
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
670
|
+
};
|
671
|
+
this.createContractedPrice$ = (data) => {
|
672
|
+
return this.baseHttpService.api({
|
673
|
+
url: `${this.serviceUrl}`,
|
674
|
+
method: 'put',
|
675
|
+
body: data,
|
676
|
+
});
|
677
|
+
};
|
678
|
+
this.updateContractedPrice$ = (data) => {
|
679
|
+
return this.baseHttpService.api({
|
680
|
+
url: `${this.serviceUrl}/${data.id}`,
|
681
|
+
method: 'put',
|
682
|
+
body: data,
|
683
|
+
});
|
684
|
+
};
|
685
|
+
this.searchContractedPrices$ = (searchParams, expression) => {
|
686
|
+
const params = new HttpParams({ fromObject: { ...searchParams } });
|
687
|
+
return this.baseHttpService.api({
|
688
|
+
method: 'post',
|
689
|
+
url: `${this.serviceUrl}/search`,
|
690
|
+
params,
|
691
|
+
body: expression || {},
|
692
|
+
});
|
693
|
+
};
|
694
|
+
}
|
695
|
+
}
|
696
|
+
ContractedPriceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContractedPriceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
697
|
+
ContractedPriceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContractedPriceApiService });
|
698
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContractedPriceApiService, decorators: [{
|
699
|
+
type: Injectable
|
700
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
701
|
+
|
586
702
|
class DeltaApiService {
|
587
703
|
constructor(httpService) {
|
588
704
|
this.httpService = httpService;
|
@@ -716,7 +832,9 @@ class SalesforceApiService {
|
|
716
832
|
return this.httpService.api({ method: 'post', url: methodUrl, body: fields, ...options });
|
717
833
|
}
|
718
834
|
apexGetRequest(path, params, options) {
|
719
|
-
|
835
|
+
// this line is needed because HttpParams instance from Integration behaves wrong in studio instance of Angular
|
836
|
+
const httpParams = new HttpParams({ fromString: params.toString() });
|
837
|
+
return this.httpService.api({ url: `${this.SERVICE_URL}/apex${path}`, params: httpParams, ...options });
|
720
838
|
}
|
721
839
|
apexPostRequest(path, body, options) {
|
722
840
|
return this.httpService.api({
|
@@ -754,7 +872,7 @@ class DocumentTemplatesApiService {
|
|
754
872
|
this.http = http;
|
755
873
|
this.DOCGEN_TAG = 'docgen';
|
756
874
|
this.SERVICE_URL = '/templates';
|
757
|
-
this.DOC_GEN_URL_FALLBACK =
|
875
|
+
this.DOC_GEN_URL_FALLBACK = `${window.VELO_API}/docgen`;
|
758
876
|
this.mapSfQueryResult = (limit) => map((records) => {
|
759
877
|
if (!records.length) {
|
760
878
|
return { _result: 'No Records Found' };
|
@@ -898,7 +1016,9 @@ class DocumentTemplatesApiService {
|
|
898
1016
|
return zip(this.getTemplateFile(template.id), documentData$, this.resolveAttachments$(template)).pipe(switchMap(([templateFile, data, attachments]) => {
|
899
1017
|
const document = DocxTemplater.generate(templateFile, data);
|
900
1018
|
const properties = object?.context?.properties ?? object?.properties ?? {};
|
901
|
-
const documentName = properties
|
1019
|
+
const documentName = template.properties?.find(({ name }) => name === 'documentName')?.value ||
|
1020
|
+
properties['Name'] ||
|
1021
|
+
template.name;
|
902
1022
|
const documentFormat = params.documentFormat ?? template.properties?.find(p => p.name === 'documentFormat')?.value;
|
903
1023
|
if (documentFormat === 'DOCX') {
|
904
1024
|
this.fileDownloadService.processDownload(document, documentName);
|
@@ -1007,7 +1127,7 @@ class DocumentTemplatesApiService {
|
|
1007
1127
|
const patternLimit = /(\s*limit\s\d*)/i;
|
1008
1128
|
let limit = 1;
|
1009
1129
|
if (statement && patternLimit.test(statement)) {
|
1010
|
-
const limitStr = statement?.match(patternLimit)?.[1]
|
1130
|
+
const limitStr = statement?.match(patternLimit)?.[1]?.trim().substring(5).trim();
|
1011
1131
|
if (limitStr) {
|
1012
1132
|
limit = Number.parseInt(limitStr, 10);
|
1013
1133
|
}
|
@@ -1106,18 +1226,160 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1106
1226
|
type: Injectable
|
1107
1227
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1108
1228
|
|
1229
|
+
class FlowStateApiService {
|
1230
|
+
constructor(httpService) {
|
1231
|
+
this.httpService = httpService;
|
1232
|
+
this.SERVICE_URL = '/configuration/states';
|
1233
|
+
}
|
1234
|
+
/**
|
1235
|
+
* Initialize flow state
|
1236
|
+
* @param request Request
|
1237
|
+
* @returns Flow initialization response, which contains session ID and result of selectors
|
1238
|
+
*/
|
1239
|
+
init(request) {
|
1240
|
+
return this.httpService.api({
|
1241
|
+
method: 'post',
|
1242
|
+
url: `${this.SERVICE_URL}/quote/start`,
|
1243
|
+
body: request,
|
1244
|
+
});
|
1245
|
+
}
|
1246
|
+
/**
|
1247
|
+
* Get existing state by ID
|
1248
|
+
* @param id ID
|
1249
|
+
* @returns Flow State
|
1250
|
+
*/
|
1251
|
+
get(id) {
|
1252
|
+
return this.httpService.api({
|
1253
|
+
url: `${this.SERVICE_URL}/${id}`,
|
1254
|
+
});
|
1255
|
+
}
|
1256
|
+
/**
|
1257
|
+
* Execute actions/selectors
|
1258
|
+
* @param id State ID
|
1259
|
+
* @param request Request
|
1260
|
+
* @returns Execute result
|
1261
|
+
*/
|
1262
|
+
execute(id, request) {
|
1263
|
+
return this.httpService.api({
|
1264
|
+
method: 'post',
|
1265
|
+
url: `${this.SERVICE_URL}/quote/${id}/execute`,
|
1266
|
+
body: request,
|
1267
|
+
});
|
1268
|
+
}
|
1269
|
+
/**
|
1270
|
+
* Save Quote in the state
|
1271
|
+
* @param id State ID
|
1272
|
+
*/
|
1273
|
+
save(id) {
|
1274
|
+
return this.httpService.api({
|
1275
|
+
method: 'post',
|
1276
|
+
url: `${this.SERVICE_URL}/quote/${id}/save`,
|
1277
|
+
});
|
1278
|
+
}
|
1279
|
+
/**
|
1280
|
+
* Submit Quote in the state
|
1281
|
+
* @param id State ID
|
1282
|
+
*/
|
1283
|
+
submit(id) {
|
1284
|
+
return this.httpService.api({
|
1285
|
+
method: 'post',
|
1286
|
+
url: `${this.SERVICE_URL}/quote/${id}/submit`,
|
1287
|
+
});
|
1288
|
+
}
|
1289
|
+
/**
|
1290
|
+
* Close Flow state
|
1291
|
+
* @param id State ID
|
1292
|
+
*/
|
1293
|
+
cancel(id) {
|
1294
|
+
return this.httpService.api({
|
1295
|
+
method: 'post',
|
1296
|
+
url: `${this.SERVICE_URL}/quote/${id}/cancel`,
|
1297
|
+
});
|
1298
|
+
}
|
1299
|
+
/**
|
1300
|
+
* Initialize stateful configuration
|
1301
|
+
* @param stateId string
|
1302
|
+
* @param request Request
|
1303
|
+
* @returns Flow initialization response, which contains session ID and result of selectors
|
1304
|
+
*/
|
1305
|
+
newConfiguration(stateId, request) {
|
1306
|
+
return this.httpService.api({
|
1307
|
+
method: 'post',
|
1308
|
+
url: `${this.SERVICE_URL}/quote/${stateId}/configuration/new`,
|
1309
|
+
body: request,
|
1310
|
+
});
|
1311
|
+
}
|
1312
|
+
/**
|
1313
|
+
* Start stateful configuration
|
1314
|
+
* @param stateId string
|
1315
|
+
* @param request Request
|
1316
|
+
* @returns Flow initialization response, which contains session ID and result of selectors
|
1317
|
+
*/
|
1318
|
+
startConfiguration(stateId, request) {
|
1319
|
+
return this.httpService.api({
|
1320
|
+
method: 'post',
|
1321
|
+
url: `${this.SERVICE_URL}/quote/${stateId}/configuration/start`,
|
1322
|
+
body: request,
|
1323
|
+
});
|
1324
|
+
}
|
1325
|
+
/**
|
1326
|
+
* Execute stateful configuration
|
1327
|
+
* @param stateId string
|
1328
|
+
* @param configurationId string
|
1329
|
+
* @param request Request
|
1330
|
+
* @returns Flow initialization response, which contains session ID and result of selectors
|
1331
|
+
*/
|
1332
|
+
executeConfiguration(stateId, configurationId, request) {
|
1333
|
+
return this.httpService.api({
|
1334
|
+
method: 'post',
|
1335
|
+
url: `${this.SERVICE_URL}/quote/${stateId}/configuration/${configurationId}/execute`,
|
1336
|
+
body: request,
|
1337
|
+
});
|
1338
|
+
}
|
1339
|
+
/**
|
1340
|
+
* Save stateful configuration
|
1341
|
+
* @param stateId string
|
1342
|
+
* @param configurationId string
|
1343
|
+
*/
|
1344
|
+
saveConfiguration(stateId, configurationId) {
|
1345
|
+
return this.httpService.api({
|
1346
|
+
method: 'post',
|
1347
|
+
url: `${this.SERVICE_URL}/quote/${stateId}/configuration/${configurationId}/save`,
|
1348
|
+
});
|
1349
|
+
}
|
1350
|
+
/**
|
1351
|
+
* Cancel stateful configuration
|
1352
|
+
* @param stateId string
|
1353
|
+
* @param configurationId string
|
1354
|
+
*/
|
1355
|
+
cancelConfiguration(stateId, configurationId) {
|
1356
|
+
return this.httpService.api({
|
1357
|
+
method: 'post',
|
1358
|
+
url: `${this.SERVICE_URL}/quote/${stateId}/configuration/${configurationId}/cancel`,
|
1359
|
+
});
|
1360
|
+
}
|
1361
|
+
}
|
1362
|
+
FlowStateApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1363
|
+
FlowStateApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateApiService });
|
1364
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateApiService, decorators: [{
|
1365
|
+
type: Injectable
|
1366
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1367
|
+
|
1109
1368
|
class FlowsApiService {
|
1110
1369
|
constructor(configurationSettingsApiService) {
|
1111
1370
|
this.configurationSettingsApiService = configurationSettingsApiService;
|
1112
1371
|
this.flowsKey = 'flows';
|
1113
1372
|
}
|
1114
1373
|
getFlow(id) {
|
1115
|
-
return this.fetchFlows().pipe(map(flows => flows.find(flow => flow.id == id))
|
1374
|
+
return this.fetchFlows().pipe(map(flows => flows.find(flow => flow.id == id)), map(flow => {
|
1375
|
+
if (!flow) {
|
1376
|
+
throw new Error(`Flow with flowId=${id} is not defined`);
|
1377
|
+
}
|
1378
|
+
return flow;
|
1379
|
+
}));
|
1116
1380
|
}
|
1117
1381
|
fetchFlows() {
|
1118
|
-
return this.configurationSettingsApiService
|
1119
|
-
.fetchSetting(this.flowsKey)
|
1120
|
-
.pipe(map((flow) => (flow?.value ? JSON.parse(flow.value) : [])));
|
1382
|
+
return this.configurationSettingsApiService.fetchSetting(this.flowsKey).pipe(map((setting) => (setting?.value ? JSON.parse(setting.value) : [])), map(anyFlows => anyFlows.map(toLatestFlow).filter(isDefined)));
|
1121
1383
|
}
|
1122
1384
|
}
|
1123
1385
|
FlowsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
@@ -1290,21 +1552,85 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1290
1552
|
type: Injectable
|
1291
1553
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1292
1554
|
|
1555
|
+
/**
|
1556
|
+
* Parses the response from Canvas and checks for errors.
|
1557
|
+
* - If an error is found, publishes an error message and returns the failover value.
|
1558
|
+
* - If no error is found, returns the parsed response.
|
1559
|
+
*
|
1560
|
+
* Note! The API call first goes to APEX before reaching the Canvas, so errors can originate from either APEX or Canvas.
|
1561
|
+
*
|
1562
|
+
* @param {string} response - The JSON string response from the Canvas call.
|
1563
|
+
* @param {T} failover - The value to return in case of error.
|
1564
|
+
* @returns {T | K} The parsed response or the failover value.
|
1565
|
+
*
|
1566
|
+
* @template T The expected type of the parsed response.
|
1567
|
+
* @template K The type of the failover value.
|
1568
|
+
*
|
1569
|
+
* @remarks If there's an Apex error, the response data can be an array.
|
1570
|
+
* In such cases, the function extracts the first element of the array.
|
1571
|
+
*/
|
1572
|
+
const handleCanvasResponse = (response, failover, errorPublisher) => {
|
1573
|
+
const parsed = JSON.parse(response);
|
1574
|
+
const errorCandidate = isArray(parsed) ? parsed[0] : parsed;
|
1575
|
+
if (isApexError(errorCandidate)) {
|
1576
|
+
errorPublisher(errorCandidate.message);
|
1577
|
+
return failover;
|
1578
|
+
}
|
1579
|
+
if (isCanvasError(errorCandidate)) {
|
1580
|
+
errorPublisher(errorCandidate.error);
|
1581
|
+
return failover;
|
1582
|
+
}
|
1583
|
+
return parsed;
|
1584
|
+
};
|
1585
|
+
|
1293
1586
|
class OrgInfoApiService {
|
1294
|
-
constructor(
|
1295
|
-
this.
|
1296
|
-
|
1297
|
-
|
1587
|
+
constructor(messageService) {
|
1588
|
+
this.messageService = messageService;
|
1589
|
+
/**
|
1590
|
+
* Shows an error message using the message service.
|
1591
|
+
*
|
1592
|
+
* @param {string} message - the error message to be published.
|
1593
|
+
*/
|
1594
|
+
this.publishErrorMessage = (message) => {
|
1595
|
+
this.messageService.add({ severity: 'error', summary: message, sticky: true });
|
1596
|
+
};
|
1597
|
+
}
|
1598
|
+
getOrgInfo$() {
|
1599
|
+
try {
|
1600
|
+
return window.doCanvasCall && window.ORGANIZATION_ID
|
1601
|
+
? from(window.doCanvasCall(`org-info/${window.ORGANIZATION_ID}`, null)).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
|
1602
|
+
: of(undefined);
|
1603
|
+
}
|
1604
|
+
catch {
|
1605
|
+
return of(undefined);
|
1606
|
+
}
|
1298
1607
|
}
|
1299
|
-
|
1300
|
-
|
1608
|
+
getAvailableVersionsInfo$() {
|
1609
|
+
try {
|
1610
|
+
return window.doCanvasCall && window.ORGANIZATION_ID
|
1611
|
+
? from(window.doCanvasCall('versions/available', 'include_all=true')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
|
1612
|
+
: of(undefined);
|
1613
|
+
}
|
1614
|
+
catch {
|
1615
|
+
return of(undefined);
|
1616
|
+
}
|
1617
|
+
}
|
1618
|
+
upgradeVersion$(targetVersion) {
|
1619
|
+
try {
|
1620
|
+
return window.doCanvasCall && window.ORGANIZATION_ID
|
1621
|
+
? from(window.doCanvasCall('versions/upgrade', `target_version=${targetVersion}`)).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
|
1622
|
+
: of(undefined);
|
1623
|
+
}
|
1624
|
+
catch {
|
1625
|
+
return of(undefined);
|
1626
|
+
}
|
1301
1627
|
}
|
1302
1628
|
}
|
1303
|
-
OrgInfoApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService, deps: [{ token: i1$
|
1629
|
+
OrgInfoApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService, deps: [{ token: i1$2.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1304
1630
|
OrgInfoApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService });
|
1305
1631
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService, decorators: [{
|
1306
1632
|
type: Injectable
|
1307
|
-
}], ctorParameters: function () { return [{ type: i1$
|
1633
|
+
}], ctorParameters: function () { return [{ type: i1$2.MessageService }]; } });
|
1308
1634
|
|
1309
1635
|
class PicklistsApiService {
|
1310
1636
|
constructor(baseHttpService) {
|
@@ -1344,6 +1670,78 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1344
1670
|
type: Injectable
|
1345
1671
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1346
1672
|
|
1673
|
+
class PortalsApiService {
|
1674
|
+
constructor(baseHttpService) {
|
1675
|
+
this.baseHttpService = baseHttpService;
|
1676
|
+
this.serviceUrl = '/admin/portal';
|
1677
|
+
this.getPortals$ = (skip = 1, name = '') => {
|
1678
|
+
let params = new HttpParams();
|
1679
|
+
params = params.append('count', (PortalsApiService.MAX_RESULTS * skip).toString());
|
1680
|
+
params = params.append('skip', '0');
|
1681
|
+
params = params.append('name', name);
|
1682
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}`, params });
|
1683
|
+
};
|
1684
|
+
this.searchPortals$ = (skip = 0, expression) => {
|
1685
|
+
let params = new HttpParams();
|
1686
|
+
params = params.set('skip', '' + skip);
|
1687
|
+
params = params.set('count', '' + PortalsApiService.MAX_RESULTS);
|
1688
|
+
return this.baseHttpService.api({
|
1689
|
+
method: 'post',
|
1690
|
+
url: `${this.serviceUrl}/search`,
|
1691
|
+
params,
|
1692
|
+
body: expression || {},
|
1693
|
+
});
|
1694
|
+
};
|
1695
|
+
this.removePortal$ = (id) => {
|
1696
|
+
return this.baseHttpService.api({
|
1697
|
+
url: `${this.serviceUrl}/${id}`,
|
1698
|
+
method: 'delete',
|
1699
|
+
});
|
1700
|
+
};
|
1701
|
+
this.restore$ = (id) => {
|
1702
|
+
return this.baseHttpService.api({
|
1703
|
+
method: 'patch',
|
1704
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
1705
|
+
});
|
1706
|
+
};
|
1707
|
+
this.duplicatePortal$ = (cloneRequest) => {
|
1708
|
+
return this.baseHttpService.api({
|
1709
|
+
url: `${this.serviceUrl}/${cloneRequest.id}/clone`,
|
1710
|
+
method: 'post',
|
1711
|
+
body: cloneRequest,
|
1712
|
+
});
|
1713
|
+
};
|
1714
|
+
this.getPortal$ = (id) => {
|
1715
|
+
return this.baseHttpService.api({
|
1716
|
+
url: `${this.serviceUrl}/${id}`,
|
1717
|
+
});
|
1718
|
+
};
|
1719
|
+
}
|
1720
|
+
createNewPortal$(body) {
|
1721
|
+
return this.baseHttpService.api({
|
1722
|
+
url: `${this.serviceUrl}`,
|
1723
|
+
method: 'post',
|
1724
|
+
body,
|
1725
|
+
});
|
1726
|
+
}
|
1727
|
+
updatePortal$(portal, settings) {
|
1728
|
+
return this.baseHttpService.api({
|
1729
|
+
url: `${this.serviceUrl}/${portal.id}`,
|
1730
|
+
method: 'put',
|
1731
|
+
body: {
|
1732
|
+
...portal,
|
1733
|
+
settings: JSON.stringify(settings),
|
1734
|
+
},
|
1735
|
+
});
|
1736
|
+
}
|
1737
|
+
}
|
1738
|
+
PortalsApiService.MAX_RESULTS = 60;
|
1739
|
+
PortalsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PortalsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1740
|
+
PortalsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PortalsApiService });
|
1741
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PortalsApiService, decorators: [{
|
1742
|
+
type: Injectable
|
1743
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1744
|
+
|
1347
1745
|
class PriceApiService {
|
1348
1746
|
constructor(httpService) {
|
1349
1747
|
this.httpService = httpService;
|
@@ -1491,6 +1889,12 @@ class ProceduresApiService {
|
|
1491
1889
|
body,
|
1492
1890
|
});
|
1493
1891
|
}
|
1892
|
+
fetchDefaultPricingSteps$() {
|
1893
|
+
return this.baseHttpService.api({
|
1894
|
+
url: `${this.ADMIN_SERVICE_URL}/pricing-steps`,
|
1895
|
+
method: 'get',
|
1896
|
+
});
|
1897
|
+
}
|
1494
1898
|
}
|
1495
1899
|
ProceduresApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1496
1900
|
ProceduresApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService });
|
@@ -1945,7 +2349,9 @@ class QuoteApiService {
|
|
1945
2349
|
this.httpService = httpService;
|
1946
2350
|
this.SERVICE_URL = '/quotes';
|
1947
2351
|
}
|
1948
|
-
|
2352
|
+
/**
|
2353
|
+
* @deprecated Use getQuoteState instead
|
2354
|
+
*/
|
1949
2355
|
getQuoteDraft(objectId, params, errorHandler) {
|
1950
2356
|
return this.httpService.api({
|
1951
2357
|
method: 'get',
|
@@ -1954,6 +2360,20 @@ class QuoteApiService {
|
|
1954
2360
|
errorHandler,
|
1955
2361
|
});
|
1956
2362
|
}
|
2363
|
+
/**
|
2364
|
+
* Comparing to deprecated `getQuoteDraft` this endpoint doesn't include orders and assets
|
2365
|
+
* @param objectId quoteId | accountId | opportunityId | orderId
|
2366
|
+
* @param params Query params
|
2367
|
+
* @param options Request options
|
2368
|
+
*/
|
2369
|
+
getQuoteState(objectId, params, options) {
|
2370
|
+
return this.httpService.api({
|
2371
|
+
method: 'get',
|
2372
|
+
url: `/v2${this.SERVICE_URL}/${objectId}`,
|
2373
|
+
params,
|
2374
|
+
...options,
|
2375
|
+
});
|
2376
|
+
}
|
1957
2377
|
upsertQuote(request, options) {
|
1958
2378
|
return this.httpService.api({
|
1959
2379
|
method: 'post',
|
@@ -2264,13 +2684,22 @@ class RulesApiService {
|
|
2264
2684
|
});
|
2265
2685
|
}
|
2266
2686
|
execute$(body) {
|
2267
|
-
const url = body.rule.ruleGroupType
|
2687
|
+
const url = this.getExecuteRuleUrl(body.rule.ruleGroupType);
|
2268
2688
|
return this.baseHttpService.api({
|
2269
2689
|
url,
|
2270
2690
|
method: 'post',
|
2271
2691
|
body,
|
2272
2692
|
});
|
2273
2693
|
}
|
2694
|
+
getExecuteRuleUrl(ruleGroupType) {
|
2695
|
+
if (ruleGroupType === RuleGroupTypes.eligibility) {
|
2696
|
+
return '/rules/eligibility/execute';
|
2697
|
+
}
|
2698
|
+
if (ruleGroupType === RuleGroupTypes.catalog) {
|
2699
|
+
return '/rules/catalog/execute';
|
2700
|
+
}
|
2701
|
+
return '/rules/execute';
|
2702
|
+
}
|
2274
2703
|
}
|
2275
2704
|
RulesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2276
2705
|
RulesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService });
|
@@ -2320,11 +2749,13 @@ class ScriptsApiService {
|
|
2320
2749
|
});
|
2321
2750
|
};
|
2322
2751
|
this.cloneScript$ = (cloneRequest) => {
|
2323
|
-
return this.baseHttpService
|
2752
|
+
return this.baseHttpService
|
2753
|
+
.api({
|
2324
2754
|
url: `${this.serviceUrl}/${cloneRequest.id}/clone`,
|
2325
2755
|
method: 'post',
|
2326
2756
|
body: cloneRequest,
|
2327
|
-
})
|
2757
|
+
})
|
2758
|
+
.pipe(map(response => response.clonedRecordId));
|
2328
2759
|
};
|
2329
2760
|
this.removeScript$ = (id) => {
|
2330
2761
|
return this.baseHttpService.api({
|
@@ -2726,6 +3157,11 @@ class UITemplatesApiService {
|
|
2726
3157
|
this.fetchComponentAttachmentFile$(templateId, component.id, 'json'),
|
2727
3158
|
]).pipe(map$1(([html, js, css, json]) => ({ html, js, css, json })));
|
2728
3159
|
};
|
3160
|
+
this.fetchComponentsAttachments$ = (templateId) => {
|
3161
|
+
return this.fetchComponents$(templateId).pipe(switchMap$1(components => {
|
3162
|
+
return forkJoin(components.map(component => this.fetchComponentAttachments$(templateId, component)));
|
3163
|
+
}));
|
3164
|
+
};
|
2729
3165
|
this.fetchComponentAttachmentFile$ = (templateId, componentId, attachmentType) => {
|
2730
3166
|
return this.baseHttpService
|
2731
3167
|
.api({
|
@@ -2814,6 +3250,15 @@ class VeloceObjectsApiService {
|
|
2814
3250
|
url: `${this.serviceUrl}/${id}`,
|
2815
3251
|
});
|
2816
3252
|
};
|
3253
|
+
this.duplicateObject$ = (body) => {
|
3254
|
+
return this.baseHttpService
|
3255
|
+
.api({
|
3256
|
+
method: 'post',
|
3257
|
+
url: `${this.serviceUrl}/${body.id}/clone`,
|
3258
|
+
body,
|
3259
|
+
})
|
3260
|
+
.pipe(map(response => response.clonedRecordId));
|
3261
|
+
};
|
2817
3262
|
this.restoreObject$ = (id) => {
|
2818
3263
|
return this.baseHttpService.api({
|
2819
3264
|
method: 'patch',
|
@@ -2858,6 +3303,95 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
2858
3303
|
type: Injectable
|
2859
3304
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2860
3305
|
|
3306
|
+
class SandboxManagerApiService {
|
3307
|
+
constructor(messageService) {
|
3308
|
+
this.messageService = messageService;
|
3309
|
+
/**
|
3310
|
+
* Shows an error message using the message service.
|
3311
|
+
*
|
3312
|
+
* @param {string} message - the error message to be published.
|
3313
|
+
*/
|
3314
|
+
this.publishErrorMessage = (message) => {
|
3315
|
+
this.messageService.add({ severity: 'error', summary: message, sticky: true });
|
3316
|
+
};
|
3317
|
+
}
|
3318
|
+
getSalesforceOrganizations$() {
|
3319
|
+
try {
|
3320
|
+
return window.doSandboxCall
|
3321
|
+
? from(window.doSandboxCall('orgs', '', 'GET')).pipe(map$1(response => handleCanvasResponse(response, [], this.publishErrorMessage)), catchError$1(() => of([])))
|
3322
|
+
: of([]);
|
3323
|
+
}
|
3324
|
+
catch {
|
3325
|
+
return of([]);
|
3326
|
+
}
|
3327
|
+
}
|
3328
|
+
getAvailableSalesforceOrganizationSizes$() {
|
3329
|
+
try {
|
3330
|
+
return window.doSandboxCall
|
3331
|
+
? from(window.doSandboxCall('available-sizes', '', 'GET')).pipe(map$1(response => handleCanvasResponse(response, {}, this.publishErrorMessage)), catchError$1(() => of({})))
|
3332
|
+
: of({});
|
3333
|
+
}
|
3334
|
+
catch {
|
3335
|
+
return of({});
|
3336
|
+
}
|
3337
|
+
}
|
3338
|
+
createSalesforceOrganization$(payload) {
|
3339
|
+
try {
|
3340
|
+
return window.doSandboxCall
|
3341
|
+
? from(window.doSandboxCall('orgs', JSON.stringify(payload), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
|
3342
|
+
: of(undefined);
|
3343
|
+
}
|
3344
|
+
catch (err) {
|
3345
|
+
return of(undefined);
|
3346
|
+
}
|
3347
|
+
}
|
3348
|
+
updateSalesforceOrganization$(payload) {
|
3349
|
+
try {
|
3350
|
+
return window.doSandboxCall
|
3351
|
+
? from(window.doSandboxCall(`orgs/${payload.orgId}`, JSON.stringify(payload), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
|
3352
|
+
: of(undefined);
|
3353
|
+
}
|
3354
|
+
catch {
|
3355
|
+
return of(undefined);
|
3356
|
+
}
|
3357
|
+
}
|
3358
|
+
deleteSalesforceOrganization$(payload) {
|
3359
|
+
try {
|
3360
|
+
return window.doSandboxCall
|
3361
|
+
? from(window.doSandboxCall(`orgs/${payload.orgId}`, '', 'DELETE')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
|
3362
|
+
: of(undefined);
|
3363
|
+
}
|
3364
|
+
catch {
|
3365
|
+
return of(undefined);
|
3366
|
+
}
|
3367
|
+
}
|
3368
|
+
activateSalesforceOrganization$(payload) {
|
3369
|
+
try {
|
3370
|
+
return window.doSandboxCall
|
3371
|
+
? from(window.doSandboxCall(`orgs/${payload.orgId}/activate`, JSON.stringify({}), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
|
3372
|
+
: of(undefined);
|
3373
|
+
}
|
3374
|
+
catch {
|
3375
|
+
return of(undefined);
|
3376
|
+
}
|
3377
|
+
}
|
3378
|
+
deactivateSalesforceOrganization$(payload) {
|
3379
|
+
try {
|
3380
|
+
return window.doSandboxCall
|
3381
|
+
? from(window.doSandboxCall(`orgs/${payload.orgId}/deactivate`, JSON.stringify({}), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
|
3382
|
+
: of(undefined);
|
3383
|
+
}
|
3384
|
+
catch {
|
3385
|
+
return of(undefined);
|
3386
|
+
}
|
3387
|
+
}
|
3388
|
+
}
|
3389
|
+
SandboxManagerApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SandboxManagerApiService, deps: [{ token: i1$2.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
3390
|
+
SandboxManagerApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SandboxManagerApiService });
|
3391
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SandboxManagerApiService, decorators: [{
|
3392
|
+
type: Injectable
|
3393
|
+
}], ctorParameters: function () { return [{ type: i1$2.MessageService }]; } });
|
3394
|
+
|
2861
3395
|
class ApiModule {
|
2862
3396
|
}
|
2863
3397
|
ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
@@ -2900,6 +3434,11 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
|
2900
3434
|
RebateTypeApiService,
|
2901
3435
|
PromotionsApiService,
|
2902
3436
|
VeloceAuthService,
|
3437
|
+
ContractedPriceApiService,
|
3438
|
+
PortalsApiService,
|
3439
|
+
ConfigurationProcessorsApiService,
|
3440
|
+
FlowStateApiService,
|
3441
|
+
SandboxManagerApiService,
|
2903
3442
|
], imports: [HttpClientModule] });
|
2904
3443
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, decorators: [{
|
2905
3444
|
type: NgModule,
|
@@ -2943,6 +3482,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
2943
3482
|
RebateTypeApiService,
|
2944
3483
|
PromotionsApiService,
|
2945
3484
|
VeloceAuthService,
|
3485
|
+
ContractedPriceApiService,
|
3486
|
+
PortalsApiService,
|
3487
|
+
ConfigurationProcessorsApiService,
|
3488
|
+
FlowStateApiService,
|
3489
|
+
SandboxManagerApiService,
|
2946
3490
|
],
|
2947
3491
|
}]
|
2948
3492
|
}] });
|
@@ -2951,5 +3495,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
2951
3495
|
* Generated bundle index. Do not edit.
|
2952
3496
|
*/
|
2953
3497
|
|
2954
|
-
export { AccountApiService, ApiModule, CatalogAdminApiService, CatalogApiService, ConfigurationApiService, ConfigurationSettingsApiService, ContextApiService, DeltaApiService, DocumentAttachmentApiService, DocumentTemplatesApiService, EndpointsApiService, FlowsApiService, GuidedSellingApiService, GuidedSellingsAdminApiService, OffersApiService, OrgInfoApiService, PicklistsApiService, PriceApiService, ProceduresApiService, ProductApiService, ProductModelApiService, PromotionsApiService, QuoteApiService, RampApiService, RebateProgramApiService, RebateTypeApiService, RuleGroupsApiService, RulesApiService, SalesforceApiService, ScriptsApiService, ShoppingCartSettingsApiService, StatefulConfigurationApiService, UIDefinitionsApiService, UITemplatesApiService, VeloceAuthService, VeloceObjectsApiService };
|
3498
|
+
export { AccountApiService, ApiModule, CatalogAdminApiService, CatalogApiService, ConfigurationApiService, ConfigurationProcessorsApiService, ConfigurationSettingsApiService, ContextApiService, ContractedPriceApiService, DeltaApiService, DocumentAttachmentApiService, DocumentTemplatesApiService, EndpointsApiService, FlowStateApiService, FlowsApiService, GuidedSellingApiService, GuidedSellingsAdminApiService, OffersApiService, OrgInfoApiService, PicklistsApiService, PortalsApiService, PriceApiService, ProceduresApiService, ProductApiService, ProductModelApiService, PromotionsApiService, QuoteApiService, RampApiService, RebateProgramApiService, RebateTypeApiService, RuleGroupsApiService, RulesApiService, SalesforceApiService, SandboxManagerApiService, ScriptsApiService, ShoppingCartSettingsApiService, StatefulConfigurationApiService, UIDefinitionsApiService, UITemplatesApiService, VeloceAuthService, VeloceObjectsApiService };
|
2955
3499
|
//# sourceMappingURL=veloceapps-api.mjs.map
|