@veloceapps/api 8.0.0-2 → 8.0.0-200
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 +10 -1
- package/esm2020/lib/api.module.mjs +32 -5
- package/esm2020/lib/services/account-api.service.mjs +11 -4
- package/esm2020/lib/services/auth.service.mjs +22 -0
- package/esm2020/lib/services/catalog-admin-api.service.mjs +3 -3
- package/esm2020/lib/services/catalog-api.service.mjs +3 -3
- package/esm2020/lib/services/configuration-api.service.mjs +48 -15
- package/esm2020/lib/services/configuration-processors-api.service.mjs +38 -0
- package/esm2020/lib/services/configuration-settings-api.service.mjs +3 -3
- package/esm2020/lib/services/context-api.service.mjs +3 -3
- package/esm2020/lib/services/contracted-price-api.service.mjs +45 -0
- package/esm2020/lib/services/delta-api.service.mjs +3 -3
- package/esm2020/lib/services/document-attachment-api.service.mjs +3 -3
- package/esm2020/lib/services/document-templates-api.service.mjs +9 -7
- package/esm2020/lib/services/endpoints-api.service.mjs +3 -3
- package/esm2020/lib/services/flow-state-api.mjs +142 -0
- package/esm2020/lib/services/flows-api.service.mjs +12 -8
- package/esm2020/lib/services/guided-sellings-admin-api.service.mjs +3 -3
- package/esm2020/lib/services/guided-sellings-api.service.mjs +3 -3
- package/esm2020/lib/services/offers-api.service.mjs +3 -3
- package/esm2020/lib/services/org-info-api.service.mjs +47 -12
- package/esm2020/lib/services/picklists-api.service.mjs +3 -3
- package/esm2020/lib/services/portals-api.service.mjs +76 -0
- package/esm2020/lib/services/price-api.service.mjs +3 -3
- package/esm2020/lib/services/procedures-api.service.mjs +10 -4
- package/esm2020/lib/services/product-api.service.mjs +3 -3
- package/esm2020/lib/services/product-model-api.service.mjs +3 -3
- package/esm2020/lib/services/promotions-api.service.mjs +68 -0
- package/esm2020/lib/services/quote-api.service.mjs +21 -5
- package/esm2020/lib/services/ramp-api.service.mjs +3 -3
- package/esm2020/lib/services/rebate-program-api.service.mjs +68 -0
- package/esm2020/lib/services/rebate-type-api.service.mjs +68 -0
- package/esm2020/lib/services/rule-groups-api.service.mjs +3 -3
- package/esm2020/lib/services/rules-api.service.mjs +20 -7
- package/esm2020/lib/services/salesforce-api.service.mjs +7 -5
- package/esm2020/lib/services/sandbox-manager-api.service.mjs +94 -0
- package/esm2020/lib/services/scripts-api.service.mjs +15 -8
- package/esm2020/lib/services/shopping-cart-settings-api.service.mjs +3 -3
- package/esm2020/lib/services/stateful-configuration-api.mjs +4 -4
- package/esm2020/lib/services/ui-definitions-api.service.mjs +3 -3
- package/esm2020/lib/services/ui-templates-api.service.mjs +9 -4
- package/esm2020/lib/services/veloce-objects-api.service.mjs +14 -4
- package/esm2020/lib/types/auth.types.mjs +2 -0
- package/esm2020/lib/types/index.mjs +3 -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 +891 -143
- package/fesm2015/veloceapps-api.mjs.map +1 -1
- package/fesm2020/veloceapps-api.mjs +906 -139
- package/fesm2020/veloceapps-api.mjs.map +1 -1
- package/index.d.ts +9 -0
- package/lib/services/account-api.service.d.ts +2 -1
- package/lib/services/auth.service.d.ts +11 -0
- 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/promotions-api.service.d.ts +19 -0
- package/lib/services/quote-api.service.d.ts +13 -6
- package/lib/services/rebate-program-api.service.d.ts +19 -0
- package/lib/services/rebate-type-api.service.d.ts +19 -0
- package/lib/services/rules-api.service.d.ts +2 -1
- 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 +2 -2
- 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/auth.types.d.ts +4 -0
- package/lib/types/index.d.ts +2 -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
@@ -1,15 +1,15 @@
|
|
1
|
-
import * as
|
2
|
-
import { HttpParams, HttpErrorResponse, HttpClientModule } from '@angular/common/http';
|
1
|
+
import * as i1$1 from '@angular/common/http';
|
2
|
+
import { HttpParams, HttpHeaders, HttpErrorResponse, HttpClientModule } from '@angular/common/http';
|
3
3
|
import * as i0 from '@angular/core';
|
4
4
|
import { Injectable, NgModule } from '@angular/core';
|
5
5
|
import * as i1 from '@veloceapps/core';
|
6
|
-
import { uiDefinitionFromDTO,
|
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
|
import { __rest } from 'tslib';
|
15
15
|
|
@@ -28,6 +28,9 @@ class AccountApiService {
|
|
28
28
|
getAccount$(id, options) {
|
29
29
|
return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/${id}` }, options));
|
30
30
|
}
|
31
|
+
getAssetsState(accountId, options) {
|
32
|
+
return this.httpService.api(Object.assign({ method: 'get', url: `/v2${this.SERVICE_URL}/${accountId}/assets` }, options));
|
33
|
+
}
|
31
34
|
getAssets(accountId, options) {
|
32
35
|
return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/${accountId}/assets` }, options));
|
33
36
|
}
|
@@ -53,12 +56,30 @@ class AccountApiService {
|
|
53
56
|
return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/${accountId}/orders/${orderId}/to-asset`, method: 'post', body: { id: orderId } }, options));
|
54
57
|
}
|
55
58
|
}
|
56
|
-
AccountApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
57
|
-
AccountApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
58
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
59
|
+
AccountApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AccountApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
60
|
+
AccountApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AccountApiService });
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AccountApiService, decorators: [{
|
59
62
|
type: Injectable
|
60
63
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
61
64
|
|
65
|
+
class VeloceAuthService {
|
66
|
+
constructor(http) {
|
67
|
+
this.http = http;
|
68
|
+
}
|
69
|
+
auth$(instanceUrl, accessToken) {
|
70
|
+
const headers = new HttpHeaders({
|
71
|
+
'Content-Type': 'application/json',
|
72
|
+
Authorization: `Bearer ${accessToken}`,
|
73
|
+
});
|
74
|
+
return this.http.get(`${instanceUrl}/services/apexrest/VELOCPQ/veloce-auth`, { headers });
|
75
|
+
}
|
76
|
+
}
|
77
|
+
VeloceAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceAuthService, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
78
|
+
VeloceAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceAuthService });
|
79
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceAuthService, decorators: [{
|
80
|
+
type: Injectable
|
81
|
+
}], ctorParameters: function () { return [{ type: i1$1.HttpClient }]; } });
|
82
|
+
|
62
83
|
class CatalogAdminApiService {
|
63
84
|
constructor(baseHttpService) {
|
64
85
|
this.baseHttpService = baseHttpService;
|
@@ -240,9 +261,9 @@ class CatalogAdminApiService {
|
|
240
261
|
}
|
241
262
|
}
|
242
263
|
CatalogAdminApiService.MAX_RESULTS = 60;
|
243
|
-
CatalogAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
244
|
-
CatalogAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
264
|
+
CatalogAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
265
|
+
CatalogAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogAdminApiService });
|
266
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogAdminApiService, decorators: [{
|
246
267
|
type: Injectable
|
247
268
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
248
269
|
|
@@ -326,9 +347,9 @@ class CatalogApiService {
|
|
326
347
|
});
|
327
348
|
}
|
328
349
|
}
|
329
|
-
CatalogApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
330
|
-
CatalogApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
331
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
350
|
+
CatalogApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
351
|
+
CatalogApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogApiService });
|
352
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogApiService, decorators: [{
|
332
353
|
type: Injectable
|
333
354
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
334
355
|
|
@@ -354,6 +375,23 @@ class ConfigurationApiService {
|
|
354
375
|
}
|
355
376
|
}));
|
356
377
|
}
|
378
|
+
customConfigurePrice({ url, configurationRequest, runtimeModel, }) {
|
379
|
+
return this.httpService
|
380
|
+
.api({
|
381
|
+
method: 'post',
|
382
|
+
url,
|
383
|
+
body: configurationRequest,
|
384
|
+
errorHandler: e => throwError(e),
|
385
|
+
})
|
386
|
+
.pipe(map(configurePrice => {
|
387
|
+
if (runtimeModel) {
|
388
|
+
return Object.assign(Object.assign({}, configurePrice), { lineItem: this.updatePortDomains(configurePrice.lineItem, runtimeModel) });
|
389
|
+
}
|
390
|
+
else {
|
391
|
+
return configurePrice;
|
392
|
+
}
|
393
|
+
}));
|
394
|
+
}
|
357
395
|
getRuntimeDataByProductId(productId, offeringId) {
|
358
396
|
return this.httpService
|
359
397
|
.api({
|
@@ -361,13 +399,7 @@ class ConfigurationApiService {
|
|
361
399
|
url: `${this.SERVICE_URL}/${productId}/model` + ((offeringId && `/${offeringId}`) || ''),
|
362
400
|
})
|
363
401
|
.pipe(map(runtimeData => {
|
364
|
-
return Object.assign(Object.assign({}, runtimeData), { uiDefinitions: runtimeData.uiDefinitions.map(dto =>
|
365
|
-
const uiDefinitionContainer = uiDefinitionFromDTO(dto);
|
366
|
-
if (isLegacyUIDefinition(uiDefinitionContainer.source)) {
|
367
|
-
ModelTranslatorUtils.toLocalUIDefinition(uiDefinitionContainer.source);
|
368
|
-
}
|
369
|
-
return uiDefinitionContainer;
|
370
|
-
}) });
|
402
|
+
return Object.assign(Object.assign({}, runtimeData), { uiDefinitions: runtimeData.uiDefinitions.map(dto => uiDefinitionFromDTO(dto)) });
|
371
403
|
}));
|
372
404
|
}
|
373
405
|
getRuntimeDataByModelId(modelId) {
|
@@ -380,18 +412,69 @@ class ConfigurationApiService {
|
|
380
412
|
var _a, _b, _c;
|
381
413
|
const type = runtimeModel.components.get(lineItem.type);
|
382
414
|
const portDomains = Object.assign({}, lineItem.portDomains);
|
415
|
+
// loop through ports to look for 'None' type domain computations
|
383
416
|
for (const port of (_a = type === null || type === void 0 ? void 0 : type.ports) !== null && _a !== void 0 ? _a : []) {
|
384
|
-
const
|
385
|
-
|
386
|
-
|
417
|
+
const { name: portName, type: typeName, min, max, domainTypes, properties } = port;
|
418
|
+
const portDomain = portDomains[portName];
|
419
|
+
if (portDomain) {
|
420
|
+
// there's a 'None' type domain computation
|
421
|
+
if (((_b = portDomain.properties) === null || _b === void 0 ? void 0 : _b['domainComputation']) === ('None')) {
|
422
|
+
portDomain.domainTypes = domainTypes;
|
423
|
+
}
|
424
|
+
}
|
425
|
+
else {
|
426
|
+
// there's no port domain so consider that as 'None' type domain computation
|
427
|
+
portDomains[portName] = {
|
428
|
+
name: portName,
|
429
|
+
type: typeName,
|
430
|
+
minCard: Number(min),
|
431
|
+
maxCard: Number(max),
|
432
|
+
domainTypes: domainTypes,
|
433
|
+
properties: Object.assign(Object.assign({}, properties), { domainComputation: 'None' }),
|
434
|
+
};
|
387
435
|
}
|
388
436
|
}
|
389
437
|
return Object.assign(Object.assign({}, lineItem), { lineItems: (_c = lineItem.lineItems) === null || _c === void 0 ? void 0 : _c.map(i => this.updatePortDomains(i, runtimeModel)), portDomains });
|
390
438
|
}
|
391
439
|
}
|
392
|
-
ConfigurationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
393
|
-
ConfigurationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
394
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
440
|
+
ConfigurationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
441
|
+
ConfigurationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationApiService });
|
442
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationApiService, decorators: [{
|
443
|
+
type: Injectable
|
444
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
445
|
+
|
446
|
+
class ConfigurationProcessorsApiService {
|
447
|
+
constructor(baseHttpService) {
|
448
|
+
this.baseHttpService = baseHttpService;
|
449
|
+
this.serviceUrl = '/configuration/processors/owners';
|
450
|
+
this.fetchConfigurationProcessors$ = (ownerId) => {
|
451
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${ownerId}` });
|
452
|
+
};
|
453
|
+
this.createConfigurationProcessors$ = (configurationProcessor) => {
|
454
|
+
return this.baseHttpService.api({
|
455
|
+
method: 'post',
|
456
|
+
url: `${this.serviceUrl}/${configurationProcessor.ownerId}`,
|
457
|
+
body: configurationProcessor,
|
458
|
+
});
|
459
|
+
};
|
460
|
+
this.updateConfigurationProcessors$ = (configurationProcessor) => {
|
461
|
+
return this.baseHttpService.api({
|
462
|
+
method: 'put',
|
463
|
+
url: `${this.serviceUrl}/${configurationProcessor.ownerId}/${configurationProcessor.id}`,
|
464
|
+
body: configurationProcessor,
|
465
|
+
});
|
466
|
+
};
|
467
|
+
this.deleteConfigurationProcessors$ = (configurationProcessor) => {
|
468
|
+
return this.baseHttpService.api({
|
469
|
+
method: 'delete',
|
470
|
+
url: `${this.serviceUrl}/${configurationProcessor.ownerId}/${configurationProcessor.id}`,
|
471
|
+
});
|
472
|
+
};
|
473
|
+
}
|
474
|
+
}
|
475
|
+
ConfigurationProcessorsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
476
|
+
ConfigurationProcessorsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService });
|
477
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService, decorators: [{
|
395
478
|
type: Injectable
|
396
479
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
397
480
|
|
@@ -464,11 +547,11 @@ class ConfigurationSettingsApiService {
|
|
464
547
|
return this.httpService.api(Object.assign({ method: 'get', url: '/cache/evict/' + name }, options));
|
465
548
|
}
|
466
549
|
}
|
467
|
-
ConfigurationSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
468
|
-
ConfigurationSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
469
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
550
|
+
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 });
|
551
|
+
ConfigurationSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService });
|
552
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService, decorators: [{
|
470
553
|
type: Injectable
|
471
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type:
|
554
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i1$2.MessageService }]; } });
|
472
555
|
|
473
556
|
class ContextApiService {
|
474
557
|
constructor(httpService) {
|
@@ -486,9 +569,50 @@ class ContextApiService {
|
|
486
569
|
});
|
487
570
|
}
|
488
571
|
}
|
489
|
-
ContextApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
490
|
-
ContextApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
491
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
572
|
+
ContextApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
573
|
+
ContextApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextApiService });
|
574
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextApiService, decorators: [{
|
575
|
+
type: Injectable
|
576
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
577
|
+
|
578
|
+
class ContractedPriceApiService {
|
579
|
+
constructor(baseHttpService) {
|
580
|
+
this.baseHttpService = baseHttpService;
|
581
|
+
this.serviceUrl = '/admin/contracted-price';
|
582
|
+
this.fetchContractedPrices$ = () => {
|
583
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}` });
|
584
|
+
};
|
585
|
+
this.fetchContractedPrice$ = (id) => {
|
586
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
587
|
+
};
|
588
|
+
this.createContractedPrice$ = (data) => {
|
589
|
+
return this.baseHttpService.api({
|
590
|
+
url: `${this.serviceUrl}`,
|
591
|
+
method: 'put',
|
592
|
+
body: data,
|
593
|
+
});
|
594
|
+
};
|
595
|
+
this.updateContractedPrice$ = (data) => {
|
596
|
+
return this.baseHttpService.api({
|
597
|
+
url: `${this.serviceUrl}/${data.id}`,
|
598
|
+
method: 'put',
|
599
|
+
body: data,
|
600
|
+
});
|
601
|
+
};
|
602
|
+
this.searchContractedPrices$ = (searchParams, expression) => {
|
603
|
+
const params = new HttpParams({ fromObject: Object.assign({}, searchParams) });
|
604
|
+
return this.baseHttpService.api({
|
605
|
+
method: 'post',
|
606
|
+
url: `${this.serviceUrl}/search`,
|
607
|
+
params,
|
608
|
+
body: expression || {},
|
609
|
+
});
|
610
|
+
};
|
611
|
+
}
|
612
|
+
}
|
613
|
+
ContractedPriceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContractedPriceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
614
|
+
ContractedPriceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContractedPriceApiService });
|
615
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContractedPriceApiService, decorators: [{
|
492
616
|
type: Injectable
|
493
617
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
494
618
|
|
@@ -506,9 +630,9 @@ class DeltaApiService {
|
|
506
630
|
});
|
507
631
|
}
|
508
632
|
}
|
509
|
-
DeltaApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
510
|
-
DeltaApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
511
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
633
|
+
DeltaApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeltaApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
634
|
+
DeltaApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeltaApiService });
|
635
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeltaApiService, decorators: [{
|
512
636
|
type: Injectable
|
513
637
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
514
638
|
|
@@ -568,9 +692,9 @@ class DocumentAttachmentApiService {
|
|
568
692
|
});
|
569
693
|
}
|
570
694
|
}
|
571
|
-
DocumentAttachmentApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
572
|
-
DocumentAttachmentApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
573
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
695
|
+
DocumentAttachmentApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentAttachmentApiService, deps: [{ token: i1.BaseHttpService }, { token: i1.FileDownloadService }], target: i0.ɵɵFactoryTarget.Injectable });
|
696
|
+
DocumentAttachmentApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentAttachmentApiService });
|
697
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentAttachmentApiService, decorators: [{
|
574
698
|
type: Injectable
|
575
699
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i1.FileDownloadService }]; } });
|
576
700
|
|
@@ -612,7 +736,9 @@ class SalesforceApiService {
|
|
612
736
|
return this.httpService.api(Object.assign({ method: 'post', url: methodUrl, body: fields }, options));
|
613
737
|
}
|
614
738
|
apexGetRequest(path, params, options) {
|
615
|
-
|
739
|
+
// this line is needed because HttpParams instance from Integration behaves wrong in studio instance of Angular
|
740
|
+
const httpParams = new HttpParams({ fromString: params.toString() });
|
741
|
+
return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/apex${path}`, params: httpParams }, options));
|
616
742
|
}
|
617
743
|
apexPostRequest(path, body, options) {
|
618
744
|
return this.httpService.api(Object.assign({ method: 'post', body, url: `${this.SERVICE_URL}/apex${path}` }, options));
|
@@ -630,9 +756,9 @@ class SalesforceApiService {
|
|
630
756
|
});
|
631
757
|
}
|
632
758
|
}
|
633
|
-
SalesforceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
634
|
-
SalesforceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
635
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
759
|
+
SalesforceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
760
|
+
SalesforceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService });
|
761
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, decorators: [{
|
636
762
|
type: Injectable
|
637
763
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
638
764
|
|
@@ -645,7 +771,7 @@ class DocumentTemplatesApiService {
|
|
645
771
|
this.http = http;
|
646
772
|
this.DOCGEN_TAG = 'docgen';
|
647
773
|
this.SERVICE_URL = '/templates';
|
648
|
-
this.DOC_GEN_URL_FALLBACK =
|
774
|
+
this.DOC_GEN_URL_FALLBACK = `${window.VELO_API}/docgen`;
|
649
775
|
this.mapSfQueryResult = (limit) => map((records) => {
|
650
776
|
if (!records.length) {
|
651
777
|
return { _result: 'No Records Found' };
|
@@ -783,11 +909,13 @@ class DocumentTemplatesApiService {
|
|
783
909
|
generateDocument(template, object, params = {}) {
|
784
910
|
const documentData$ = this.generateDocumentData(template, object, Object.assign(Object.assign({}, params), { shouldPreventDownload: true }));
|
785
911
|
return zip(this.getTemplateFile(template.id), documentData$, this.resolveAttachments$(template)).pipe(switchMap(([templateFile, data, attachments]) => {
|
786
|
-
var _a, _b, _c, _d, _e, _f;
|
912
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
787
913
|
const document = DocxTemplater.generate(templateFile, data);
|
788
914
|
const properties = (_c = (_b = (_a = object === null || object === void 0 ? void 0 : object.context) === null || _a === void 0 ? void 0 : _a.properties) !== null && _b !== void 0 ? _b : object === null || object === void 0 ? void 0 : object.properties) !== null && _c !== void 0 ? _c : {};
|
789
|
-
const documentName = properties
|
790
|
-
|
915
|
+
const documentName = ((_e = (_d = template.properties) === null || _d === void 0 ? void 0 : _d.find(({ name }) => name === 'documentName')) === null || _e === void 0 ? void 0 : _e.value) ||
|
916
|
+
properties['Name'] ||
|
917
|
+
template.name;
|
918
|
+
const documentFormat = (_f = params.documentFormat) !== null && _f !== void 0 ? _f : (_h = (_g = template.properties) === null || _g === void 0 ? void 0 : _g.find(p => p.name === 'documentFormat')) === null || _h === void 0 ? void 0 : _h.value;
|
791
919
|
if (documentFormat === 'DOCX') {
|
792
920
|
this.fileDownloadService.processDownload(document, documentName);
|
793
921
|
return of(document);
|
@@ -884,11 +1012,11 @@ class DocumentTemplatesApiService {
|
|
884
1012
|
return forkJoin(attachmentIds.map(id => this.documentAttachmentService.getAttachmentFile(id, true)));
|
885
1013
|
}
|
886
1014
|
queryObject({ objectName, resultObjectName, fields, statement }, { properties }) {
|
887
|
-
var _a;
|
1015
|
+
var _a, _b;
|
888
1016
|
const patternLimit = /(\s*limit\s\d*)/i;
|
889
1017
|
let limit = 1;
|
890
1018
|
if (statement && patternLimit.test(statement)) {
|
891
|
-
const limitStr = (_a = statement === null || statement === void 0 ? void 0 : statement.match(patternLimit)) === null || _a === void 0 ? void 0 : _a[1].trim().substring(5).trim();
|
1019
|
+
const limitStr = (_b = (_a = statement === null || statement === void 0 ? void 0 : statement.match(patternLimit)) === null || _a === void 0 ? void 0 : _a[1]) === null || _b === void 0 ? void 0 : _b.trim().substring(5).trim();
|
892
1020
|
if (limitStr) {
|
893
1021
|
limit = Number.parseInt(limitStr, 10);
|
894
1022
|
}
|
@@ -901,11 +1029,11 @@ class DocumentTemplatesApiService {
|
|
901
1029
|
return this.salesforceApiService.query(searchRequest, objectName).pipe(this.mapSfQueryResult(limit), map(value => ({ [resultObjectName]: value })));
|
902
1030
|
}
|
903
1031
|
}
|
904
|
-
DocumentTemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
905
|
-
DocumentTemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
906
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1032
|
+
DocumentTemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentTemplatesApiService, deps: [{ token: i1.BaseHttpService }, { token: SalesforceApiService }, { token: i1.FileDownloadService }, { token: DocumentAttachmentApiService }, { token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
1033
|
+
DocumentTemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentTemplatesApiService });
|
1034
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentTemplatesApiService, decorators: [{
|
907
1035
|
type: Injectable
|
908
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: SalesforceApiService }, { type: i1.FileDownloadService }, { type: DocumentAttachmentApiService }, { type:
|
1036
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: SalesforceApiService }, { type: i1.FileDownloadService }, { type: DocumentAttachmentApiService }, { type: i1$1.HttpClient }]; } });
|
909
1037
|
|
910
1038
|
class EndpointsApiService {
|
911
1039
|
constructor(baseHttpService) {
|
@@ -976,9 +1104,148 @@ class EndpointsApiService {
|
|
976
1104
|
});
|
977
1105
|
}
|
978
1106
|
}
|
979
|
-
EndpointsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
980
|
-
EndpointsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
981
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1107
|
+
EndpointsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1108
|
+
EndpointsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsApiService });
|
1109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsApiService, decorators: [{
|
1110
|
+
type: Injectable
|
1111
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1112
|
+
|
1113
|
+
class FlowStateApiService {
|
1114
|
+
constructor(httpService) {
|
1115
|
+
this.httpService = httpService;
|
1116
|
+
this.SERVICE_URL = '/configuration/states';
|
1117
|
+
}
|
1118
|
+
/**
|
1119
|
+
* Initialize flow state
|
1120
|
+
* @param request Request
|
1121
|
+
* @returns Flow initialization response, which contains session ID and result of selectors
|
1122
|
+
*/
|
1123
|
+
init(request) {
|
1124
|
+
return this.httpService.api({
|
1125
|
+
method: 'post',
|
1126
|
+
url: `${this.SERVICE_URL}/quote/start`,
|
1127
|
+
body: request,
|
1128
|
+
});
|
1129
|
+
}
|
1130
|
+
/**
|
1131
|
+
* Get existing state by ID
|
1132
|
+
* @param id ID
|
1133
|
+
* @returns Flow State
|
1134
|
+
*/
|
1135
|
+
get(id) {
|
1136
|
+
return this.httpService.api({
|
1137
|
+
url: `${this.SERVICE_URL}/${id}`,
|
1138
|
+
});
|
1139
|
+
}
|
1140
|
+
/**
|
1141
|
+
* Execute actions/selectors
|
1142
|
+
* @param id State ID
|
1143
|
+
* @param request Request
|
1144
|
+
* @returns Execute result
|
1145
|
+
*/
|
1146
|
+
execute(id, request) {
|
1147
|
+
return this.httpService.api({
|
1148
|
+
method: 'post',
|
1149
|
+
url: `${this.SERVICE_URL}/quote/${id}/execute`,
|
1150
|
+
body: request,
|
1151
|
+
});
|
1152
|
+
}
|
1153
|
+
/**
|
1154
|
+
* Save Quote in the state
|
1155
|
+
* @param id State ID
|
1156
|
+
*/
|
1157
|
+
save(id) {
|
1158
|
+
return this.httpService.api({
|
1159
|
+
method: 'post',
|
1160
|
+
url: `${this.SERVICE_URL}/quote/${id}/save`,
|
1161
|
+
});
|
1162
|
+
}
|
1163
|
+
/**
|
1164
|
+
* Submit Quote in the state
|
1165
|
+
* @param id State ID
|
1166
|
+
*/
|
1167
|
+
submit(id) {
|
1168
|
+
return this.httpService.api({
|
1169
|
+
method: 'post',
|
1170
|
+
url: `${this.SERVICE_URL}/quote/${id}/submit`,
|
1171
|
+
});
|
1172
|
+
}
|
1173
|
+
/**
|
1174
|
+
* Close Flow state
|
1175
|
+
* @param id State ID
|
1176
|
+
*/
|
1177
|
+
cancel(id) {
|
1178
|
+
return this.httpService.api({
|
1179
|
+
method: 'post',
|
1180
|
+
url: `${this.SERVICE_URL}/quote/${id}/cancel`,
|
1181
|
+
});
|
1182
|
+
}
|
1183
|
+
/**
|
1184
|
+
* Initialize stateful configuration
|
1185
|
+
* @param stateId string
|
1186
|
+
* @param request Request
|
1187
|
+
* @returns Flow initialization response, which contains session ID and result of selectors
|
1188
|
+
*/
|
1189
|
+
newConfiguration(stateId, request) {
|
1190
|
+
return this.httpService.api({
|
1191
|
+
method: 'post',
|
1192
|
+
url: `${this.SERVICE_URL}/quote/${stateId}/configuration/new`,
|
1193
|
+
body: request,
|
1194
|
+
});
|
1195
|
+
}
|
1196
|
+
/**
|
1197
|
+
* Start stateful configuration
|
1198
|
+
* @param stateId string
|
1199
|
+
* @param request Request
|
1200
|
+
* @returns Flow initialization response, which contains session ID and result of selectors
|
1201
|
+
*/
|
1202
|
+
startConfiguration(stateId, request) {
|
1203
|
+
return this.httpService.api({
|
1204
|
+
method: 'post',
|
1205
|
+
url: `${this.SERVICE_URL}/quote/${stateId}/configuration/start`,
|
1206
|
+
body: request,
|
1207
|
+
});
|
1208
|
+
}
|
1209
|
+
/**
|
1210
|
+
* Execute stateful configuration
|
1211
|
+
* @param stateId string
|
1212
|
+
* @param configurationId string
|
1213
|
+
* @param request Request
|
1214
|
+
* @returns Flow initialization response, which contains session ID and result of selectors
|
1215
|
+
*/
|
1216
|
+
executeConfiguration(stateId, configurationId, request) {
|
1217
|
+
return this.httpService.api({
|
1218
|
+
method: 'post',
|
1219
|
+
url: `${this.SERVICE_URL}/quote/${stateId}/configuration/${configurationId}/execute`,
|
1220
|
+
body: request,
|
1221
|
+
});
|
1222
|
+
}
|
1223
|
+
/**
|
1224
|
+
* Save stateful configuration
|
1225
|
+
* @param stateId string
|
1226
|
+
* @param configurationId string
|
1227
|
+
*/
|
1228
|
+
saveConfiguration(stateId, configurationId) {
|
1229
|
+
return this.httpService.api({
|
1230
|
+
method: 'post',
|
1231
|
+
url: `${this.SERVICE_URL}/quote/${stateId}/configuration/${configurationId}/save`,
|
1232
|
+
});
|
1233
|
+
}
|
1234
|
+
/**
|
1235
|
+
* Cancel stateful configuration
|
1236
|
+
* @param stateId string
|
1237
|
+
* @param configurationId string
|
1238
|
+
*/
|
1239
|
+
cancelConfiguration(stateId, configurationId) {
|
1240
|
+
return this.httpService.api({
|
1241
|
+
method: 'post',
|
1242
|
+
url: `${this.SERVICE_URL}/quote/${stateId}/configuration/${configurationId}/cancel`,
|
1243
|
+
});
|
1244
|
+
}
|
1245
|
+
}
|
1246
|
+
FlowStateApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1247
|
+
FlowStateApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateApiService });
|
1248
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateApiService, decorators: [{
|
982
1249
|
type: Injectable
|
983
1250
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
984
1251
|
|
@@ -988,17 +1255,20 @@ class FlowsApiService {
|
|
988
1255
|
this.flowsKey = 'flows';
|
989
1256
|
}
|
990
1257
|
getFlow(id) {
|
991
|
-
return this.fetchFlows().pipe(map(flows => flows.find(flow => flow.id == id))
|
1258
|
+
return this.fetchFlows().pipe(map(flows => flows.find(flow => flow.id == id)), map(flow => {
|
1259
|
+
if (!flow) {
|
1260
|
+
throw new Error(`Flow with flowId=${id} is not defined`);
|
1261
|
+
}
|
1262
|
+
return flow;
|
1263
|
+
}));
|
992
1264
|
}
|
993
1265
|
fetchFlows() {
|
994
|
-
return this.configurationSettingsApiService
|
995
|
-
.fetchSetting(this.flowsKey)
|
996
|
-
.pipe(map((flow) => ((flow === null || flow === void 0 ? void 0 : flow.value) ? JSON.parse(flow.value) : [])));
|
1266
|
+
return this.configurationSettingsApiService.fetchSetting(this.flowsKey).pipe(map((setting) => ((setting === null || setting === void 0 ? void 0 : setting.value) ? JSON.parse(setting.value) : [])), map(anyFlows => anyFlows.map(toLatestFlow).filter(isDefined)));
|
997
1267
|
}
|
998
1268
|
}
|
999
|
-
FlowsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1000
|
-
FlowsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
1001
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1269
|
+
FlowsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1270
|
+
FlowsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService });
|
1271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, decorators: [{
|
1002
1272
|
type: Injectable
|
1003
1273
|
}], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
|
1004
1274
|
|
@@ -1057,9 +1327,9 @@ class GuidedSellingsAdminApiService {
|
|
1057
1327
|
}
|
1058
1328
|
}
|
1059
1329
|
GuidedSellingsAdminApiService.MAX_RESULTS = 60;
|
1060
|
-
GuidedSellingsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1061
|
-
GuidedSellingsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
1062
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1330
|
+
GuidedSellingsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1331
|
+
GuidedSellingsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingsAdminApiService });
|
1332
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingsAdminApiService, decorators: [{
|
1063
1333
|
type: Injectable
|
1064
1334
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1065
1335
|
|
@@ -1089,9 +1359,9 @@ class GuidedSellingApiService {
|
|
1089
1359
|
});
|
1090
1360
|
}
|
1091
1361
|
}
|
1092
|
-
GuidedSellingApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1093
|
-
GuidedSellingApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
1094
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1362
|
+
GuidedSellingApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1363
|
+
GuidedSellingApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingApiService });
|
1364
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingApiService, decorators: [{
|
1095
1365
|
type: Injectable
|
1096
1366
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1097
1367
|
|
@@ -1160,28 +1430,91 @@ class OffersApiService {
|
|
1160
1430
|
}
|
1161
1431
|
}
|
1162
1432
|
OffersApiService.MAX_RESULTS = 60;
|
1163
|
-
OffersApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1164
|
-
OffersApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
1165
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1433
|
+
OffersApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OffersApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1434
|
+
OffersApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OffersApiService });
|
1435
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OffersApiService, decorators: [{
|
1166
1436
|
type: Injectable
|
1167
1437
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1168
1438
|
|
1439
|
+
/**
|
1440
|
+
* Parses the response from Canvas and checks for errors.
|
1441
|
+
* - If an error is found, publishes an error message and returns the failover value.
|
1442
|
+
* - If no error is found, returns the parsed response.
|
1443
|
+
*
|
1444
|
+
* Note! The API call first goes to APEX before reaching the Canvas, so errors can originate from either APEX or Canvas.
|
1445
|
+
*
|
1446
|
+
* @param {string} response - The JSON string response from the Canvas call.
|
1447
|
+
* @param {T} failover - The value to return in case of error.
|
1448
|
+
* @returns {T | K} The parsed response or the failover value.
|
1449
|
+
*
|
1450
|
+
* @template T The expected type of the parsed response.
|
1451
|
+
* @template K The type of the failover value.
|
1452
|
+
*
|
1453
|
+
* @remarks If there's an Apex error, the response data can be an array.
|
1454
|
+
* In such cases, the function extracts the first element of the array.
|
1455
|
+
*/
|
1456
|
+
const handleCanvasResponse = (response, failover, errorPublisher) => {
|
1457
|
+
const parsed = JSON.parse(response);
|
1458
|
+
const errorCandidate = isArray(parsed) ? parsed[0] : parsed;
|
1459
|
+
if (isApexError(errorCandidate)) {
|
1460
|
+
errorPublisher(errorCandidate.message);
|
1461
|
+
return failover;
|
1462
|
+
}
|
1463
|
+
if (isCanvasError(errorCandidate)) {
|
1464
|
+
errorPublisher(errorCandidate.error);
|
1465
|
+
return failover;
|
1466
|
+
}
|
1467
|
+
return parsed;
|
1468
|
+
};
|
1469
|
+
|
1169
1470
|
class OrgInfoApiService {
|
1170
|
-
constructor(
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1471
|
+
constructor(messageService) {
|
1472
|
+
this.messageService = messageService;
|
1473
|
+
/**
|
1474
|
+
* Shows an error message using the message service.
|
1475
|
+
*
|
1476
|
+
* @param {string} message - the error message to be published.
|
1477
|
+
*/
|
1478
|
+
this.publishErrorMessage = (message) => {
|
1479
|
+
this.messageService.add({ severity: 'error', summary: message, sticky: true });
|
1480
|
+
};
|
1481
|
+
}
|
1482
|
+
getOrgInfo$() {
|
1483
|
+
try {
|
1484
|
+
return window.doCanvasCall && window.ORGANIZATION_ID
|
1485
|
+
? from(window.doCanvasCall(`org-info/${window.ORGANIZATION_ID}`, null)).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
|
1486
|
+
: of(undefined);
|
1487
|
+
}
|
1488
|
+
catch (_a) {
|
1489
|
+
return of(undefined);
|
1490
|
+
}
|
1175
1491
|
}
|
1176
|
-
|
1177
|
-
|
1492
|
+
getAvailableVersionsInfo$() {
|
1493
|
+
try {
|
1494
|
+
return window.doCanvasCall && window.ORGANIZATION_ID
|
1495
|
+
? from(window.doCanvasCall('versions/available', 'include_all=true')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
|
1496
|
+
: of(undefined);
|
1497
|
+
}
|
1498
|
+
catch (_a) {
|
1499
|
+
return of(undefined);
|
1500
|
+
}
|
1501
|
+
}
|
1502
|
+
upgradeVersion$(targetVersion) {
|
1503
|
+
try {
|
1504
|
+
return window.doCanvasCall && window.ORGANIZATION_ID
|
1505
|
+
? from(window.doCanvasCall('versions/upgrade', `target_version=${targetVersion}`)).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
|
1506
|
+
: of(undefined);
|
1507
|
+
}
|
1508
|
+
catch (_a) {
|
1509
|
+
return of(undefined);
|
1510
|
+
}
|
1178
1511
|
}
|
1179
1512
|
}
|
1180
|
-
OrgInfoApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1181
|
-
OrgInfoApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
1182
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1513
|
+
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 });
|
1514
|
+
OrgInfoApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService });
|
1515
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService, decorators: [{
|
1183
1516
|
type: Injectable
|
1184
|
-
}], ctorParameters: function () { return [{ type:
|
1517
|
+
}], ctorParameters: function () { return [{ type: i1$2.MessageService }]; } });
|
1185
1518
|
|
1186
1519
|
class PicklistsApiService {
|
1187
1520
|
constructor(baseHttpService) {
|
@@ -1212,9 +1545,78 @@ class PicklistsApiService {
|
|
1212
1545
|
};
|
1213
1546
|
}
|
1214
1547
|
}
|
1215
|
-
PicklistsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1216
|
-
PicklistsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
1217
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1548
|
+
PicklistsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1549
|
+
PicklistsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService });
|
1550
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService, decorators: [{
|
1551
|
+
type: Injectable
|
1552
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1553
|
+
|
1554
|
+
class PortalsApiService {
|
1555
|
+
constructor(baseHttpService) {
|
1556
|
+
this.baseHttpService = baseHttpService;
|
1557
|
+
this.serviceUrl = '/admin/portal';
|
1558
|
+
this.getPortals$ = (skip = 1, name = '') => {
|
1559
|
+
let params = new HttpParams();
|
1560
|
+
params = params.append('count', (PortalsApiService.MAX_RESULTS * skip).toString());
|
1561
|
+
params = params.append('skip', '0');
|
1562
|
+
params = params.append('name', name);
|
1563
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}`, params });
|
1564
|
+
};
|
1565
|
+
this.searchPortals$ = (skip = 0, expression) => {
|
1566
|
+
let params = new HttpParams();
|
1567
|
+
params = params.set('skip', '' + skip);
|
1568
|
+
params = params.set('count', '' + PortalsApiService.MAX_RESULTS);
|
1569
|
+
return this.baseHttpService.api({
|
1570
|
+
method: 'post',
|
1571
|
+
url: `${this.serviceUrl}/search`,
|
1572
|
+
params,
|
1573
|
+
body: expression || {},
|
1574
|
+
});
|
1575
|
+
};
|
1576
|
+
this.removePortal$ = (id) => {
|
1577
|
+
return this.baseHttpService.api({
|
1578
|
+
url: `${this.serviceUrl}/${id}`,
|
1579
|
+
method: 'delete',
|
1580
|
+
});
|
1581
|
+
};
|
1582
|
+
this.restore$ = (id) => {
|
1583
|
+
return this.baseHttpService.api({
|
1584
|
+
method: 'patch',
|
1585
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
1586
|
+
});
|
1587
|
+
};
|
1588
|
+
this.duplicatePortal$ = (cloneRequest) => {
|
1589
|
+
return this.baseHttpService.api({
|
1590
|
+
url: `${this.serviceUrl}/${cloneRequest.id}/clone`,
|
1591
|
+
method: 'post',
|
1592
|
+
body: cloneRequest,
|
1593
|
+
});
|
1594
|
+
};
|
1595
|
+
this.getPortal$ = (id) => {
|
1596
|
+
return this.baseHttpService.api({
|
1597
|
+
url: `${this.serviceUrl}/${id}`,
|
1598
|
+
});
|
1599
|
+
};
|
1600
|
+
}
|
1601
|
+
createNewPortal$(body) {
|
1602
|
+
return this.baseHttpService.api({
|
1603
|
+
url: `${this.serviceUrl}`,
|
1604
|
+
method: 'post',
|
1605
|
+
body,
|
1606
|
+
});
|
1607
|
+
}
|
1608
|
+
updatePortal$(portal, settings) {
|
1609
|
+
return this.baseHttpService.api({
|
1610
|
+
url: `${this.serviceUrl}/${portal.id}`,
|
1611
|
+
method: 'put',
|
1612
|
+
body: Object.assign(Object.assign({}, portal), { settings: JSON.stringify(settings) }),
|
1613
|
+
});
|
1614
|
+
}
|
1615
|
+
}
|
1616
|
+
PortalsApiService.MAX_RESULTS = 60;
|
1617
|
+
PortalsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PortalsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1618
|
+
PortalsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PortalsApiService });
|
1619
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PortalsApiService, decorators: [{
|
1218
1620
|
type: Injectable
|
1219
1621
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1220
1622
|
|
@@ -1272,9 +1674,9 @@ class PriceApiService {
|
|
1272
1674
|
});
|
1273
1675
|
}
|
1274
1676
|
}
|
1275
|
-
PriceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1276
|
-
PriceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
1277
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1677
|
+
PriceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PriceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1678
|
+
PriceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PriceApiService });
|
1679
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PriceApiService, decorators: [{
|
1278
1680
|
type: Injectable
|
1279
1681
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1280
1682
|
|
@@ -1365,10 +1767,16 @@ class ProceduresApiService {
|
|
1365
1767
|
body,
|
1366
1768
|
});
|
1367
1769
|
}
|
1770
|
+
fetchDefaultPricingSteps$() {
|
1771
|
+
return this.baseHttpService.api({
|
1772
|
+
url: `${this.ADMIN_SERVICE_URL}/pricing-steps`,
|
1773
|
+
method: 'get',
|
1774
|
+
});
|
1775
|
+
}
|
1368
1776
|
}
|
1369
|
-
ProceduresApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1370
|
-
ProceduresApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
1371
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1777
|
+
ProceduresApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1778
|
+
ProceduresApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService });
|
1779
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService, decorators: [{
|
1372
1780
|
type: Injectable
|
1373
1781
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1374
1782
|
|
@@ -1514,9 +1922,9 @@ class ProductApiService {
|
|
1514
1922
|
return `${this.serviceUrl}/${productId}/image`;
|
1515
1923
|
}
|
1516
1924
|
}
|
1517
|
-
ProductApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1518
|
-
ProductApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
1519
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1925
|
+
ProductApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1926
|
+
ProductApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService });
|
1927
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService, decorators: [{
|
1520
1928
|
type: Injectable
|
1521
1929
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1522
1930
|
|
@@ -1745,9 +2153,72 @@ class ProductModelApiService {
|
|
1745
2153
|
}
|
1746
2154
|
}
|
1747
2155
|
ProductModelApiService.MAX_RESULTS = 200;
|
1748
|
-
ProductModelApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1749
|
-
ProductModelApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
1750
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2156
|
+
ProductModelApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModelApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2157
|
+
ProductModelApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModelApiService });
|
2158
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModelApiService, decorators: [{
|
2159
|
+
type: Injectable
|
2160
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2161
|
+
|
2162
|
+
class PromotionsApiService {
|
2163
|
+
constructor(baseHttpService) {
|
2164
|
+
this.baseHttpService = baseHttpService;
|
2165
|
+
this.serviceUrl = '/admin/promotion';
|
2166
|
+
this.fetchAll$ = () => {
|
2167
|
+
return this.baseHttpService.api({ url: this.serviceUrl });
|
2168
|
+
};
|
2169
|
+
this.fetchOne$ = (id) => {
|
2170
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
2171
|
+
};
|
2172
|
+
this.remove$ = (id) => {
|
2173
|
+
return this.baseHttpService.api({
|
2174
|
+
url: `${this.serviceUrl}/${id}`,
|
2175
|
+
method: 'delete',
|
2176
|
+
});
|
2177
|
+
};
|
2178
|
+
this.restore$ = (id) => {
|
2179
|
+
return this.baseHttpService.api({
|
2180
|
+
method: 'patch',
|
2181
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
2182
|
+
});
|
2183
|
+
};
|
2184
|
+
this.duplicate$ = (body) => {
|
2185
|
+
return this.baseHttpService
|
2186
|
+
.api({
|
2187
|
+
url: `${this.serviceUrl}/${body.id}/clone`,
|
2188
|
+
method: 'post',
|
2189
|
+
body,
|
2190
|
+
})
|
2191
|
+
.pipe(map$1(response => response.clonedRecordId));
|
2192
|
+
};
|
2193
|
+
}
|
2194
|
+
search$(expression, skip, count) {
|
2195
|
+
let params = new HttpParams();
|
2196
|
+
if (typeof skip === 'number') {
|
2197
|
+
params = params.set('skip', '' + skip);
|
2198
|
+
}
|
2199
|
+
if (typeof count === 'number') {
|
2200
|
+
params = params.set('count', '' + count);
|
2201
|
+
}
|
2202
|
+
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2203
|
+
}
|
2204
|
+
create$(body) {
|
2205
|
+
return this.baseHttpService.api({
|
2206
|
+
url: `${this.serviceUrl}`,
|
2207
|
+
method: 'post',
|
2208
|
+
body,
|
2209
|
+
});
|
2210
|
+
}
|
2211
|
+
update$(body) {
|
2212
|
+
return this.baseHttpService.api({
|
2213
|
+
url: `${this.serviceUrl}/${body.id}`,
|
2214
|
+
method: 'put',
|
2215
|
+
body,
|
2216
|
+
});
|
2217
|
+
}
|
2218
|
+
}
|
2219
|
+
PromotionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2220
|
+
PromotionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService });
|
2221
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService, decorators: [{
|
1751
2222
|
type: Injectable
|
1752
2223
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1753
2224
|
|
@@ -1756,7 +2227,9 @@ class QuoteApiService {
|
|
1756
2227
|
this.httpService = httpService;
|
1757
2228
|
this.SERVICE_URL = '/quotes';
|
1758
2229
|
}
|
1759
|
-
|
2230
|
+
/**
|
2231
|
+
* @deprecated Use getQuoteState instead
|
2232
|
+
*/
|
1760
2233
|
getQuoteDraft(objectId, params, errorHandler) {
|
1761
2234
|
return this.httpService.api({
|
1762
2235
|
method: 'get',
|
@@ -1765,6 +2238,15 @@ class QuoteApiService {
|
|
1765
2238
|
errorHandler,
|
1766
2239
|
});
|
1767
2240
|
}
|
2241
|
+
/**
|
2242
|
+
* Comparing to deprecated `getQuoteDraft` this endpoint doesn't include orders and assets
|
2243
|
+
* @param objectId quoteId | accountId | opportunityId | orderId
|
2244
|
+
* @param params Query params
|
2245
|
+
* @param options Request options
|
2246
|
+
*/
|
2247
|
+
getQuoteState(objectId, params, options) {
|
2248
|
+
return this.httpService.api(Object.assign({ method: 'get', url: `/v2${this.SERVICE_URL}/${objectId}`, params }, options));
|
2249
|
+
}
|
1768
2250
|
upsertQuote(request, options) {
|
1769
2251
|
return this.httpService.api(Object.assign({ method: 'post', url: `${this.SERVICE_URL}`, body: request }, options));
|
1770
2252
|
}
|
@@ -1783,9 +2265,9 @@ class QuoteApiService {
|
|
1783
2265
|
});
|
1784
2266
|
}
|
1785
2267
|
}
|
1786
|
-
QuoteApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1787
|
-
QuoteApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
1788
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2268
|
+
QuoteApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2269
|
+
QuoteApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService });
|
2270
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService, decorators: [{
|
1789
2271
|
type: Injectable
|
1790
2272
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1791
2273
|
|
@@ -1801,9 +2283,135 @@ class RampApiService {
|
|
1801
2283
|
return this.httpService.api(Object.assign({ method: 'post', url: `${this.SERVICE_URL}/renew`, body: request }, options));
|
1802
2284
|
}
|
1803
2285
|
}
|
1804
|
-
RampApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1805
|
-
RampApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
1806
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2286
|
+
RampApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RampApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2287
|
+
RampApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RampApiService });
|
2288
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RampApiService, decorators: [{
|
2289
|
+
type: Injectable
|
2290
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2291
|
+
|
2292
|
+
class RebateProgramApiService {
|
2293
|
+
constructor(baseHttpService) {
|
2294
|
+
this.baseHttpService = baseHttpService;
|
2295
|
+
this.serviceUrl = '/admin/rebate-program';
|
2296
|
+
this.fetchAll$ = () => {
|
2297
|
+
return this.baseHttpService.api({ url: this.serviceUrl });
|
2298
|
+
};
|
2299
|
+
this.fetchOne$ = (id) => {
|
2300
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
2301
|
+
};
|
2302
|
+
this.remove$ = (id) => {
|
2303
|
+
return this.baseHttpService.api({
|
2304
|
+
url: `${this.serviceUrl}/${id}`,
|
2305
|
+
method: 'delete',
|
2306
|
+
});
|
2307
|
+
};
|
2308
|
+
this.restore$ = (id) => {
|
2309
|
+
return this.baseHttpService.api({
|
2310
|
+
method: 'patch',
|
2311
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
2312
|
+
});
|
2313
|
+
};
|
2314
|
+
this.duplicate$ = (body) => {
|
2315
|
+
return this.baseHttpService
|
2316
|
+
.api({
|
2317
|
+
url: `${this.serviceUrl}/${body.id}/clone`,
|
2318
|
+
method: 'post',
|
2319
|
+
body,
|
2320
|
+
})
|
2321
|
+
.pipe(map$1(response => response.clonedRecordId));
|
2322
|
+
};
|
2323
|
+
}
|
2324
|
+
search$(expression, skip, count) {
|
2325
|
+
let params = new HttpParams();
|
2326
|
+
if (typeof skip === 'number') {
|
2327
|
+
params = params.set('skip', '' + skip);
|
2328
|
+
}
|
2329
|
+
if (typeof count === 'number') {
|
2330
|
+
params = params.set('count', '' + count);
|
2331
|
+
}
|
2332
|
+
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2333
|
+
}
|
2334
|
+
create$(body) {
|
2335
|
+
return this.baseHttpService.api({
|
2336
|
+
url: `${this.serviceUrl}`,
|
2337
|
+
method: 'post',
|
2338
|
+
body,
|
2339
|
+
});
|
2340
|
+
}
|
2341
|
+
update$(body) {
|
2342
|
+
return this.baseHttpService.api({
|
2343
|
+
url: `${this.serviceUrl}/${body.id}`,
|
2344
|
+
method: 'put',
|
2345
|
+
body,
|
2346
|
+
});
|
2347
|
+
}
|
2348
|
+
}
|
2349
|
+
RebateProgramApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2350
|
+
RebateProgramApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService });
|
2351
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, decorators: [{
|
2352
|
+
type: Injectable
|
2353
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2354
|
+
|
2355
|
+
class RebateTypeApiService {
|
2356
|
+
constructor(baseHttpService) {
|
2357
|
+
this.baseHttpService = baseHttpService;
|
2358
|
+
this.serviceUrl = '/admin/rebate-type';
|
2359
|
+
this.fetchAll$ = () => {
|
2360
|
+
return this.baseHttpService.api({ url: this.serviceUrl });
|
2361
|
+
};
|
2362
|
+
this.fetchOne$ = (id) => {
|
2363
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
2364
|
+
};
|
2365
|
+
this.remove$ = (id) => {
|
2366
|
+
return this.baseHttpService.api({
|
2367
|
+
url: `${this.serviceUrl}/${id}`,
|
2368
|
+
method: 'delete',
|
2369
|
+
});
|
2370
|
+
};
|
2371
|
+
this.restore$ = (id) => {
|
2372
|
+
return this.baseHttpService.api({
|
2373
|
+
method: 'patch',
|
2374
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
2375
|
+
});
|
2376
|
+
};
|
2377
|
+
this.duplicate$ = (body) => {
|
2378
|
+
return this.baseHttpService
|
2379
|
+
.api({
|
2380
|
+
url: `${this.serviceUrl}/${body.id}/clone`,
|
2381
|
+
method: 'post',
|
2382
|
+
body,
|
2383
|
+
})
|
2384
|
+
.pipe(map$1(response => response.clonedRecordId));
|
2385
|
+
};
|
2386
|
+
}
|
2387
|
+
search$(expression, skip, count) {
|
2388
|
+
let params = new HttpParams();
|
2389
|
+
if (typeof skip === 'number') {
|
2390
|
+
params = params.set('skip', '' + skip);
|
2391
|
+
}
|
2392
|
+
if (typeof count === 'number') {
|
2393
|
+
params = params.set('count', '' + count);
|
2394
|
+
}
|
2395
|
+
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2396
|
+
}
|
2397
|
+
create$(body) {
|
2398
|
+
return this.baseHttpService.api({
|
2399
|
+
url: `${this.serviceUrl}`,
|
2400
|
+
method: 'post',
|
2401
|
+
body,
|
2402
|
+
});
|
2403
|
+
}
|
2404
|
+
update$(body) {
|
2405
|
+
return this.baseHttpService.api({
|
2406
|
+
url: `${this.serviceUrl}/${body.id}`,
|
2407
|
+
method: 'put',
|
2408
|
+
body,
|
2409
|
+
});
|
2410
|
+
}
|
2411
|
+
}
|
2412
|
+
RebateTypeApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2413
|
+
RebateTypeApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService });
|
2414
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, decorators: [{
|
1807
2415
|
type: Injectable
|
1808
2416
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1809
2417
|
|
@@ -1857,9 +2465,9 @@ class RuleGroupsApiService {
|
|
1857
2465
|
};
|
1858
2466
|
}
|
1859
2467
|
}
|
1860
|
-
RuleGroupsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1861
|
-
RuleGroupsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
1862
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2468
|
+
RuleGroupsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2469
|
+
RuleGroupsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService });
|
2470
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService, decorators: [{
|
1863
2471
|
type: Injectable
|
1864
2472
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1865
2473
|
|
@@ -1872,8 +2480,12 @@ class RulesApiService {
|
|
1872
2480
|
};
|
1873
2481
|
this.searchRules$ = (expression, skip, count) => {
|
1874
2482
|
let params = new HttpParams();
|
1875
|
-
|
1876
|
-
|
2483
|
+
if (typeof skip === 'number') {
|
2484
|
+
params = params.set('skip', '' + skip);
|
2485
|
+
}
|
2486
|
+
if (typeof count === 'number') {
|
2487
|
+
params = params.set('count', '' + count);
|
2488
|
+
}
|
1877
2489
|
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
1878
2490
|
};
|
1879
2491
|
this.createRule$ = (rule) => {
|
@@ -1925,17 +2537,26 @@ class RulesApiService {
|
|
1925
2537
|
});
|
1926
2538
|
}
|
1927
2539
|
execute$(body) {
|
1928
|
-
const url = body.rule.ruleGroupType
|
2540
|
+
const url = this.getExecuteRuleUrl(body.rule.ruleGroupType);
|
1929
2541
|
return this.baseHttpService.api({
|
1930
2542
|
url,
|
1931
2543
|
method: 'post',
|
1932
2544
|
body,
|
1933
2545
|
});
|
1934
2546
|
}
|
2547
|
+
getExecuteRuleUrl(ruleGroupType) {
|
2548
|
+
if (ruleGroupType === RuleGroupTypes.eligibility) {
|
2549
|
+
return '/rules/eligibility/execute';
|
2550
|
+
}
|
2551
|
+
if (ruleGroupType === RuleGroupTypes.catalog) {
|
2552
|
+
return '/rules/catalog/execute';
|
2553
|
+
}
|
2554
|
+
return '/rules/execute';
|
2555
|
+
}
|
1935
2556
|
}
|
1936
|
-
RulesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1937
|
-
RulesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
1938
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2557
|
+
RulesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2558
|
+
RulesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService });
|
2559
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService, decorators: [{
|
1939
2560
|
type: Injectable
|
1940
2561
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1941
2562
|
|
@@ -1948,8 +2569,12 @@ class ScriptsApiService {
|
|
1948
2569
|
};
|
1949
2570
|
this.searchScripts$ = (expression, skip, count) => {
|
1950
2571
|
let params = new HttpParams();
|
1951
|
-
|
1952
|
-
|
2572
|
+
if (typeof skip === 'number') {
|
2573
|
+
params = params.set('skip', '' + skip);
|
2574
|
+
}
|
2575
|
+
if (typeof count === 'number') {
|
2576
|
+
params = params.set('count', '' + count);
|
2577
|
+
}
|
1953
2578
|
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
1954
2579
|
};
|
1955
2580
|
this.fetchScript$ = (id) => {
|
@@ -1977,11 +2602,13 @@ class ScriptsApiService {
|
|
1977
2602
|
});
|
1978
2603
|
};
|
1979
2604
|
this.cloneScript$ = (cloneRequest) => {
|
1980
|
-
return this.baseHttpService
|
2605
|
+
return this.baseHttpService
|
2606
|
+
.api({
|
1981
2607
|
url: `${this.serviceUrl}/${cloneRequest.id}/clone`,
|
1982
2608
|
method: 'post',
|
1983
2609
|
body: cloneRequest,
|
1984
|
-
})
|
2610
|
+
})
|
2611
|
+
.pipe(map(response => response.clonedRecordId));
|
1985
2612
|
};
|
1986
2613
|
this.removeScript$ = (id) => {
|
1987
2614
|
return this.baseHttpService.api({
|
@@ -2005,9 +2632,9 @@ class ScriptsApiService {
|
|
2005
2632
|
};
|
2006
2633
|
}
|
2007
2634
|
}
|
2008
|
-
ScriptsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2009
|
-
ScriptsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
2010
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2635
|
+
ScriptsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2636
|
+
ScriptsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService });
|
2637
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService, decorators: [{
|
2011
2638
|
type: Injectable
|
2012
2639
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2013
2640
|
|
@@ -2028,9 +2655,9 @@ class ShoppingCartSettingsApiService {
|
|
2028
2655
|
}, {})));
|
2029
2656
|
}
|
2030
2657
|
}
|
2031
|
-
ShoppingCartSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2032
|
-
ShoppingCartSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
2033
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2658
|
+
ShoppingCartSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2659
|
+
ShoppingCartSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService });
|
2660
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService, decorators: [{
|
2034
2661
|
type: Injectable
|
2035
2662
|
}], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
|
2036
2663
|
|
@@ -2076,9 +2703,9 @@ class StatefulConfigurationApiService {
|
|
2076
2703
|
});
|
2077
2704
|
}
|
2078
2705
|
}
|
2079
|
-
StatefulConfigurationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2080
|
-
StatefulConfigurationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
2081
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2706
|
+
StatefulConfigurationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StatefulConfigurationApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2707
|
+
StatefulConfigurationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StatefulConfigurationApiService });
|
2708
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StatefulConfigurationApiService, decorators: [{
|
2082
2709
|
type: Injectable
|
2083
2710
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2084
2711
|
|
@@ -2142,9 +2769,9 @@ class UIDefinitionsApiService {
|
|
2142
2769
|
return `/models/${modelId}/uidefinitions`;
|
2143
2770
|
}
|
2144
2771
|
}
|
2145
|
-
UIDefinitionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2146
|
-
UIDefinitionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
2147
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2772
|
+
UIDefinitionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2773
|
+
UIDefinitionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService });
|
2774
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService, decorators: [{
|
2148
2775
|
type: Injectable
|
2149
2776
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2150
2777
|
|
@@ -2380,6 +3007,11 @@ class UITemplatesApiService {
|
|
2380
3007
|
this.fetchComponentAttachmentFile$(templateId, component.id, 'json'),
|
2381
3008
|
]).pipe(map$1(([html, js, css, json]) => ({ html, js, css, json })));
|
2382
3009
|
};
|
3010
|
+
this.fetchComponentsAttachments$ = (templateId) => {
|
3011
|
+
return this.fetchComponents$(templateId).pipe(switchMap$1(components => {
|
3012
|
+
return forkJoin(components.map(component => this.fetchComponentAttachments$(templateId, component)));
|
3013
|
+
}));
|
3014
|
+
};
|
2383
3015
|
this.fetchComponentAttachmentFile$ = (templateId, componentId, attachmentType) => {
|
2384
3016
|
return this.baseHttpService
|
2385
3017
|
.api({
|
@@ -2430,9 +3062,9 @@ class UITemplatesApiService {
|
|
2430
3062
|
});
|
2431
3063
|
}
|
2432
3064
|
}
|
2433
|
-
UITemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2434
|
-
UITemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
2435
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
3065
|
+
UITemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
3066
|
+
UITemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService });
|
3067
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService, decorators: [{
|
2436
3068
|
type: Injectable
|
2437
3069
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2438
3070
|
|
@@ -2468,6 +3100,15 @@ class VeloceObjectsApiService {
|
|
2468
3100
|
url: `${this.serviceUrl}/${id}`,
|
2469
3101
|
});
|
2470
3102
|
};
|
3103
|
+
this.duplicateObject$ = (body) => {
|
3104
|
+
return this.baseHttpService
|
3105
|
+
.api({
|
3106
|
+
method: 'post',
|
3107
|
+
url: `${this.serviceUrl}/${body.id}/clone`,
|
3108
|
+
body,
|
3109
|
+
})
|
3110
|
+
.pipe(map(response => response.clonedRecordId));
|
3111
|
+
};
|
2471
3112
|
this.restoreObject$ = (id) => {
|
2472
3113
|
return this.baseHttpService.api({
|
2473
3114
|
method: 'patch',
|
@@ -2506,17 +3147,106 @@ class VeloceObjectsApiService {
|
|
2506
3147
|
});
|
2507
3148
|
}
|
2508
3149
|
}
|
2509
|
-
VeloceObjectsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2510
|
-
VeloceObjectsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
2511
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
3150
|
+
VeloceObjectsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
3151
|
+
VeloceObjectsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService });
|
3152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService, decorators: [{
|
2512
3153
|
type: Injectable
|
2513
3154
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2514
3155
|
|
3156
|
+
class SandboxManagerApiService {
|
3157
|
+
constructor(messageService) {
|
3158
|
+
this.messageService = messageService;
|
3159
|
+
/**
|
3160
|
+
* Shows an error message using the message service.
|
3161
|
+
*
|
3162
|
+
* @param {string} message - the error message to be published.
|
3163
|
+
*/
|
3164
|
+
this.publishErrorMessage = (message) => {
|
3165
|
+
this.messageService.add({ severity: 'error', summary: message, sticky: true });
|
3166
|
+
};
|
3167
|
+
}
|
3168
|
+
getSalesforceOrganizations$() {
|
3169
|
+
try {
|
3170
|
+
return window.doSandboxCall
|
3171
|
+
? from(window.doSandboxCall('orgs', '', 'GET')).pipe(map$1(response => handleCanvasResponse(response, [], this.publishErrorMessage)), catchError$1(() => of([])))
|
3172
|
+
: of([]);
|
3173
|
+
}
|
3174
|
+
catch (_a) {
|
3175
|
+
return of([]);
|
3176
|
+
}
|
3177
|
+
}
|
3178
|
+
getAvailableSalesforceOrganizationSizes$() {
|
3179
|
+
try {
|
3180
|
+
return window.doSandboxCall
|
3181
|
+
? from(window.doSandboxCall('available-sizes', '', 'GET')).pipe(map$1(response => handleCanvasResponse(response, {}, this.publishErrorMessage)), catchError$1(() => of({})))
|
3182
|
+
: of({});
|
3183
|
+
}
|
3184
|
+
catch (_a) {
|
3185
|
+
return of({});
|
3186
|
+
}
|
3187
|
+
}
|
3188
|
+
createSalesforceOrganization$(payload) {
|
3189
|
+
try {
|
3190
|
+
return window.doSandboxCall
|
3191
|
+
? from(window.doSandboxCall('orgs', JSON.stringify(payload), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
|
3192
|
+
: of(undefined);
|
3193
|
+
}
|
3194
|
+
catch (err) {
|
3195
|
+
return of(undefined);
|
3196
|
+
}
|
3197
|
+
}
|
3198
|
+
updateSalesforceOrganization$(payload) {
|
3199
|
+
try {
|
3200
|
+
return window.doSandboxCall
|
3201
|
+
? from(window.doSandboxCall(`orgs/${payload.orgId}`, JSON.stringify(payload), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
|
3202
|
+
: of(undefined);
|
3203
|
+
}
|
3204
|
+
catch (_a) {
|
3205
|
+
return of(undefined);
|
3206
|
+
}
|
3207
|
+
}
|
3208
|
+
deleteSalesforceOrganization$(payload) {
|
3209
|
+
try {
|
3210
|
+
return window.doSandboxCall
|
3211
|
+
? from(window.doSandboxCall(`orgs/${payload.orgId}`, '', 'DELETE')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
|
3212
|
+
: of(undefined);
|
3213
|
+
}
|
3214
|
+
catch (_a) {
|
3215
|
+
return of(undefined);
|
3216
|
+
}
|
3217
|
+
}
|
3218
|
+
activateSalesforceOrganization$(payload) {
|
3219
|
+
try {
|
3220
|
+
return window.doSandboxCall
|
3221
|
+
? from(window.doSandboxCall(`orgs/${payload.orgId}/activate`, JSON.stringify({}), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
|
3222
|
+
: of(undefined);
|
3223
|
+
}
|
3224
|
+
catch (_a) {
|
3225
|
+
return of(undefined);
|
3226
|
+
}
|
3227
|
+
}
|
3228
|
+
deactivateSalesforceOrganization$(payload) {
|
3229
|
+
try {
|
3230
|
+
return window.doSandboxCall
|
3231
|
+
? from(window.doSandboxCall(`orgs/${payload.orgId}/deactivate`, JSON.stringify({}), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
|
3232
|
+
: of(undefined);
|
3233
|
+
}
|
3234
|
+
catch (_a) {
|
3235
|
+
return of(undefined);
|
3236
|
+
}
|
3237
|
+
}
|
3238
|
+
}
|
3239
|
+
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 });
|
3240
|
+
SandboxManagerApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SandboxManagerApiService });
|
3241
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SandboxManagerApiService, decorators: [{
|
3242
|
+
type: Injectable
|
3243
|
+
}], ctorParameters: function () { return [{ type: i1$2.MessageService }]; } });
|
3244
|
+
|
2515
3245
|
class ApiModule {
|
2516
3246
|
}
|
2517
|
-
ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2518
|
-
ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
2519
|
-
ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
3247
|
+
ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
3248
|
+
ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, imports: [HttpClientModule] });
|
3249
|
+
ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, providers: [
|
2520
3250
|
BaseHttpService,
|
2521
3251
|
XrayService,
|
2522
3252
|
ConfigurationApiService,
|
@@ -2550,8 +3280,17 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
|
2550
3280
|
UIDefinitionsApiService,
|
2551
3281
|
VeloceObjectsApiService,
|
2552
3282
|
StatefulConfigurationApiService,
|
3283
|
+
RebateProgramApiService,
|
3284
|
+
RebateTypeApiService,
|
3285
|
+
PromotionsApiService,
|
3286
|
+
VeloceAuthService,
|
3287
|
+
ContractedPriceApiService,
|
3288
|
+
PortalsApiService,
|
3289
|
+
ConfigurationProcessorsApiService,
|
3290
|
+
FlowStateApiService,
|
3291
|
+
SandboxManagerApiService,
|
2553
3292
|
], imports: [HttpClientModule] });
|
2554
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
3293
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, decorators: [{
|
2555
3294
|
type: NgModule,
|
2556
3295
|
args: [{
|
2557
3296
|
imports: [HttpClientModule],
|
@@ -2589,6 +3328,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
2589
3328
|
UIDefinitionsApiService,
|
2590
3329
|
VeloceObjectsApiService,
|
2591
3330
|
StatefulConfigurationApiService,
|
3331
|
+
RebateProgramApiService,
|
3332
|
+
RebateTypeApiService,
|
3333
|
+
PromotionsApiService,
|
3334
|
+
VeloceAuthService,
|
3335
|
+
ContractedPriceApiService,
|
3336
|
+
PortalsApiService,
|
3337
|
+
ConfigurationProcessorsApiService,
|
3338
|
+
FlowStateApiService,
|
3339
|
+
SandboxManagerApiService,
|
2592
3340
|
],
|
2593
3341
|
}]
|
2594
3342
|
}] });
|
@@ -2597,5 +3345,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
2597
3345
|
* Generated bundle index. Do not edit.
|
2598
3346
|
*/
|
2599
3347
|
|
2600
|
-
export { AccountApiService, ApiModule, CatalogAdminApiService, CatalogApiService, ConfigurationApiService, ConfigurationSettingsApiService, ContextApiService, DeltaApiService, DocumentAttachmentApiService, DocumentTemplatesApiService, EndpointsApiService, FlowsApiService, GuidedSellingApiService, GuidedSellingsAdminApiService, OffersApiService, OrgInfoApiService, PicklistsApiService, PriceApiService, ProceduresApiService, ProductApiService, ProductModelApiService, QuoteApiService, RampApiService, RuleGroupsApiService, RulesApiService, SalesforceApiService, ScriptsApiService, ShoppingCartSettingsApiService, StatefulConfigurationApiService, UIDefinitionsApiService, UITemplatesApiService, VeloceObjectsApiService };
|
3348
|
+
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 };
|
2601
3349
|
//# sourceMappingURL=veloceapps-api.mjs.map
|