@veloceapps/api 8.0.0-17 → 8.0.0-171
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 -4
- package/esm2020/lib/api.module.mjs +26 -8
- package/esm2020/lib/services/account-api.service.mjs +3 -3
- 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 +3 -3
- 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 +3 -3
- package/esm2020/lib/services/quote-api.service.mjs +3 -3
- package/esm2020/lib/services/ramp-api.service.mjs +3 -3
- package/esm2020/lib/services/rebate-program-api.service.mjs +4 -4
- package/esm2020/lib/services/rebate-type-api.service.mjs +3 -3
- package/esm2020/lib/services/rule-groups-api.service.mjs +3 -3
- package/esm2020/lib/services/rules-api.service.mjs +14 -5
- package/esm2020/lib/services/salesforce-api.service.mjs +7 -5
- package/esm2020/lib/services/sandbox-manager-api.service.mjs +27 -0
- package/esm2020/lib/services/scripts-api.service.mjs +4 -4
- 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 +2 -1
- package/esm2020/lib/types/stateful-configuration.types.mjs +1 -1
- package/fesm2015/veloceapps-api.mjs +729 -329
- package/fesm2015/veloceapps-api.mjs.map +1 -1
- package/fesm2020/veloceapps-api.mjs +731 -322
- package/fesm2020/veloceapps-api.mjs.map +1 -1
- package/index.d.ts +9 -3
- 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/portals-api.service.d.ts +20 -0
- package/lib/services/procedures-api.service.d.ts +1 -0
- 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 +13 -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/auth.types.d.ts +4 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/stateful-configuration.types.d.ts +1 -1
- package/package.json +1 -1
@@ -1,9 +1,9 @@
|
|
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,
|
6
|
+
import { uiDefinitionFromDTO, ConfigurationContextMode, isLegacyDocumentTemplate, DocxTemplater, QuoteDraft, StringUtils, Expression, toLatestFlow, isDefined, Operator, ModelTranslatorUtils, ProductModelsContainer, ModelUtils, EntityUtil, RuleGroupTypes, parseJsonSafely, uiDefinitionToDTO, BaseHttpService, XrayService } from '@veloceapps/core';
|
7
7
|
import { noop, throwError, of, zip, forkJoin, map as map$1, catchError as catchError$1, switchMap as switchMap$1 } from 'rxjs';
|
8
8
|
import { map, catchError, tap, switchMap, defaultIfEmpty } from 'rxjs/operators';
|
9
9
|
import * as i2 from 'primeng/api';
|
@@ -53,12 +53,30 @@ class AccountApiService {
|
|
53
53
|
return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/${accountId}/orders/${orderId}/to-asset`, method: 'post', body: { id: orderId } }, options));
|
54
54
|
}
|
55
55
|
}
|
56
|
-
AccountApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
57
|
-
AccountApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
58
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
56
|
+
AccountApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AccountApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
57
|
+
AccountApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AccountApiService });
|
58
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AccountApiService, decorators: [{
|
59
59
|
type: Injectable
|
60
60
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
61
61
|
|
62
|
+
class VeloceAuthService {
|
63
|
+
constructor(http) {
|
64
|
+
this.http = http;
|
65
|
+
}
|
66
|
+
auth$(instanceUrl, accessToken) {
|
67
|
+
const headers = new HttpHeaders({
|
68
|
+
'Content-Type': 'application/json',
|
69
|
+
Authorization: `Bearer ${accessToken}`,
|
70
|
+
});
|
71
|
+
return this.http.get(`${instanceUrl}/services/apexrest/VELOCPQ/veloce-auth`, { headers });
|
72
|
+
}
|
73
|
+
}
|
74
|
+
VeloceAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceAuthService, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
75
|
+
VeloceAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceAuthService });
|
76
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceAuthService, decorators: [{
|
77
|
+
type: Injectable
|
78
|
+
}], ctorParameters: function () { return [{ type: i1$1.HttpClient }]; } });
|
79
|
+
|
62
80
|
class CatalogAdminApiService {
|
63
81
|
constructor(baseHttpService) {
|
64
82
|
this.baseHttpService = baseHttpService;
|
@@ -240,9 +258,9 @@ class CatalogAdminApiService {
|
|
240
258
|
}
|
241
259
|
}
|
242
260
|
CatalogAdminApiService.MAX_RESULTS = 60;
|
243
|
-
CatalogAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
244
|
-
CatalogAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
261
|
+
CatalogAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
262
|
+
CatalogAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogAdminApiService });
|
263
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogAdminApiService, decorators: [{
|
246
264
|
type: Injectable
|
247
265
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
248
266
|
|
@@ -326,9 +344,9 @@ class CatalogApiService {
|
|
326
344
|
});
|
327
345
|
}
|
328
346
|
}
|
329
|
-
CatalogApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
330
|
-
CatalogApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
331
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
347
|
+
CatalogApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
348
|
+
CatalogApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogApiService });
|
349
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogApiService, decorators: [{
|
332
350
|
type: Injectable
|
333
351
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
334
352
|
|
@@ -354,6 +372,23 @@ class ConfigurationApiService {
|
|
354
372
|
}
|
355
373
|
}));
|
356
374
|
}
|
375
|
+
customConfigurePrice({ url, configurationRequest, runtimeModel, }) {
|
376
|
+
return this.httpService
|
377
|
+
.api({
|
378
|
+
method: 'post',
|
379
|
+
url,
|
380
|
+
body: configurationRequest,
|
381
|
+
errorHandler: e => throwError(e),
|
382
|
+
})
|
383
|
+
.pipe(map(configurePrice => {
|
384
|
+
if (runtimeModel) {
|
385
|
+
return Object.assign(Object.assign({}, configurePrice), { lineItem: this.updatePortDomains(configurePrice.lineItem, runtimeModel) });
|
386
|
+
}
|
387
|
+
else {
|
388
|
+
return configurePrice;
|
389
|
+
}
|
390
|
+
}));
|
391
|
+
}
|
357
392
|
getRuntimeDataByProductId(productId, offeringId) {
|
358
393
|
return this.httpService
|
359
394
|
.api({
|
@@ -361,13 +396,7 @@ class ConfigurationApiService {
|
|
361
396
|
url: `${this.SERVICE_URL}/${productId}/model` + ((offeringId && `/${offeringId}`) || ''),
|
362
397
|
})
|
363
398
|
.pipe(map(runtimeData => {
|
364
|
-
return Object.assign(Object.assign({}, runtimeData), { uiDefinitions: runtimeData.uiDefinitions.map(dto =>
|
365
|
-
const uiDefinitionContainer = uiDefinitionFromDTO(dto);
|
366
|
-
if (isLegacyUIDefinition(uiDefinitionContainer.source)) {
|
367
|
-
ModelTranslatorUtils.toLocalUIDefinition(uiDefinitionContainer.source);
|
368
|
-
}
|
369
|
-
return uiDefinitionContainer;
|
370
|
-
}) });
|
399
|
+
return Object.assign(Object.assign({}, runtimeData), { uiDefinitions: runtimeData.uiDefinitions.map(dto => uiDefinitionFromDTO(dto)) });
|
371
400
|
}));
|
372
401
|
}
|
373
402
|
getRuntimeDataByModelId(modelId) {
|
@@ -380,18 +409,69 @@ class ConfigurationApiService {
|
|
380
409
|
var _a, _b, _c;
|
381
410
|
const type = runtimeModel.components.get(lineItem.type);
|
382
411
|
const portDomains = Object.assign({}, lineItem.portDomains);
|
412
|
+
// loop through ports to look for 'None' type domain computations
|
383
413
|
for (const port of (_a = type === null || type === void 0 ? void 0 : type.ports) !== null && _a !== void 0 ? _a : []) {
|
384
|
-
const
|
385
|
-
|
386
|
-
|
414
|
+
const { name: portName, type: typeName, min, max, domainTypes, properties } = port;
|
415
|
+
const portDomain = portDomains[portName];
|
416
|
+
if (portDomain) {
|
417
|
+
// there's a 'None' type domain computation
|
418
|
+
if (((_b = portDomain.properties) === null || _b === void 0 ? void 0 : _b['domainComputation']) === ('None')) {
|
419
|
+
portDomain.domainTypes = domainTypes;
|
420
|
+
}
|
421
|
+
}
|
422
|
+
else {
|
423
|
+
// there's no port domain so consider that as 'None' type domain computation
|
424
|
+
portDomains[portName] = {
|
425
|
+
name: portName,
|
426
|
+
type: typeName,
|
427
|
+
minCard: Number(min),
|
428
|
+
maxCard: Number(max),
|
429
|
+
domainTypes: domainTypes,
|
430
|
+
properties: Object.assign(Object.assign({}, properties), { domainComputation: 'None' }),
|
431
|
+
};
|
387
432
|
}
|
388
433
|
}
|
389
434
|
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
435
|
}
|
391
436
|
}
|
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.
|
437
|
+
ConfigurationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
438
|
+
ConfigurationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationApiService });
|
439
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationApiService, decorators: [{
|
440
|
+
type: Injectable
|
441
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
442
|
+
|
443
|
+
class ConfigurationProcessorsApiService {
|
444
|
+
constructor(baseHttpService) {
|
445
|
+
this.baseHttpService = baseHttpService;
|
446
|
+
this.serviceUrl = '/configuration/processors/owners';
|
447
|
+
this.fetchConfigurationProcessors$ = (ownerId) => {
|
448
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${ownerId}` });
|
449
|
+
};
|
450
|
+
this.createConfigurationProcessors$ = (configurationProcessor) => {
|
451
|
+
return this.baseHttpService.api({
|
452
|
+
method: 'post',
|
453
|
+
url: `${this.serviceUrl}/${configurationProcessor.ownerId}`,
|
454
|
+
body: configurationProcessor,
|
455
|
+
});
|
456
|
+
};
|
457
|
+
this.updateConfigurationProcessors$ = (configurationProcessor) => {
|
458
|
+
return this.baseHttpService.api({
|
459
|
+
method: 'put',
|
460
|
+
url: `${this.serviceUrl}/${configurationProcessor.ownerId}/${configurationProcessor.id}`,
|
461
|
+
body: configurationProcessor,
|
462
|
+
});
|
463
|
+
};
|
464
|
+
this.deleteConfigurationProcessors$ = (configurationProcessor) => {
|
465
|
+
return this.baseHttpService.api({
|
466
|
+
method: 'delete',
|
467
|
+
url: `${this.serviceUrl}/${configurationProcessor.ownerId}/${configurationProcessor.id}`,
|
468
|
+
});
|
469
|
+
};
|
470
|
+
}
|
471
|
+
}
|
472
|
+
ConfigurationProcessorsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
473
|
+
ConfigurationProcessorsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService });
|
474
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService, decorators: [{
|
395
475
|
type: Injectable
|
396
476
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
397
477
|
|
@@ -464,9 +544,9 @@ class ConfigurationSettingsApiService {
|
|
464
544
|
return this.httpService.api(Object.assign({ method: 'get', url: '/cache/evict/' + name }, options));
|
465
545
|
}
|
466
546
|
}
|
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.
|
547
|
+
ConfigurationSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService, deps: [{ token: i1.BaseHttpService }, { token: i2.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
548
|
+
ConfigurationSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService });
|
549
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService, decorators: [{
|
470
550
|
type: Injectable
|
471
551
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i2.MessageService }]; } });
|
472
552
|
|
@@ -486,9 +566,50 @@ class ContextApiService {
|
|
486
566
|
});
|
487
567
|
}
|
488
568
|
}
|
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.
|
569
|
+
ContextApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
570
|
+
ContextApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextApiService });
|
571
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextApiService, decorators: [{
|
572
|
+
type: Injectable
|
573
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
574
|
+
|
575
|
+
class ContractedPriceApiService {
|
576
|
+
constructor(baseHttpService) {
|
577
|
+
this.baseHttpService = baseHttpService;
|
578
|
+
this.serviceUrl = '/admin/contracted-price';
|
579
|
+
this.fetchContractedPrices$ = () => {
|
580
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}` });
|
581
|
+
};
|
582
|
+
this.fetchContractedPrice$ = (id) => {
|
583
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
584
|
+
};
|
585
|
+
this.createContractedPrice$ = (data) => {
|
586
|
+
return this.baseHttpService.api({
|
587
|
+
url: `${this.serviceUrl}`,
|
588
|
+
method: 'put',
|
589
|
+
body: data,
|
590
|
+
});
|
591
|
+
};
|
592
|
+
this.updateContractedPrice$ = (data) => {
|
593
|
+
return this.baseHttpService.api({
|
594
|
+
url: `${this.serviceUrl}/${data.id}`,
|
595
|
+
method: 'put',
|
596
|
+
body: data,
|
597
|
+
});
|
598
|
+
};
|
599
|
+
this.searchContractedPrices$ = (searchParams, expression) => {
|
600
|
+
const params = new HttpParams({ fromObject: Object.assign({}, searchParams) });
|
601
|
+
return this.baseHttpService.api({
|
602
|
+
method: 'post',
|
603
|
+
url: `${this.serviceUrl}/search`,
|
604
|
+
params,
|
605
|
+
body: expression || {},
|
606
|
+
});
|
607
|
+
};
|
608
|
+
}
|
609
|
+
}
|
610
|
+
ContractedPriceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContractedPriceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
611
|
+
ContractedPriceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContractedPriceApiService });
|
612
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContractedPriceApiService, decorators: [{
|
492
613
|
type: Injectable
|
493
614
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
494
615
|
|
@@ -506,9 +627,9 @@ class DeltaApiService {
|
|
506
627
|
});
|
507
628
|
}
|
508
629
|
}
|
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.
|
630
|
+
DeltaApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeltaApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
631
|
+
DeltaApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeltaApiService });
|
632
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeltaApiService, decorators: [{
|
512
633
|
type: Injectable
|
513
634
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
514
635
|
|
@@ -568,9 +689,9 @@ class DocumentAttachmentApiService {
|
|
568
689
|
});
|
569
690
|
}
|
570
691
|
}
|
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.
|
692
|
+
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 });
|
693
|
+
DocumentAttachmentApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentAttachmentApiService });
|
694
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentAttachmentApiService, decorators: [{
|
574
695
|
type: Injectable
|
575
696
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i1.FileDownloadService }]; } });
|
576
697
|
|
@@ -612,7 +733,9 @@ class SalesforceApiService {
|
|
612
733
|
return this.httpService.api(Object.assign({ method: 'post', url: methodUrl, body: fields }, options));
|
613
734
|
}
|
614
735
|
apexGetRequest(path, params, options) {
|
615
|
-
|
736
|
+
// this line is needed because HttpParams instance from Integration behaves wrong in studio instance of Angular
|
737
|
+
const httpParams = new HttpParams({ fromString: params.toString() });
|
738
|
+
return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/apex${path}`, params: httpParams }, options));
|
616
739
|
}
|
617
740
|
apexPostRequest(path, body, options) {
|
618
741
|
return this.httpService.api(Object.assign({ method: 'post', body, url: `${this.SERVICE_URL}/apex${path}` }, options));
|
@@ -630,9 +753,9 @@ class SalesforceApiService {
|
|
630
753
|
});
|
631
754
|
}
|
632
755
|
}
|
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.
|
756
|
+
SalesforceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
757
|
+
SalesforceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService });
|
758
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, decorators: [{
|
636
759
|
type: Injectable
|
637
760
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
638
761
|
|
@@ -645,7 +768,7 @@ class DocumentTemplatesApiService {
|
|
645
768
|
this.http = http;
|
646
769
|
this.DOCGEN_TAG = 'docgen';
|
647
770
|
this.SERVICE_URL = '/templates';
|
648
|
-
this.DOC_GEN_URL_FALLBACK =
|
771
|
+
this.DOC_GEN_URL_FALLBACK = `${window.VELO_API}/docgen`;
|
649
772
|
this.mapSfQueryResult = (limit) => map((records) => {
|
650
773
|
if (!records.length) {
|
651
774
|
return { _result: 'No Records Found' };
|
@@ -783,11 +906,13 @@ class DocumentTemplatesApiService {
|
|
783
906
|
generateDocument(template, object, params = {}) {
|
784
907
|
const documentData$ = this.generateDocumentData(template, object, Object.assign(Object.assign({}, params), { shouldPreventDownload: true }));
|
785
908
|
return zip(this.getTemplateFile(template.id), documentData$, this.resolveAttachments$(template)).pipe(switchMap(([templateFile, data, attachments]) => {
|
786
|
-
var _a, _b, _c, _d, _e, _f;
|
909
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
787
910
|
const document = DocxTemplater.generate(templateFile, data);
|
788
911
|
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
|
-
|
912
|
+
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) ||
|
913
|
+
properties['Name'] ||
|
914
|
+
template.name;
|
915
|
+
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
916
|
if (documentFormat === 'DOCX') {
|
792
917
|
this.fileDownloadService.processDownload(document, documentName);
|
793
918
|
return of(document);
|
@@ -884,11 +1009,11 @@ class DocumentTemplatesApiService {
|
|
884
1009
|
return forkJoin(attachmentIds.map(id => this.documentAttachmentService.getAttachmentFile(id, true)));
|
885
1010
|
}
|
886
1011
|
queryObject({ objectName, resultObjectName, fields, statement }, { properties }) {
|
887
|
-
var _a;
|
1012
|
+
var _a, _b;
|
888
1013
|
const patternLimit = /(\s*limit\s\d*)/i;
|
889
1014
|
let limit = 1;
|
890
1015
|
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();
|
1016
|
+
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
1017
|
if (limitStr) {
|
893
1018
|
limit = Number.parseInt(limitStr, 10);
|
894
1019
|
}
|
@@ -901,11 +1026,11 @@ class DocumentTemplatesApiService {
|
|
901
1026
|
return this.salesforceApiService.query(searchRequest, objectName).pipe(this.mapSfQueryResult(limit), map(value => ({ [resultObjectName]: value })));
|
902
1027
|
}
|
903
1028
|
}
|
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.
|
1029
|
+
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 });
|
1030
|
+
DocumentTemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentTemplatesApiService });
|
1031
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentTemplatesApiService, decorators: [{
|
907
1032
|
type: Injectable
|
908
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: SalesforceApiService }, { type: i1.FileDownloadService }, { type: DocumentAttachmentApiService }, { type:
|
1033
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: SalesforceApiService }, { type: i1.FileDownloadService }, { type: DocumentAttachmentApiService }, { type: i1$1.HttpClient }]; } });
|
909
1034
|
|
910
1035
|
class EndpointsApiService {
|
911
1036
|
constructor(baseHttpService) {
|
@@ -976,9 +1101,148 @@ class EndpointsApiService {
|
|
976
1101
|
});
|
977
1102
|
}
|
978
1103
|
}
|
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.
|
1104
|
+
EndpointsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1105
|
+
EndpointsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsApiService });
|
1106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsApiService, decorators: [{
|
1107
|
+
type: Injectable
|
1108
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1109
|
+
|
1110
|
+
class FlowStateApiService {
|
1111
|
+
constructor(httpService) {
|
1112
|
+
this.httpService = httpService;
|
1113
|
+
this.SERVICE_URL = '/configuration/states';
|
1114
|
+
}
|
1115
|
+
/**
|
1116
|
+
* Initialize flow state
|
1117
|
+
* @param request Request
|
1118
|
+
* @returns Flow initialization response, which contains session ID and result of selectors
|
1119
|
+
*/
|
1120
|
+
init(request) {
|
1121
|
+
return this.httpService.api({
|
1122
|
+
method: 'post',
|
1123
|
+
url: `${this.SERVICE_URL}/quote/start`,
|
1124
|
+
body: request,
|
1125
|
+
});
|
1126
|
+
}
|
1127
|
+
/**
|
1128
|
+
* Get existing state by ID
|
1129
|
+
* @param id ID
|
1130
|
+
* @returns Flow State
|
1131
|
+
*/
|
1132
|
+
get(id) {
|
1133
|
+
return this.httpService.api({
|
1134
|
+
url: `${this.SERVICE_URL}/${id}`,
|
1135
|
+
});
|
1136
|
+
}
|
1137
|
+
/**
|
1138
|
+
* Execute actions/selectors
|
1139
|
+
* @param id State ID
|
1140
|
+
* @param request Request
|
1141
|
+
* @returns Execute result
|
1142
|
+
*/
|
1143
|
+
execute(id, request) {
|
1144
|
+
return this.httpService.api({
|
1145
|
+
method: 'post',
|
1146
|
+
url: `${this.SERVICE_URL}/quote/${id}/execute`,
|
1147
|
+
body: request,
|
1148
|
+
});
|
1149
|
+
}
|
1150
|
+
/**
|
1151
|
+
* Save Quote in the state
|
1152
|
+
* @param id State ID
|
1153
|
+
*/
|
1154
|
+
save(id) {
|
1155
|
+
return this.httpService.api({
|
1156
|
+
method: 'post',
|
1157
|
+
url: `${this.SERVICE_URL}/quote/${id}/save`,
|
1158
|
+
});
|
1159
|
+
}
|
1160
|
+
/**
|
1161
|
+
* Submit Quote in the state
|
1162
|
+
* @param id State ID
|
1163
|
+
*/
|
1164
|
+
submit(id) {
|
1165
|
+
return this.httpService.api({
|
1166
|
+
method: 'post',
|
1167
|
+
url: `${this.SERVICE_URL}/quote/${id}/submit`,
|
1168
|
+
});
|
1169
|
+
}
|
1170
|
+
/**
|
1171
|
+
* Close Flow state
|
1172
|
+
* @param id State ID
|
1173
|
+
*/
|
1174
|
+
cancel(id) {
|
1175
|
+
return this.httpService.api({
|
1176
|
+
method: 'post',
|
1177
|
+
url: `${this.SERVICE_URL}/quote/${id}/cancel`,
|
1178
|
+
});
|
1179
|
+
}
|
1180
|
+
/**
|
1181
|
+
* Initialize stateful configuration
|
1182
|
+
* @param stateId string
|
1183
|
+
* @param request Request
|
1184
|
+
* @returns Flow initialization response, which contains session ID and result of selectors
|
1185
|
+
*/
|
1186
|
+
newConfiguration(stateId, request) {
|
1187
|
+
return this.httpService.api({
|
1188
|
+
method: 'post',
|
1189
|
+
url: `${this.SERVICE_URL}/quote/${stateId}/configuration/new`,
|
1190
|
+
body: request,
|
1191
|
+
});
|
1192
|
+
}
|
1193
|
+
/**
|
1194
|
+
* Start stateful configuration
|
1195
|
+
* @param stateId string
|
1196
|
+
* @param request Request
|
1197
|
+
* @returns Flow initialization response, which contains session ID and result of selectors
|
1198
|
+
*/
|
1199
|
+
startConfiguration(stateId, request) {
|
1200
|
+
return this.httpService.api({
|
1201
|
+
method: 'post',
|
1202
|
+
url: `${this.SERVICE_URL}/quote/${stateId}/configuration/start`,
|
1203
|
+
body: request,
|
1204
|
+
});
|
1205
|
+
}
|
1206
|
+
/**
|
1207
|
+
* Execute stateful configuration
|
1208
|
+
* @param stateId string
|
1209
|
+
* @param configurationId string
|
1210
|
+
* @param request Request
|
1211
|
+
* @returns Flow initialization response, which contains session ID and result of selectors
|
1212
|
+
*/
|
1213
|
+
executeConfiguration(stateId, configurationId, request) {
|
1214
|
+
return this.httpService.api({
|
1215
|
+
method: 'post',
|
1216
|
+
url: `${this.SERVICE_URL}/quote/${stateId}/configuration/${configurationId}/execute`,
|
1217
|
+
body: request,
|
1218
|
+
});
|
1219
|
+
}
|
1220
|
+
/**
|
1221
|
+
* Save stateful configuration
|
1222
|
+
* @param stateId string
|
1223
|
+
* @param configurationId string
|
1224
|
+
*/
|
1225
|
+
saveConfiguration(stateId, configurationId) {
|
1226
|
+
return this.httpService.api({
|
1227
|
+
method: 'post',
|
1228
|
+
url: `${this.SERVICE_URL}/quote/${stateId}/configuration/${configurationId}/save`,
|
1229
|
+
});
|
1230
|
+
}
|
1231
|
+
/**
|
1232
|
+
* Cancel stateful configuration
|
1233
|
+
* @param stateId string
|
1234
|
+
* @param configurationId string
|
1235
|
+
*/
|
1236
|
+
cancelConfiguration(stateId, configurationId) {
|
1237
|
+
return this.httpService.api({
|
1238
|
+
method: 'post',
|
1239
|
+
url: `${this.SERVICE_URL}/quote/${stateId}/configuration/${configurationId}/cancel`,
|
1240
|
+
});
|
1241
|
+
}
|
1242
|
+
}
|
1243
|
+
FlowStateApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1244
|
+
FlowStateApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateApiService });
|
1245
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateApiService, decorators: [{
|
982
1246
|
type: Injectable
|
983
1247
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
984
1248
|
|
@@ -988,17 +1252,20 @@ class FlowsApiService {
|
|
988
1252
|
this.flowsKey = 'flows';
|
989
1253
|
}
|
990
1254
|
getFlow(id) {
|
991
|
-
return this.fetchFlows().pipe(map(flows => flows.find(flow => flow.id == id))
|
1255
|
+
return this.fetchFlows().pipe(map(flows => flows.find(flow => flow.id == id)), map(flow => {
|
1256
|
+
if (!flow) {
|
1257
|
+
throw new Error(`Flow with flowId=${id} is not defined`);
|
1258
|
+
}
|
1259
|
+
return flow;
|
1260
|
+
}));
|
992
1261
|
}
|
993
1262
|
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) : [])));
|
1263
|
+
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
1264
|
}
|
998
1265
|
}
|
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.
|
1266
|
+
FlowsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1267
|
+
FlowsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService });
|
1268
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, decorators: [{
|
1002
1269
|
type: Injectable
|
1003
1270
|
}], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
|
1004
1271
|
|
@@ -1057,9 +1324,9 @@ class GuidedSellingsAdminApiService {
|
|
1057
1324
|
}
|
1058
1325
|
}
|
1059
1326
|
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.
|
1327
|
+
GuidedSellingsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1328
|
+
GuidedSellingsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingsAdminApiService });
|
1329
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingsAdminApiService, decorators: [{
|
1063
1330
|
type: Injectable
|
1064
1331
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1065
1332
|
|
@@ -1089,9 +1356,9 @@ class GuidedSellingApiService {
|
|
1089
1356
|
});
|
1090
1357
|
}
|
1091
1358
|
}
|
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.
|
1359
|
+
GuidedSellingApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1360
|
+
GuidedSellingApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingApiService });
|
1361
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingApiService, decorators: [{
|
1095
1362
|
type: Injectable
|
1096
1363
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1097
1364
|
|
@@ -1160,9 +1427,9 @@ class OffersApiService {
|
|
1160
1427
|
}
|
1161
1428
|
}
|
1162
1429
|
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.
|
1430
|
+
OffersApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OffersApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1431
|
+
OffersApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OffersApiService });
|
1432
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OffersApiService, decorators: [{
|
1166
1433
|
type: Injectable
|
1167
1434
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1168
1435
|
|
@@ -1177,11 +1444,11 @@ class OrgInfoApiService {
|
|
1177
1444
|
return this.http.get(`${this.hostUrl}/org-info/${organizationId}`);
|
1178
1445
|
}
|
1179
1446
|
}
|
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.
|
1447
|
+
OrgInfoApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
1448
|
+
OrgInfoApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService });
|
1449
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService, decorators: [{
|
1183
1450
|
type: Injectable
|
1184
|
-
}], ctorParameters: function () { return [{ type:
|
1451
|
+
}], ctorParameters: function () { return [{ type: i1$1.HttpClient }]; } });
|
1185
1452
|
|
1186
1453
|
class PicklistsApiService {
|
1187
1454
|
constructor(baseHttpService) {
|
@@ -1212,9 +1479,78 @@ class PicklistsApiService {
|
|
1212
1479
|
};
|
1213
1480
|
}
|
1214
1481
|
}
|
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.
|
1482
|
+
PicklistsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1483
|
+
PicklistsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService });
|
1484
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService, decorators: [{
|
1485
|
+
type: Injectable
|
1486
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1487
|
+
|
1488
|
+
class PortalsApiService {
|
1489
|
+
constructor(baseHttpService) {
|
1490
|
+
this.baseHttpService = baseHttpService;
|
1491
|
+
this.serviceUrl = '/admin/portal';
|
1492
|
+
this.getPortals$ = (skip = 1, name = '') => {
|
1493
|
+
let params = new HttpParams();
|
1494
|
+
params = params.append('count', (PortalsApiService.MAX_RESULTS * skip).toString());
|
1495
|
+
params = params.append('skip', '0');
|
1496
|
+
params = params.append('name', name);
|
1497
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}`, params });
|
1498
|
+
};
|
1499
|
+
this.searchPortals$ = (skip = 0, expression) => {
|
1500
|
+
let params = new HttpParams();
|
1501
|
+
params = params.set('skip', '' + skip);
|
1502
|
+
params = params.set('count', '' + PortalsApiService.MAX_RESULTS);
|
1503
|
+
return this.baseHttpService.api({
|
1504
|
+
method: 'post',
|
1505
|
+
url: `${this.serviceUrl}/search`,
|
1506
|
+
params,
|
1507
|
+
body: expression || {},
|
1508
|
+
});
|
1509
|
+
};
|
1510
|
+
this.removePortal$ = (id) => {
|
1511
|
+
return this.baseHttpService.api({
|
1512
|
+
url: `${this.serviceUrl}/${id}`,
|
1513
|
+
method: 'delete',
|
1514
|
+
});
|
1515
|
+
};
|
1516
|
+
this.restore$ = (id) => {
|
1517
|
+
return this.baseHttpService.api({
|
1518
|
+
method: 'patch',
|
1519
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
1520
|
+
});
|
1521
|
+
};
|
1522
|
+
this.duplicatePortal$ = (cloneRequest) => {
|
1523
|
+
return this.baseHttpService.api({
|
1524
|
+
url: `${this.serviceUrl}/${cloneRequest.id}/clone`,
|
1525
|
+
method: 'post',
|
1526
|
+
body: cloneRequest,
|
1527
|
+
});
|
1528
|
+
};
|
1529
|
+
this.getPortal$ = (id) => {
|
1530
|
+
return this.baseHttpService.api({
|
1531
|
+
url: `${this.serviceUrl}/${id}`,
|
1532
|
+
});
|
1533
|
+
};
|
1534
|
+
}
|
1535
|
+
createNewPortal$(body) {
|
1536
|
+
return this.baseHttpService.api({
|
1537
|
+
url: `${this.serviceUrl}`,
|
1538
|
+
method: 'post',
|
1539
|
+
body,
|
1540
|
+
});
|
1541
|
+
}
|
1542
|
+
updatePortal$(portal, settings) {
|
1543
|
+
return this.baseHttpService.api({
|
1544
|
+
url: `${this.serviceUrl}/${portal.id}`,
|
1545
|
+
method: 'put',
|
1546
|
+
body: Object.assign(Object.assign({}, portal), { settings: JSON.stringify(settings) }),
|
1547
|
+
});
|
1548
|
+
}
|
1549
|
+
}
|
1550
|
+
PortalsApiService.MAX_RESULTS = 60;
|
1551
|
+
PortalsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PortalsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1552
|
+
PortalsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PortalsApiService });
|
1553
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PortalsApiService, decorators: [{
|
1218
1554
|
type: Injectable
|
1219
1555
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1220
1556
|
|
@@ -1272,9 +1608,9 @@ class PriceApiService {
|
|
1272
1608
|
});
|
1273
1609
|
}
|
1274
1610
|
}
|
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.
|
1611
|
+
PriceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PriceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1612
|
+
PriceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PriceApiService });
|
1613
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PriceApiService, decorators: [{
|
1278
1614
|
type: Injectable
|
1279
1615
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1280
1616
|
|
@@ -1365,10 +1701,16 @@ class ProceduresApiService {
|
|
1365
1701
|
body,
|
1366
1702
|
});
|
1367
1703
|
}
|
1704
|
+
fetchDefaultPricingSteps$() {
|
1705
|
+
return this.baseHttpService.api({
|
1706
|
+
url: `${this.ADMIN_SERVICE_URL}/pricing-steps`,
|
1707
|
+
method: 'get',
|
1708
|
+
});
|
1709
|
+
}
|
1368
1710
|
}
|
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.
|
1711
|
+
ProceduresApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1712
|
+
ProceduresApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService });
|
1713
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService, decorators: [{
|
1372
1714
|
type: Injectable
|
1373
1715
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1374
1716
|
|
@@ -1514,9 +1856,9 @@ class ProductApiService {
|
|
1514
1856
|
return `${this.serviceUrl}/${productId}/image`;
|
1515
1857
|
}
|
1516
1858
|
}
|
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.
|
1859
|
+
ProductApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1860
|
+
ProductApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService });
|
1861
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService, decorators: [{
|
1520
1862
|
type: Injectable
|
1521
1863
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1522
1864
|
|
@@ -1745,36 +2087,99 @@ class ProductModelApiService {
|
|
1745
2087
|
}
|
1746
2088
|
}
|
1747
2089
|
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.
|
2090
|
+
ProductModelApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModelApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2091
|
+
ProductModelApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModelApiService });
|
2092
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModelApiService, decorators: [{
|
1751
2093
|
type: Injectable
|
1752
2094
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1753
2095
|
|
1754
|
-
class
|
1755
|
-
constructor(
|
1756
|
-
this.
|
1757
|
-
this.
|
1758
|
-
|
1759
|
-
|
1760
|
-
|
1761
|
-
|
1762
|
-
|
1763
|
-
|
1764
|
-
|
1765
|
-
|
1766
|
-
|
1767
|
-
|
1768
|
-
|
1769
|
-
|
1770
|
-
|
1771
|
-
|
1772
|
-
|
1773
|
-
|
1774
|
-
|
1775
|
-
|
1776
|
-
|
1777
|
-
|
2096
|
+
class PromotionsApiService {
|
2097
|
+
constructor(baseHttpService) {
|
2098
|
+
this.baseHttpService = baseHttpService;
|
2099
|
+
this.serviceUrl = '/admin/promotion';
|
2100
|
+
this.fetchAll$ = () => {
|
2101
|
+
return this.baseHttpService.api({ url: this.serviceUrl });
|
2102
|
+
};
|
2103
|
+
this.fetchOne$ = (id) => {
|
2104
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
2105
|
+
};
|
2106
|
+
this.remove$ = (id) => {
|
2107
|
+
return this.baseHttpService.api({
|
2108
|
+
url: `${this.serviceUrl}/${id}`,
|
2109
|
+
method: 'delete',
|
2110
|
+
});
|
2111
|
+
};
|
2112
|
+
this.restore$ = (id) => {
|
2113
|
+
return this.baseHttpService.api({
|
2114
|
+
method: 'patch',
|
2115
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
2116
|
+
});
|
2117
|
+
};
|
2118
|
+
this.duplicate$ = (body) => {
|
2119
|
+
return this.baseHttpService
|
2120
|
+
.api({
|
2121
|
+
url: `${this.serviceUrl}/${body.id}/clone`,
|
2122
|
+
method: 'post',
|
2123
|
+
body,
|
2124
|
+
})
|
2125
|
+
.pipe(map$1(response => response.clonedRecordId));
|
2126
|
+
};
|
2127
|
+
}
|
2128
|
+
search$(expression, skip, count) {
|
2129
|
+
let params = new HttpParams();
|
2130
|
+
if (typeof skip === 'number') {
|
2131
|
+
params = params.set('skip', '' + skip);
|
2132
|
+
}
|
2133
|
+
if (typeof count === 'number') {
|
2134
|
+
params = params.set('count', '' + count);
|
2135
|
+
}
|
2136
|
+
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2137
|
+
}
|
2138
|
+
create$(body) {
|
2139
|
+
return this.baseHttpService.api({
|
2140
|
+
url: `${this.serviceUrl}`,
|
2141
|
+
method: 'post',
|
2142
|
+
body,
|
2143
|
+
});
|
2144
|
+
}
|
2145
|
+
update$(body) {
|
2146
|
+
return this.baseHttpService.api({
|
2147
|
+
url: `${this.serviceUrl}/${body.id}`,
|
2148
|
+
method: 'put',
|
2149
|
+
body,
|
2150
|
+
});
|
2151
|
+
}
|
2152
|
+
}
|
2153
|
+
PromotionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2154
|
+
PromotionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService });
|
2155
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService, decorators: [{
|
2156
|
+
type: Injectable
|
2157
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2158
|
+
|
2159
|
+
class QuoteApiService {
|
2160
|
+
constructor(httpService) {
|
2161
|
+
this.httpService = httpService;
|
2162
|
+
this.SERVICE_URL = '/quotes';
|
2163
|
+
}
|
2164
|
+
// request quoteId | accountId | opportunityId | orderId
|
2165
|
+
getQuoteDraft(objectId, params, errorHandler) {
|
2166
|
+
return this.httpService.api({
|
2167
|
+
method: 'get',
|
2168
|
+
url: `${this.SERVICE_URL}/${objectId}`,
|
2169
|
+
params,
|
2170
|
+
errorHandler,
|
2171
|
+
});
|
2172
|
+
}
|
2173
|
+
upsertQuote(request, options) {
|
2174
|
+
return this.httpService.api(Object.assign({ method: 'post', url: `${this.SERVICE_URL}`, body: request }, options));
|
2175
|
+
}
|
2176
|
+
submitQuote(request, options) {
|
2177
|
+
return this.httpService.api(Object.assign({ method: 'post', url: `${this.SERVICE_URL}/submit`, body: request }, options));
|
2178
|
+
}
|
2179
|
+
attachDocument(id, documentName, data) {
|
2180
|
+
const formData = new FormData();
|
2181
|
+
const blob = new Blob([data]);
|
2182
|
+
formData.append('file', blob, documentName);
|
1778
2183
|
return this.httpService.upload({
|
1779
2184
|
url: `${this.SERVICE_URL}/${id}/attach-document`,
|
1780
2185
|
responseType: 'arraybuffer',
|
@@ -1783,9 +2188,9 @@ class QuoteApiService {
|
|
1783
2188
|
});
|
1784
2189
|
}
|
1785
2190
|
}
|
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.
|
2191
|
+
QuoteApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2192
|
+
QuoteApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService });
|
2193
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService, decorators: [{
|
1789
2194
|
type: Injectable
|
1790
2195
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1791
2196
|
|
@@ -1801,9 +2206,135 @@ class RampApiService {
|
|
1801
2206
|
return this.httpService.api(Object.assign({ method: 'post', url: `${this.SERVICE_URL}/renew`, body: request }, options));
|
1802
2207
|
}
|
1803
2208
|
}
|
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.
|
2209
|
+
RampApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RampApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2210
|
+
RampApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RampApiService });
|
2211
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RampApiService, decorators: [{
|
2212
|
+
type: Injectable
|
2213
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2214
|
+
|
2215
|
+
class RebateProgramApiService {
|
2216
|
+
constructor(baseHttpService) {
|
2217
|
+
this.baseHttpService = baseHttpService;
|
2218
|
+
this.serviceUrl = '/admin/rebate-program';
|
2219
|
+
this.fetchAll$ = () => {
|
2220
|
+
return this.baseHttpService.api({ url: this.serviceUrl });
|
2221
|
+
};
|
2222
|
+
this.fetchOne$ = (id) => {
|
2223
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
2224
|
+
};
|
2225
|
+
this.remove$ = (id) => {
|
2226
|
+
return this.baseHttpService.api({
|
2227
|
+
url: `${this.serviceUrl}/${id}`,
|
2228
|
+
method: 'delete',
|
2229
|
+
});
|
2230
|
+
};
|
2231
|
+
this.restore$ = (id) => {
|
2232
|
+
return this.baseHttpService.api({
|
2233
|
+
method: 'patch',
|
2234
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
2235
|
+
});
|
2236
|
+
};
|
2237
|
+
this.duplicate$ = (body) => {
|
2238
|
+
return this.baseHttpService
|
2239
|
+
.api({
|
2240
|
+
url: `${this.serviceUrl}/${body.id}/clone`,
|
2241
|
+
method: 'post',
|
2242
|
+
body,
|
2243
|
+
})
|
2244
|
+
.pipe(map$1(response => response.clonedRecordId));
|
2245
|
+
};
|
2246
|
+
}
|
2247
|
+
search$(expression, skip, count) {
|
2248
|
+
let params = new HttpParams();
|
2249
|
+
if (typeof skip === 'number') {
|
2250
|
+
params = params.set('skip', '' + skip);
|
2251
|
+
}
|
2252
|
+
if (typeof count === 'number') {
|
2253
|
+
params = params.set('count', '' + count);
|
2254
|
+
}
|
2255
|
+
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2256
|
+
}
|
2257
|
+
create$(body) {
|
2258
|
+
return this.baseHttpService.api({
|
2259
|
+
url: `${this.serviceUrl}`,
|
2260
|
+
method: 'post',
|
2261
|
+
body,
|
2262
|
+
});
|
2263
|
+
}
|
2264
|
+
update$(body) {
|
2265
|
+
return this.baseHttpService.api({
|
2266
|
+
url: `${this.serviceUrl}/${body.id}`,
|
2267
|
+
method: 'put',
|
2268
|
+
body,
|
2269
|
+
});
|
2270
|
+
}
|
2271
|
+
}
|
2272
|
+
RebateProgramApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2273
|
+
RebateProgramApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService });
|
2274
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, decorators: [{
|
2275
|
+
type: Injectable
|
2276
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2277
|
+
|
2278
|
+
class RebateTypeApiService {
|
2279
|
+
constructor(baseHttpService) {
|
2280
|
+
this.baseHttpService = baseHttpService;
|
2281
|
+
this.serviceUrl = '/admin/rebate-type';
|
2282
|
+
this.fetchAll$ = () => {
|
2283
|
+
return this.baseHttpService.api({ url: this.serviceUrl });
|
2284
|
+
};
|
2285
|
+
this.fetchOne$ = (id) => {
|
2286
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
2287
|
+
};
|
2288
|
+
this.remove$ = (id) => {
|
2289
|
+
return this.baseHttpService.api({
|
2290
|
+
url: `${this.serviceUrl}/${id}`,
|
2291
|
+
method: 'delete',
|
2292
|
+
});
|
2293
|
+
};
|
2294
|
+
this.restore$ = (id) => {
|
2295
|
+
return this.baseHttpService.api({
|
2296
|
+
method: 'patch',
|
2297
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
2298
|
+
});
|
2299
|
+
};
|
2300
|
+
this.duplicate$ = (body) => {
|
2301
|
+
return this.baseHttpService
|
2302
|
+
.api({
|
2303
|
+
url: `${this.serviceUrl}/${body.id}/clone`,
|
2304
|
+
method: 'post',
|
2305
|
+
body,
|
2306
|
+
})
|
2307
|
+
.pipe(map$1(response => response.clonedRecordId));
|
2308
|
+
};
|
2309
|
+
}
|
2310
|
+
search$(expression, skip, count) {
|
2311
|
+
let params = new HttpParams();
|
2312
|
+
if (typeof skip === 'number') {
|
2313
|
+
params = params.set('skip', '' + skip);
|
2314
|
+
}
|
2315
|
+
if (typeof count === 'number') {
|
2316
|
+
params = params.set('count', '' + count);
|
2317
|
+
}
|
2318
|
+
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2319
|
+
}
|
2320
|
+
create$(body) {
|
2321
|
+
return this.baseHttpService.api({
|
2322
|
+
url: `${this.serviceUrl}`,
|
2323
|
+
method: 'post',
|
2324
|
+
body,
|
2325
|
+
});
|
2326
|
+
}
|
2327
|
+
update$(body) {
|
2328
|
+
return this.baseHttpService.api({
|
2329
|
+
url: `${this.serviceUrl}/${body.id}`,
|
2330
|
+
method: 'put',
|
2331
|
+
body,
|
2332
|
+
});
|
2333
|
+
}
|
2334
|
+
}
|
2335
|
+
RebateTypeApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2336
|
+
RebateTypeApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService });
|
2337
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, decorators: [{
|
1807
2338
|
type: Injectable
|
1808
2339
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1809
2340
|
|
@@ -1857,9 +2388,9 @@ class RuleGroupsApiService {
|
|
1857
2388
|
};
|
1858
2389
|
}
|
1859
2390
|
}
|
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.
|
2391
|
+
RuleGroupsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2392
|
+
RuleGroupsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService });
|
2393
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService, decorators: [{
|
1863
2394
|
type: Injectable
|
1864
2395
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1865
2396
|
|
@@ -1929,17 +2460,26 @@ class RulesApiService {
|
|
1929
2460
|
});
|
1930
2461
|
}
|
1931
2462
|
execute$(body) {
|
1932
|
-
const url = body.rule.ruleGroupType
|
2463
|
+
const url = this.getExecuteRuleUrl(body.rule.ruleGroupType);
|
1933
2464
|
return this.baseHttpService.api({
|
1934
2465
|
url,
|
1935
2466
|
method: 'post',
|
1936
2467
|
body,
|
1937
2468
|
});
|
1938
2469
|
}
|
2470
|
+
getExecuteRuleUrl(ruleGroupType) {
|
2471
|
+
if (ruleGroupType === RuleGroupTypes.eligibility) {
|
2472
|
+
return '/rules/eligibility/execute';
|
2473
|
+
}
|
2474
|
+
if (ruleGroupType === RuleGroupTypes.catalog) {
|
2475
|
+
return '/rules/catalog/execute';
|
2476
|
+
}
|
2477
|
+
return '/rules/execute';
|
2478
|
+
}
|
1939
2479
|
}
|
1940
|
-
RulesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1941
|
-
RulesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
1942
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2480
|
+
RulesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2481
|
+
RulesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService });
|
2482
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService, decorators: [{
|
1943
2483
|
type: Injectable
|
1944
2484
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1945
2485
|
|
@@ -2013,9 +2553,9 @@ class ScriptsApiService {
|
|
2013
2553
|
};
|
2014
2554
|
}
|
2015
2555
|
}
|
2016
|
-
ScriptsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2017
|
-
ScriptsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
2018
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2556
|
+
ScriptsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2557
|
+
ScriptsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService });
|
2558
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService, decorators: [{
|
2019
2559
|
type: Injectable
|
2020
2560
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2021
2561
|
|
@@ -2036,9 +2576,9 @@ class ShoppingCartSettingsApiService {
|
|
2036
2576
|
}, {})));
|
2037
2577
|
}
|
2038
2578
|
}
|
2039
|
-
ShoppingCartSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2040
|
-
ShoppingCartSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
2041
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2579
|
+
ShoppingCartSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2580
|
+
ShoppingCartSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService });
|
2581
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService, decorators: [{
|
2042
2582
|
type: Injectable
|
2043
2583
|
}], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
|
2044
2584
|
|
@@ -2084,9 +2624,9 @@ class StatefulConfigurationApiService {
|
|
2084
2624
|
});
|
2085
2625
|
}
|
2086
2626
|
}
|
2087
|
-
StatefulConfigurationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2088
|
-
StatefulConfigurationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
2089
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2627
|
+
StatefulConfigurationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StatefulConfigurationApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2628
|
+
StatefulConfigurationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StatefulConfigurationApiService });
|
2629
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StatefulConfigurationApiService, decorators: [{
|
2090
2630
|
type: Injectable
|
2091
2631
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2092
2632
|
|
@@ -2150,9 +2690,9 @@ class UIDefinitionsApiService {
|
|
2150
2690
|
return `/models/${modelId}/uidefinitions`;
|
2151
2691
|
}
|
2152
2692
|
}
|
2153
|
-
UIDefinitionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2154
|
-
UIDefinitionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
2155
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2693
|
+
UIDefinitionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2694
|
+
UIDefinitionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService });
|
2695
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService, decorators: [{
|
2156
2696
|
type: Injectable
|
2157
2697
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2158
2698
|
|
@@ -2388,6 +2928,11 @@ class UITemplatesApiService {
|
|
2388
2928
|
this.fetchComponentAttachmentFile$(templateId, component.id, 'json'),
|
2389
2929
|
]).pipe(map$1(([html, js, css, json]) => ({ html, js, css, json })));
|
2390
2930
|
};
|
2931
|
+
this.fetchComponentsAttachments$ = (templateId) => {
|
2932
|
+
return this.fetchComponents$(templateId).pipe(switchMap$1(components => {
|
2933
|
+
return forkJoin(components.map(component => this.fetchComponentAttachments$(templateId, component)));
|
2934
|
+
}));
|
2935
|
+
};
|
2391
2936
|
this.fetchComponentAttachmentFile$ = (templateId, componentId, attachmentType) => {
|
2392
2937
|
return this.baseHttpService
|
2393
2938
|
.api({
|
@@ -2438,9 +2983,9 @@ class UITemplatesApiService {
|
|
2438
2983
|
});
|
2439
2984
|
}
|
2440
2985
|
}
|
2441
|
-
UITemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2442
|
-
UITemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
2443
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2986
|
+
UITemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2987
|
+
UITemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService });
|
2988
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService, decorators: [{
|
2444
2989
|
type: Injectable
|
2445
2990
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2446
2991
|
|
@@ -2476,6 +3021,15 @@ class VeloceObjectsApiService {
|
|
2476
3021
|
url: `${this.serviceUrl}/${id}`,
|
2477
3022
|
});
|
2478
3023
|
};
|
3024
|
+
this.duplicateObject$ = (body) => {
|
3025
|
+
return this.baseHttpService
|
3026
|
+
.api({
|
3027
|
+
method: 'post',
|
3028
|
+
url: `${this.serviceUrl}/${body.id}/clone`,
|
3029
|
+
body,
|
3030
|
+
})
|
3031
|
+
.pipe(map(response => response.clonedRecordId));
|
3032
|
+
};
|
2479
3033
|
this.restoreObject$ = (id) => {
|
2480
3034
|
return this.baseHttpService.api({
|
2481
3035
|
method: 'patch',
|
@@ -2514,206 +3068,40 @@ class VeloceObjectsApiService {
|
|
2514
3068
|
});
|
2515
3069
|
}
|
2516
3070
|
}
|
2517
|
-
VeloceObjectsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2518
|
-
VeloceObjectsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
2519
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2520
|
-
type: Injectable
|
2521
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2522
|
-
|
2523
|
-
class RebateProgramApiService {
|
2524
|
-
constructor(baseHttpService) {
|
2525
|
-
this.baseHttpService = baseHttpService;
|
2526
|
-
this.serviceUrl = '/admin/rebate-program';
|
2527
|
-
this.fetchAll$ = () => {
|
2528
|
-
return this.baseHttpService.api({ url: this.serviceUrl });
|
2529
|
-
};
|
2530
|
-
this.fetchOne$ = (id) => {
|
2531
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
2532
|
-
};
|
2533
|
-
this.remove$ = (id) => {
|
2534
|
-
return this.baseHttpService.api({
|
2535
|
-
url: `${this.serviceUrl}/${id}`,
|
2536
|
-
method: 'delete',
|
2537
|
-
});
|
2538
|
-
};
|
2539
|
-
this.restore$ = (id) => {
|
2540
|
-
return this.baseHttpService.api({
|
2541
|
-
method: 'patch',
|
2542
|
-
url: `${this.serviceUrl}/${id}/restore`,
|
2543
|
-
});
|
2544
|
-
};
|
2545
|
-
this.duplicate$ = (body) => {
|
2546
|
-
return this.baseHttpService
|
2547
|
-
.api({
|
2548
|
-
url: `${this.serviceUrl}/${body.id}/clone`,
|
2549
|
-
method: 'post',
|
2550
|
-
body,
|
2551
|
-
})
|
2552
|
-
.pipe(map$1(response => response.clonedRecordId));
|
2553
|
-
};
|
2554
|
-
}
|
2555
|
-
search$(expression, skip, count) {
|
2556
|
-
let params = new HttpParams();
|
2557
|
-
if (typeof skip === 'number') {
|
2558
|
-
params = params.set('skip', '' + skip);
|
2559
|
-
}
|
2560
|
-
if (typeof count === 'number') {
|
2561
|
-
params = params.set('count', '' + count);
|
2562
|
-
}
|
2563
|
-
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2564
|
-
}
|
2565
|
-
create$(body) {
|
2566
|
-
return this.baseHttpService.api({
|
2567
|
-
url: `${this.serviceUrl}`,
|
2568
|
-
method: 'post',
|
2569
|
-
body,
|
2570
|
-
});
|
2571
|
-
}
|
2572
|
-
update$(body) {
|
2573
|
-
return this.baseHttpService.api({
|
2574
|
-
url: `${this.serviceUrl}/${body.id}`,
|
2575
|
-
method: 'put',
|
2576
|
-
body,
|
2577
|
-
});
|
2578
|
-
}
|
2579
|
-
}
|
2580
|
-
RebateProgramApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateProgramApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2581
|
-
RebateProgramApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateProgramApiService });
|
2582
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateProgramApiService, decorators: [{
|
2583
|
-
type: Injectable
|
2584
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2585
|
-
|
2586
|
-
class RebateTypeApiService {
|
2587
|
-
constructor(baseHttpService) {
|
2588
|
-
this.baseHttpService = baseHttpService;
|
2589
|
-
this.serviceUrl = '/admin/rebate-type';
|
2590
|
-
this.fetchAll$ = () => {
|
2591
|
-
return this.baseHttpService.api({ url: this.serviceUrl });
|
2592
|
-
};
|
2593
|
-
this.fetchOne$ = (id) => {
|
2594
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
2595
|
-
};
|
2596
|
-
this.remove$ = (id) => {
|
2597
|
-
return this.baseHttpService.api({
|
2598
|
-
url: `${this.serviceUrl}/${id}`,
|
2599
|
-
method: 'delete',
|
2600
|
-
});
|
2601
|
-
};
|
2602
|
-
this.restore$ = (id) => {
|
2603
|
-
return this.baseHttpService.api({
|
2604
|
-
method: 'patch',
|
2605
|
-
url: `${this.serviceUrl}/${id}/restore`,
|
2606
|
-
});
|
2607
|
-
};
|
2608
|
-
this.duplicate$ = (body) => {
|
2609
|
-
return this.baseHttpService
|
2610
|
-
.api({
|
2611
|
-
url: `${this.serviceUrl}/${body.id}/clone`,
|
2612
|
-
method: 'post',
|
2613
|
-
body,
|
2614
|
-
})
|
2615
|
-
.pipe(map$1(response => response.clonedRecordId));
|
2616
|
-
};
|
2617
|
-
}
|
2618
|
-
search$(expression, skip, count) {
|
2619
|
-
let params = new HttpParams();
|
2620
|
-
if (typeof skip === 'number') {
|
2621
|
-
params = params.set('skip', '' + skip);
|
2622
|
-
}
|
2623
|
-
if (typeof count === 'number') {
|
2624
|
-
params = params.set('count', '' + count);
|
2625
|
-
}
|
2626
|
-
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2627
|
-
}
|
2628
|
-
create$(body) {
|
2629
|
-
return this.baseHttpService.api({
|
2630
|
-
url: `${this.serviceUrl}`,
|
2631
|
-
method: 'post',
|
2632
|
-
body,
|
2633
|
-
});
|
2634
|
-
}
|
2635
|
-
update$(body) {
|
2636
|
-
return this.baseHttpService.api({
|
2637
|
-
url: `${this.serviceUrl}/${body.id}`,
|
2638
|
-
method: 'put',
|
2639
|
-
body,
|
2640
|
-
});
|
2641
|
-
}
|
2642
|
-
}
|
2643
|
-
RebateTypeApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateTypeApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2644
|
-
RebateTypeApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateTypeApiService });
|
2645
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateTypeApiService, decorators: [{
|
3071
|
+
VeloceObjectsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
3072
|
+
VeloceObjectsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService });
|
3073
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService, decorators: [{
|
2646
3074
|
type: Injectable
|
2647
3075
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2648
3076
|
|
2649
|
-
class
|
3077
|
+
class SandboxManagerApiService {
|
2650
3078
|
constructor(baseHttpService) {
|
2651
3079
|
this.baseHttpService = baseHttpService;
|
2652
|
-
this.serviceUrl = '/admin/
|
2653
|
-
this.fetchAll$ = () => {
|
2654
|
-
return this.baseHttpService.api({ url: this.serviceUrl });
|
2655
|
-
};
|
2656
|
-
this.fetchOne$ = (id) => {
|
2657
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
2658
|
-
};
|
2659
|
-
this.remove$ = (id) => {
|
2660
|
-
return this.baseHttpService.api({
|
2661
|
-
url: `${this.serviceUrl}/${id}`,
|
2662
|
-
method: 'delete',
|
2663
|
-
});
|
2664
|
-
};
|
2665
|
-
this.restore$ = (id) => {
|
2666
|
-
return this.baseHttpService.api({
|
2667
|
-
method: 'patch',
|
2668
|
-
url: `${this.serviceUrl}/${id}/restore`,
|
2669
|
-
});
|
2670
|
-
};
|
2671
|
-
this.duplicate$ = (body) => {
|
2672
|
-
return this.baseHttpService
|
2673
|
-
.api({
|
2674
|
-
url: `${this.serviceUrl}/${body.id}/clone`,
|
2675
|
-
method: 'post',
|
2676
|
-
body,
|
2677
|
-
})
|
2678
|
-
.pipe(map$1(response => response.clonedRecordId));
|
2679
|
-
};
|
2680
|
-
}
|
2681
|
-
search$(expression, skip, count) {
|
2682
|
-
let params = new HttpParams();
|
2683
|
-
if (typeof skip === 'number') {
|
2684
|
-
params = params.set('skip', '' + skip);
|
2685
|
-
}
|
2686
|
-
if (typeof count === 'number') {
|
2687
|
-
params = params.set('count', '' + count);
|
2688
|
-
}
|
2689
|
-
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
3080
|
+
this.serviceUrl = '/admin/portal';
|
2690
3081
|
}
|
2691
|
-
|
2692
|
-
return
|
2693
|
-
|
2694
|
-
|
2695
|
-
|
2696
|
-
|
3082
|
+
getSalesforceOrganizations$(skip = 1, name = '') {
|
3083
|
+
return of([
|
3084
|
+
{ id: '1', name: 'Organization 1', active: true },
|
3085
|
+
{ id: '2', name: 'Organization 2', active: false },
|
3086
|
+
{ id: '3', name: 'Organization 3', active: true },
|
3087
|
+
]);
|
2697
3088
|
}
|
2698
|
-
|
2699
|
-
return
|
2700
|
-
url: `${this.serviceUrl}/${body.id}`,
|
2701
|
-
method: 'put',
|
2702
|
-
body,
|
2703
|
-
});
|
3089
|
+
getAvailableSalesforceOrganizations$() {
|
3090
|
+
return of(2);
|
2704
3091
|
}
|
2705
3092
|
}
|
2706
|
-
|
2707
|
-
|
2708
|
-
i0.ɵɵ
|
3093
|
+
SandboxManagerApiService.MAX_RESULTS = 60;
|
3094
|
+
SandboxManagerApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SandboxManagerApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
3095
|
+
SandboxManagerApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SandboxManagerApiService });
|
3096
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SandboxManagerApiService, decorators: [{
|
2709
3097
|
type: Injectable
|
2710
3098
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2711
3099
|
|
2712
3100
|
class ApiModule {
|
2713
3101
|
}
|
2714
|
-
ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2715
|
-
ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
2716
|
-
ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
3102
|
+
ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
3103
|
+
ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, imports: [HttpClientModule] });
|
3104
|
+
ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, providers: [
|
2717
3105
|
BaseHttpService,
|
2718
3106
|
XrayService,
|
2719
3107
|
ConfigurationApiService,
|
@@ -2750,8 +3138,14 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
|
2750
3138
|
RebateProgramApiService,
|
2751
3139
|
RebateTypeApiService,
|
2752
3140
|
PromotionsApiService,
|
3141
|
+
VeloceAuthService,
|
3142
|
+
ContractedPriceApiService,
|
3143
|
+
PortalsApiService,
|
3144
|
+
ConfigurationProcessorsApiService,
|
3145
|
+
FlowStateApiService,
|
3146
|
+
SandboxManagerApiService,
|
2753
3147
|
], imports: [HttpClientModule] });
|
2754
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
3148
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, decorators: [{
|
2755
3149
|
type: NgModule,
|
2756
3150
|
args: [{
|
2757
3151
|
imports: [HttpClientModule],
|
@@ -2792,6 +3186,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
2792
3186
|
RebateProgramApiService,
|
2793
3187
|
RebateTypeApiService,
|
2794
3188
|
PromotionsApiService,
|
3189
|
+
VeloceAuthService,
|
3190
|
+
ContractedPriceApiService,
|
3191
|
+
PortalsApiService,
|
3192
|
+
ConfigurationProcessorsApiService,
|
3193
|
+
FlowStateApiService,
|
3194
|
+
SandboxManagerApiService,
|
2795
3195
|
],
|
2796
3196
|
}]
|
2797
3197
|
}] });
|
@@ -2800,5 +3200,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
2800
3200
|
* Generated bundle index. Do not edit.
|
2801
3201
|
*/
|
2802
3202
|
|
2803
|
-
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, VeloceObjectsApiService };
|
3203
|
+
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 };
|
2804
3204
|
//# sourceMappingURL=veloceapps-api.mjs.map
|