@veloceapps/api 8.0.0-13 → 8.0.0-131
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 +9 -4
- package/esm2020/lib/api.module.mjs +23 -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 +27 -13
- 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 +6 -6
- 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 +3 -3
- 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/scripts-api.service.mjs +3 -3
- 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 +692 -341
- package/fesm2015/veloceapps-api.mjs.map +1 -1
- package/fesm2020/veloceapps-api.mjs +694 -337
- package/fesm2020/veloceapps-api.mjs.map +1 -1
- package/index.d.ts +8 -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/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/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) {
|
@@ -382,16 +411,51 @@ class ConfigurationApiService {
|
|
382
411
|
const portDomains = Object.assign({}, lineItem.portDomains);
|
383
412
|
for (const port of (_a = type === null || type === void 0 ? void 0 : type.ports) !== null && _a !== void 0 ? _a : []) {
|
384
413
|
const portDomain = portDomains[port.name];
|
385
|
-
if (((_b = portDomain === null || portDomain === void 0 ? void 0 : portDomain.properties) === null || _b === void 0 ? void 0 : _b['domainComputation']) === '
|
414
|
+
if (((_b = portDomain === null || portDomain === void 0 ? void 0 : portDomain.properties) === null || _b === void 0 ? void 0 : _b['domainComputation']) === ('None')) {
|
386
415
|
portDomain.domainTypes = port.domainTypes;
|
387
416
|
}
|
388
417
|
}
|
389
418
|
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
419
|
}
|
391
420
|
}
|
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.
|
421
|
+
ConfigurationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
422
|
+
ConfigurationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationApiService });
|
423
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationApiService, decorators: [{
|
424
|
+
type: Injectable
|
425
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
426
|
+
|
427
|
+
class ConfigurationProcessorsApiService {
|
428
|
+
constructor(baseHttpService) {
|
429
|
+
this.baseHttpService = baseHttpService;
|
430
|
+
this.serviceUrl = '/configuration/processors/owners';
|
431
|
+
this.fetchConfigurationProcessors$ = (ownerId) => {
|
432
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${ownerId}` });
|
433
|
+
};
|
434
|
+
this.createConfigurationProcessors$ = (configurationProcessor) => {
|
435
|
+
return this.baseHttpService.api({
|
436
|
+
method: 'post',
|
437
|
+
url: `${this.serviceUrl}/${configurationProcessor.ownerId}`,
|
438
|
+
body: configurationProcessor,
|
439
|
+
});
|
440
|
+
};
|
441
|
+
this.updateConfigurationProcessors$ = (configurationProcessor) => {
|
442
|
+
return this.baseHttpService.api({
|
443
|
+
method: 'put',
|
444
|
+
url: `${this.serviceUrl}/${configurationProcessor.ownerId}/${configurationProcessor.id}`,
|
445
|
+
body: configurationProcessor,
|
446
|
+
});
|
447
|
+
};
|
448
|
+
this.deleteConfigurationProcessors$ = (configurationProcessor) => {
|
449
|
+
return this.baseHttpService.api({
|
450
|
+
method: 'delete',
|
451
|
+
url: `${this.serviceUrl}/${configurationProcessor.ownerId}/${configurationProcessor.id}`,
|
452
|
+
});
|
453
|
+
};
|
454
|
+
}
|
455
|
+
}
|
456
|
+
ConfigurationProcessorsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
457
|
+
ConfigurationProcessorsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService });
|
458
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService, decorators: [{
|
395
459
|
type: Injectable
|
396
460
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
397
461
|
|
@@ -464,9 +528,9 @@ class ConfigurationSettingsApiService {
|
|
464
528
|
return this.httpService.api(Object.assign({ method: 'get', url: '/cache/evict/' + name }, options));
|
465
529
|
}
|
466
530
|
}
|
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.
|
531
|
+
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 });
|
532
|
+
ConfigurationSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService });
|
533
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService, decorators: [{
|
470
534
|
type: Injectable
|
471
535
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i2.MessageService }]; } });
|
472
536
|
|
@@ -486,9 +550,50 @@ class ContextApiService {
|
|
486
550
|
});
|
487
551
|
}
|
488
552
|
}
|
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.
|
553
|
+
ContextApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
554
|
+
ContextApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextApiService });
|
555
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextApiService, decorators: [{
|
556
|
+
type: Injectable
|
557
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
558
|
+
|
559
|
+
class ContractedPriceApiService {
|
560
|
+
constructor(baseHttpService) {
|
561
|
+
this.baseHttpService = baseHttpService;
|
562
|
+
this.serviceUrl = '/admin/contracted-price';
|
563
|
+
this.fetchContractedPrices$ = () => {
|
564
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}` });
|
565
|
+
};
|
566
|
+
this.fetchContractedPrice$ = (id) => {
|
567
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
568
|
+
};
|
569
|
+
this.createContractedPrice$ = (data) => {
|
570
|
+
return this.baseHttpService.api({
|
571
|
+
url: `${this.serviceUrl}`,
|
572
|
+
method: 'put',
|
573
|
+
body: data,
|
574
|
+
});
|
575
|
+
};
|
576
|
+
this.updateContractedPrice$ = (data) => {
|
577
|
+
return this.baseHttpService.api({
|
578
|
+
url: `${this.serviceUrl}/${data.id}`,
|
579
|
+
method: 'put',
|
580
|
+
body: data,
|
581
|
+
});
|
582
|
+
};
|
583
|
+
this.searchContractedPrices$ = (searchParams, expression) => {
|
584
|
+
const params = new HttpParams({ fromObject: Object.assign({}, searchParams) });
|
585
|
+
return this.baseHttpService.api({
|
586
|
+
method: 'post',
|
587
|
+
url: `${this.serviceUrl}/search`,
|
588
|
+
params,
|
589
|
+
body: expression || {},
|
590
|
+
});
|
591
|
+
};
|
592
|
+
}
|
593
|
+
}
|
594
|
+
ContractedPriceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContractedPriceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
595
|
+
ContractedPriceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContractedPriceApiService });
|
596
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContractedPriceApiService, decorators: [{
|
492
597
|
type: Injectable
|
493
598
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
494
599
|
|
@@ -506,9 +611,9 @@ class DeltaApiService {
|
|
506
611
|
});
|
507
612
|
}
|
508
613
|
}
|
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.
|
614
|
+
DeltaApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeltaApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
615
|
+
DeltaApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeltaApiService });
|
616
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeltaApiService, decorators: [{
|
512
617
|
type: Injectable
|
513
618
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
514
619
|
|
@@ -568,9 +673,9 @@ class DocumentAttachmentApiService {
|
|
568
673
|
});
|
569
674
|
}
|
570
675
|
}
|
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.
|
676
|
+
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 });
|
677
|
+
DocumentAttachmentApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentAttachmentApiService });
|
678
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentAttachmentApiService, decorators: [{
|
574
679
|
type: Injectable
|
575
680
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i1.FileDownloadService }]; } });
|
576
681
|
|
@@ -612,7 +717,9 @@ class SalesforceApiService {
|
|
612
717
|
return this.httpService.api(Object.assign({ method: 'post', url: methodUrl, body: fields }, options));
|
613
718
|
}
|
614
719
|
apexGetRequest(path, params, options) {
|
615
|
-
|
720
|
+
// this line is needed because HttpParams instance from Integration behaves wrong in studio instance of Angular
|
721
|
+
const httpParams = new HttpParams({ fromString: params.toString() });
|
722
|
+
return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/apex${path}`, params: httpParams }, options));
|
616
723
|
}
|
617
724
|
apexPostRequest(path, body, options) {
|
618
725
|
return this.httpService.api(Object.assign({ method: 'post', body, url: `${this.SERVICE_URL}/apex${path}` }, options));
|
@@ -630,9 +737,9 @@ class SalesforceApiService {
|
|
630
737
|
});
|
631
738
|
}
|
632
739
|
}
|
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.
|
740
|
+
SalesforceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
741
|
+
SalesforceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService });
|
742
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, decorators: [{
|
636
743
|
type: Injectable
|
637
744
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
638
745
|
|
@@ -645,7 +752,7 @@ class DocumentTemplatesApiService {
|
|
645
752
|
this.http = http;
|
646
753
|
this.DOCGEN_TAG = 'docgen';
|
647
754
|
this.SERVICE_URL = '/templates';
|
648
|
-
this.DOC_GEN_URL_FALLBACK =
|
755
|
+
this.DOC_GEN_URL_FALLBACK = `${window.VELO_API}/docgen`;
|
649
756
|
this.mapSfQueryResult = (limit) => map((records) => {
|
650
757
|
if (!records.length) {
|
651
758
|
return { _result: 'No Records Found' };
|
@@ -884,11 +991,11 @@ class DocumentTemplatesApiService {
|
|
884
991
|
return forkJoin(attachmentIds.map(id => this.documentAttachmentService.getAttachmentFile(id, true)));
|
885
992
|
}
|
886
993
|
queryObject({ objectName, resultObjectName, fields, statement }, { properties }) {
|
887
|
-
var _a;
|
994
|
+
var _a, _b;
|
888
995
|
const patternLimit = /(\s*limit\s\d*)/i;
|
889
996
|
let limit = 1;
|
890
997
|
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();
|
998
|
+
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
999
|
if (limitStr) {
|
893
1000
|
limit = Number.parseInt(limitStr, 10);
|
894
1001
|
}
|
@@ -901,11 +1008,11 @@ class DocumentTemplatesApiService {
|
|
901
1008
|
return this.salesforceApiService.query(searchRequest, objectName).pipe(this.mapSfQueryResult(limit), map(value => ({ [resultObjectName]: value })));
|
902
1009
|
}
|
903
1010
|
}
|
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.
|
1011
|
+
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 });
|
1012
|
+
DocumentTemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentTemplatesApiService });
|
1013
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentTemplatesApiService, decorators: [{
|
907
1014
|
type: Injectable
|
908
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: SalesforceApiService }, { type: i1.FileDownloadService }, { type: DocumentAttachmentApiService }, { type:
|
1015
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: SalesforceApiService }, { type: i1.FileDownloadService }, { type: DocumentAttachmentApiService }, { type: i1$1.HttpClient }]; } });
|
909
1016
|
|
910
1017
|
class EndpointsApiService {
|
911
1018
|
constructor(baseHttpService) {
|
@@ -976,9 +1083,148 @@ class EndpointsApiService {
|
|
976
1083
|
});
|
977
1084
|
}
|
978
1085
|
}
|
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.
|
1086
|
+
EndpointsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1087
|
+
EndpointsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsApiService });
|
1088
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsApiService, decorators: [{
|
1089
|
+
type: Injectable
|
1090
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1091
|
+
|
1092
|
+
class FlowStateApiService {
|
1093
|
+
constructor(httpService) {
|
1094
|
+
this.httpService = httpService;
|
1095
|
+
this.SERVICE_URL = '/configuration/states';
|
1096
|
+
}
|
1097
|
+
/**
|
1098
|
+
* Initialize flow state
|
1099
|
+
* @param request Request
|
1100
|
+
* @returns Flow initialization response, which contains session ID and result of selectors
|
1101
|
+
*/
|
1102
|
+
init(request) {
|
1103
|
+
return this.httpService.api({
|
1104
|
+
method: 'post',
|
1105
|
+
url: `${this.SERVICE_URL}/quote/start`,
|
1106
|
+
body: request,
|
1107
|
+
});
|
1108
|
+
}
|
1109
|
+
/**
|
1110
|
+
* Get existing state by ID
|
1111
|
+
* @param id ID
|
1112
|
+
* @returns Flow State
|
1113
|
+
*/
|
1114
|
+
get(id) {
|
1115
|
+
return this.httpService.api({
|
1116
|
+
url: `${this.SERVICE_URL}/${id}`,
|
1117
|
+
});
|
1118
|
+
}
|
1119
|
+
/**
|
1120
|
+
* Execute actions/selectors
|
1121
|
+
* @param id State ID
|
1122
|
+
* @param request Request
|
1123
|
+
* @returns Execute result
|
1124
|
+
*/
|
1125
|
+
execute(id, request) {
|
1126
|
+
return this.httpService.api({
|
1127
|
+
method: 'post',
|
1128
|
+
url: `${this.SERVICE_URL}/quote/${id}/execute`,
|
1129
|
+
body: request,
|
1130
|
+
});
|
1131
|
+
}
|
1132
|
+
/**
|
1133
|
+
* Save Quote in the state
|
1134
|
+
* @param id State ID
|
1135
|
+
*/
|
1136
|
+
save(id) {
|
1137
|
+
return this.httpService.api({
|
1138
|
+
method: 'post',
|
1139
|
+
url: `${this.SERVICE_URL}/quote/${id}/save`,
|
1140
|
+
});
|
1141
|
+
}
|
1142
|
+
/**
|
1143
|
+
* Submit Quote in the state
|
1144
|
+
* @param id State ID
|
1145
|
+
*/
|
1146
|
+
submit(id) {
|
1147
|
+
return this.httpService.api({
|
1148
|
+
method: 'post',
|
1149
|
+
url: `${this.SERVICE_URL}/quote/${id}/submit`,
|
1150
|
+
});
|
1151
|
+
}
|
1152
|
+
/**
|
1153
|
+
* Close Flow state
|
1154
|
+
* @param id State ID
|
1155
|
+
*/
|
1156
|
+
cancel(id) {
|
1157
|
+
return this.httpService.api({
|
1158
|
+
method: 'post',
|
1159
|
+
url: `${this.SERVICE_URL}/quote/${id}/cancel`,
|
1160
|
+
});
|
1161
|
+
}
|
1162
|
+
/**
|
1163
|
+
* Initialize stateful configuration
|
1164
|
+
* @param stateId string
|
1165
|
+
* @param request Request
|
1166
|
+
* @returns Flow initialization response, which contains session ID and result of selectors
|
1167
|
+
*/
|
1168
|
+
newConfiguration(stateId, request) {
|
1169
|
+
return this.httpService.api({
|
1170
|
+
method: 'post',
|
1171
|
+
url: `${this.SERVICE_URL}/quote/${stateId}/configuration/new`,
|
1172
|
+
body: request,
|
1173
|
+
});
|
1174
|
+
}
|
1175
|
+
/**
|
1176
|
+
* Start stateful configuration
|
1177
|
+
* @param stateId string
|
1178
|
+
* @param request Request
|
1179
|
+
* @returns Flow initialization response, which contains session ID and result of selectors
|
1180
|
+
*/
|
1181
|
+
startConfiguration(stateId, request) {
|
1182
|
+
return this.httpService.api({
|
1183
|
+
method: 'post',
|
1184
|
+
url: `${this.SERVICE_URL}/quote/${stateId}/configuration/start`,
|
1185
|
+
body: request,
|
1186
|
+
});
|
1187
|
+
}
|
1188
|
+
/**
|
1189
|
+
* Execute stateful configuration
|
1190
|
+
* @param stateId string
|
1191
|
+
* @param configurationId string
|
1192
|
+
* @param request Request
|
1193
|
+
* @returns Flow initialization response, which contains session ID and result of selectors
|
1194
|
+
*/
|
1195
|
+
executeConfiguration(stateId, configurationId, request) {
|
1196
|
+
return this.httpService.api({
|
1197
|
+
method: 'post',
|
1198
|
+
url: `${this.SERVICE_URL}/quote/${stateId}/configuration/${configurationId}/execute`,
|
1199
|
+
body: request,
|
1200
|
+
});
|
1201
|
+
}
|
1202
|
+
/**
|
1203
|
+
* Save stateful configuration
|
1204
|
+
* @param stateId string
|
1205
|
+
* @param configurationId string
|
1206
|
+
*/
|
1207
|
+
saveConfiguration(stateId, configurationId) {
|
1208
|
+
return this.httpService.api({
|
1209
|
+
method: 'post',
|
1210
|
+
url: `${this.SERVICE_URL}/quote/${stateId}/configuration/${configurationId}/save`,
|
1211
|
+
});
|
1212
|
+
}
|
1213
|
+
/**
|
1214
|
+
* Cancel stateful configuration
|
1215
|
+
* @param stateId string
|
1216
|
+
* @param configurationId string
|
1217
|
+
*/
|
1218
|
+
cancelConfiguration(stateId, configurationId) {
|
1219
|
+
return this.httpService.api({
|
1220
|
+
method: 'post',
|
1221
|
+
url: `${this.SERVICE_URL}/quote/${stateId}/configuration/${configurationId}/cancel`,
|
1222
|
+
});
|
1223
|
+
}
|
1224
|
+
}
|
1225
|
+
FlowStateApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1226
|
+
FlowStateApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateApiService });
|
1227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateApiService, decorators: [{
|
982
1228
|
type: Injectable
|
983
1229
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
984
1230
|
|
@@ -988,17 +1234,20 @@ class FlowsApiService {
|
|
988
1234
|
this.flowsKey = 'flows';
|
989
1235
|
}
|
990
1236
|
getFlow(id) {
|
991
|
-
return this.fetchFlows().pipe(map(flows => flows.find(flow => flow.id == id))
|
1237
|
+
return this.fetchFlows().pipe(map(flows => flows.find(flow => flow.id == id)), map(flow => {
|
1238
|
+
if (!flow) {
|
1239
|
+
throw new Error(`Flow with flowId=${id} is not defined`);
|
1240
|
+
}
|
1241
|
+
return flow;
|
1242
|
+
}));
|
992
1243
|
}
|
993
1244
|
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) : [])));
|
1245
|
+
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
1246
|
}
|
998
1247
|
}
|
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.
|
1248
|
+
FlowsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1249
|
+
FlowsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService });
|
1250
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, decorators: [{
|
1002
1251
|
type: Injectable
|
1003
1252
|
}], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
|
1004
1253
|
|
@@ -1057,9 +1306,9 @@ class GuidedSellingsAdminApiService {
|
|
1057
1306
|
}
|
1058
1307
|
}
|
1059
1308
|
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.
|
1309
|
+
GuidedSellingsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1310
|
+
GuidedSellingsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingsAdminApiService });
|
1311
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingsAdminApiService, decorators: [{
|
1063
1312
|
type: Injectable
|
1064
1313
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1065
1314
|
|
@@ -1089,9 +1338,9 @@ class GuidedSellingApiService {
|
|
1089
1338
|
});
|
1090
1339
|
}
|
1091
1340
|
}
|
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.
|
1341
|
+
GuidedSellingApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1342
|
+
GuidedSellingApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingApiService });
|
1343
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingApiService, decorators: [{
|
1095
1344
|
type: Injectable
|
1096
1345
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1097
1346
|
|
@@ -1160,9 +1409,9 @@ class OffersApiService {
|
|
1160
1409
|
}
|
1161
1410
|
}
|
1162
1411
|
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.
|
1412
|
+
OffersApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OffersApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1413
|
+
OffersApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OffersApiService });
|
1414
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OffersApiService, decorators: [{
|
1166
1415
|
type: Injectable
|
1167
1416
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1168
1417
|
|
@@ -1177,11 +1426,11 @@ class OrgInfoApiService {
|
|
1177
1426
|
return this.http.get(`${this.hostUrl}/org-info/${organizationId}`);
|
1178
1427
|
}
|
1179
1428
|
}
|
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.
|
1429
|
+
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 });
|
1430
|
+
OrgInfoApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService });
|
1431
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService, decorators: [{
|
1183
1432
|
type: Injectable
|
1184
|
-
}], ctorParameters: function () { return [{ type:
|
1433
|
+
}], ctorParameters: function () { return [{ type: i1$1.HttpClient }]; } });
|
1185
1434
|
|
1186
1435
|
class PicklistsApiService {
|
1187
1436
|
constructor(baseHttpService) {
|
@@ -1212,9 +1461,78 @@ class PicklistsApiService {
|
|
1212
1461
|
};
|
1213
1462
|
}
|
1214
1463
|
}
|
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.
|
1464
|
+
PicklistsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1465
|
+
PicklistsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService });
|
1466
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService, decorators: [{
|
1467
|
+
type: Injectable
|
1468
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1469
|
+
|
1470
|
+
class PortalsApiService {
|
1471
|
+
constructor(baseHttpService) {
|
1472
|
+
this.baseHttpService = baseHttpService;
|
1473
|
+
this.serviceUrl = '/admin/portal';
|
1474
|
+
this.getPortals$ = (skip = 1, name = '') => {
|
1475
|
+
let params = new HttpParams();
|
1476
|
+
params = params.append('count', (PortalsApiService.MAX_RESULTS * skip).toString());
|
1477
|
+
params = params.append('skip', '0');
|
1478
|
+
params = params.append('name', name);
|
1479
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}`, params });
|
1480
|
+
};
|
1481
|
+
this.searchPortals$ = (skip = 0, expression) => {
|
1482
|
+
let params = new HttpParams();
|
1483
|
+
params = params.set('skip', '' + skip);
|
1484
|
+
params = params.set('count', '' + PortalsApiService.MAX_RESULTS);
|
1485
|
+
return this.baseHttpService.api({
|
1486
|
+
method: 'post',
|
1487
|
+
url: `${this.serviceUrl}/search`,
|
1488
|
+
params,
|
1489
|
+
body: expression || {},
|
1490
|
+
});
|
1491
|
+
};
|
1492
|
+
this.removePortal$ = (id) => {
|
1493
|
+
return this.baseHttpService.api({
|
1494
|
+
url: `${this.serviceUrl}/${id}`,
|
1495
|
+
method: 'delete',
|
1496
|
+
});
|
1497
|
+
};
|
1498
|
+
this.restore$ = (id) => {
|
1499
|
+
return this.baseHttpService.api({
|
1500
|
+
method: 'patch',
|
1501
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
1502
|
+
});
|
1503
|
+
};
|
1504
|
+
this.duplicatePortal$ = (cloneRequest) => {
|
1505
|
+
return this.baseHttpService.api({
|
1506
|
+
url: `${this.serviceUrl}/${cloneRequest.id}/clone`,
|
1507
|
+
method: 'post',
|
1508
|
+
body: cloneRequest,
|
1509
|
+
});
|
1510
|
+
};
|
1511
|
+
this.getPortal$ = (id) => {
|
1512
|
+
return this.baseHttpService.api({
|
1513
|
+
url: `${this.serviceUrl}/${id}`,
|
1514
|
+
});
|
1515
|
+
};
|
1516
|
+
}
|
1517
|
+
createNewPortal$(body) {
|
1518
|
+
return this.baseHttpService.api({
|
1519
|
+
url: `${this.serviceUrl}`,
|
1520
|
+
method: 'post',
|
1521
|
+
body,
|
1522
|
+
});
|
1523
|
+
}
|
1524
|
+
updatePortal$(portal, settings) {
|
1525
|
+
return this.baseHttpService.api({
|
1526
|
+
url: `${this.serviceUrl}/${portal.id}`,
|
1527
|
+
method: 'put',
|
1528
|
+
body: Object.assign(Object.assign({}, portal), { settings: JSON.stringify(settings) }),
|
1529
|
+
});
|
1530
|
+
}
|
1531
|
+
}
|
1532
|
+
PortalsApiService.MAX_RESULTS = 60;
|
1533
|
+
PortalsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PortalsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1534
|
+
PortalsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PortalsApiService });
|
1535
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PortalsApiService, decorators: [{
|
1218
1536
|
type: Injectable
|
1219
1537
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1220
1538
|
|
@@ -1272,9 +1590,9 @@ class PriceApiService {
|
|
1272
1590
|
});
|
1273
1591
|
}
|
1274
1592
|
}
|
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.
|
1593
|
+
PriceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PriceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1594
|
+
PriceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PriceApiService });
|
1595
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PriceApiService, decorators: [{
|
1278
1596
|
type: Injectable
|
1279
1597
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1280
1598
|
|
@@ -1366,9 +1684,9 @@ class ProceduresApiService {
|
|
1366
1684
|
});
|
1367
1685
|
}
|
1368
1686
|
}
|
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.
|
1687
|
+
ProceduresApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1688
|
+
ProceduresApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService });
|
1689
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService, decorators: [{
|
1372
1690
|
type: Injectable
|
1373
1691
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1374
1692
|
|
@@ -1514,9 +1832,9 @@ class ProductApiService {
|
|
1514
1832
|
return `${this.serviceUrl}/${productId}/image`;
|
1515
1833
|
}
|
1516
1834
|
}
|
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.
|
1835
|
+
ProductApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1836
|
+
ProductApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService });
|
1837
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService, decorators: [{
|
1520
1838
|
type: Injectable
|
1521
1839
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1522
1840
|
|
@@ -1745,47 +2063,110 @@ class ProductModelApiService {
|
|
1745
2063
|
}
|
1746
2064
|
}
|
1747
2065
|
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.
|
2066
|
+
ProductModelApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModelApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2067
|
+
ProductModelApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModelApiService });
|
2068
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModelApiService, decorators: [{
|
1751
2069
|
type: Injectable
|
1752
2070
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1753
2071
|
|
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
|
-
|
1778
|
-
|
1779
|
-
|
1780
|
-
|
1781
|
-
|
1782
|
-
|
1783
|
-
|
1784
|
-
|
1785
|
-
}
|
1786
|
-
|
1787
|
-
|
1788
|
-
|
2072
|
+
class PromotionsApiService {
|
2073
|
+
constructor(baseHttpService) {
|
2074
|
+
this.baseHttpService = baseHttpService;
|
2075
|
+
this.serviceUrl = '/admin/promotion';
|
2076
|
+
this.fetchAll$ = () => {
|
2077
|
+
return this.baseHttpService.api({ url: this.serviceUrl });
|
2078
|
+
};
|
2079
|
+
this.fetchOne$ = (id) => {
|
2080
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
2081
|
+
};
|
2082
|
+
this.remove$ = (id) => {
|
2083
|
+
return this.baseHttpService.api({
|
2084
|
+
url: `${this.serviceUrl}/${id}`,
|
2085
|
+
method: 'delete',
|
2086
|
+
});
|
2087
|
+
};
|
2088
|
+
this.restore$ = (id) => {
|
2089
|
+
return this.baseHttpService.api({
|
2090
|
+
method: 'patch',
|
2091
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
2092
|
+
});
|
2093
|
+
};
|
2094
|
+
this.duplicate$ = (body) => {
|
2095
|
+
return this.baseHttpService
|
2096
|
+
.api({
|
2097
|
+
url: `${this.serviceUrl}/${body.id}/clone`,
|
2098
|
+
method: 'post',
|
2099
|
+
body,
|
2100
|
+
})
|
2101
|
+
.pipe(map$1(response => response.clonedRecordId));
|
2102
|
+
};
|
2103
|
+
}
|
2104
|
+
search$(expression, skip, count) {
|
2105
|
+
let params = new HttpParams();
|
2106
|
+
if (typeof skip === 'number') {
|
2107
|
+
params = params.set('skip', '' + skip);
|
2108
|
+
}
|
2109
|
+
if (typeof count === 'number') {
|
2110
|
+
params = params.set('count', '' + count);
|
2111
|
+
}
|
2112
|
+
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2113
|
+
}
|
2114
|
+
create$(body) {
|
2115
|
+
return this.baseHttpService.api({
|
2116
|
+
url: `${this.serviceUrl}`,
|
2117
|
+
method: 'post',
|
2118
|
+
body,
|
2119
|
+
});
|
2120
|
+
}
|
2121
|
+
update$(body) {
|
2122
|
+
return this.baseHttpService.api({
|
2123
|
+
url: `${this.serviceUrl}/${body.id}`,
|
2124
|
+
method: 'put',
|
2125
|
+
body,
|
2126
|
+
});
|
2127
|
+
}
|
2128
|
+
}
|
2129
|
+
PromotionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2130
|
+
PromotionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService });
|
2131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService, decorators: [{
|
2132
|
+
type: Injectable
|
2133
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2134
|
+
|
2135
|
+
class QuoteApiService {
|
2136
|
+
constructor(httpService) {
|
2137
|
+
this.httpService = httpService;
|
2138
|
+
this.SERVICE_URL = '/quotes';
|
2139
|
+
}
|
2140
|
+
// request quoteId | accountId | opportunityId | orderId
|
2141
|
+
getQuoteDraft(objectId, params, errorHandler) {
|
2142
|
+
return this.httpService.api({
|
2143
|
+
method: 'get',
|
2144
|
+
url: `${this.SERVICE_URL}/${objectId}`,
|
2145
|
+
params,
|
2146
|
+
errorHandler,
|
2147
|
+
});
|
2148
|
+
}
|
2149
|
+
upsertQuote(request, options) {
|
2150
|
+
return this.httpService.api(Object.assign({ method: 'post', url: `${this.SERVICE_URL}`, body: request }, options));
|
2151
|
+
}
|
2152
|
+
submitQuote(request, options) {
|
2153
|
+
return this.httpService.api(Object.assign({ method: 'post', url: `${this.SERVICE_URL}/submit`, body: request }, options));
|
2154
|
+
}
|
2155
|
+
attachDocument(id, documentName, data) {
|
2156
|
+
const formData = new FormData();
|
2157
|
+
const blob = new Blob([data]);
|
2158
|
+
formData.append('file', blob, documentName);
|
2159
|
+
return this.httpService.upload({
|
2160
|
+
url: `${this.SERVICE_URL}/${id}/attach-document`,
|
2161
|
+
responseType: 'arraybuffer',
|
2162
|
+
method: 'post',
|
2163
|
+
body: formData,
|
2164
|
+
});
|
2165
|
+
}
|
2166
|
+
}
|
2167
|
+
QuoteApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2168
|
+
QuoteApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService });
|
2169
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService, decorators: [{
|
1789
2170
|
type: Injectable
|
1790
2171
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1791
2172
|
|
@@ -1801,9 +2182,135 @@ class RampApiService {
|
|
1801
2182
|
return this.httpService.api(Object.assign({ method: 'post', url: `${this.SERVICE_URL}/renew`, body: request }, options));
|
1802
2183
|
}
|
1803
2184
|
}
|
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.
|
2185
|
+
RampApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RampApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2186
|
+
RampApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RampApiService });
|
2187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RampApiService, decorators: [{
|
2188
|
+
type: Injectable
|
2189
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2190
|
+
|
2191
|
+
class RebateProgramApiService {
|
2192
|
+
constructor(baseHttpService) {
|
2193
|
+
this.baseHttpService = baseHttpService;
|
2194
|
+
this.serviceUrl = '/admin/rebate-program';
|
2195
|
+
this.fetchAll$ = () => {
|
2196
|
+
return this.baseHttpService.api({ url: this.serviceUrl });
|
2197
|
+
};
|
2198
|
+
this.fetchOne$ = (id) => {
|
2199
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
2200
|
+
};
|
2201
|
+
this.remove$ = (id) => {
|
2202
|
+
return this.baseHttpService.api({
|
2203
|
+
url: `${this.serviceUrl}/${id}`,
|
2204
|
+
method: 'delete',
|
2205
|
+
});
|
2206
|
+
};
|
2207
|
+
this.restore$ = (id) => {
|
2208
|
+
return this.baseHttpService.api({
|
2209
|
+
method: 'patch',
|
2210
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
2211
|
+
});
|
2212
|
+
};
|
2213
|
+
this.duplicate$ = (body) => {
|
2214
|
+
return this.baseHttpService
|
2215
|
+
.api({
|
2216
|
+
url: `${this.serviceUrl}/${body.id}/clone`,
|
2217
|
+
method: 'post',
|
2218
|
+
body,
|
2219
|
+
})
|
2220
|
+
.pipe(map$1(response => response.clonedRecordId));
|
2221
|
+
};
|
2222
|
+
}
|
2223
|
+
search$(expression, skip, count) {
|
2224
|
+
let params = new HttpParams();
|
2225
|
+
if (typeof skip === 'number') {
|
2226
|
+
params = params.set('skip', '' + skip);
|
2227
|
+
}
|
2228
|
+
if (typeof count === 'number') {
|
2229
|
+
params = params.set('count', '' + count);
|
2230
|
+
}
|
2231
|
+
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2232
|
+
}
|
2233
|
+
create$(body) {
|
2234
|
+
return this.baseHttpService.api({
|
2235
|
+
url: `${this.serviceUrl}`,
|
2236
|
+
method: 'post',
|
2237
|
+
body,
|
2238
|
+
});
|
2239
|
+
}
|
2240
|
+
update$(body) {
|
2241
|
+
return this.baseHttpService.api({
|
2242
|
+
url: `${this.serviceUrl}/${body.id}`,
|
2243
|
+
method: 'put',
|
2244
|
+
body,
|
2245
|
+
});
|
2246
|
+
}
|
2247
|
+
}
|
2248
|
+
RebateProgramApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2249
|
+
RebateProgramApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService });
|
2250
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, decorators: [{
|
2251
|
+
type: Injectable
|
2252
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2253
|
+
|
2254
|
+
class RebateTypeApiService {
|
2255
|
+
constructor(baseHttpService) {
|
2256
|
+
this.baseHttpService = baseHttpService;
|
2257
|
+
this.serviceUrl = '/admin/rebate-type';
|
2258
|
+
this.fetchAll$ = () => {
|
2259
|
+
return this.baseHttpService.api({ url: this.serviceUrl });
|
2260
|
+
};
|
2261
|
+
this.fetchOne$ = (id) => {
|
2262
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
2263
|
+
};
|
2264
|
+
this.remove$ = (id) => {
|
2265
|
+
return this.baseHttpService.api({
|
2266
|
+
url: `${this.serviceUrl}/${id}`,
|
2267
|
+
method: 'delete',
|
2268
|
+
});
|
2269
|
+
};
|
2270
|
+
this.restore$ = (id) => {
|
2271
|
+
return this.baseHttpService.api({
|
2272
|
+
method: 'patch',
|
2273
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
2274
|
+
});
|
2275
|
+
};
|
2276
|
+
this.duplicate$ = (body) => {
|
2277
|
+
return this.baseHttpService
|
2278
|
+
.api({
|
2279
|
+
url: `${this.serviceUrl}/${body.id}/clone`,
|
2280
|
+
method: 'post',
|
2281
|
+
body,
|
2282
|
+
})
|
2283
|
+
.pipe(map$1(response => response.clonedRecordId));
|
2284
|
+
};
|
2285
|
+
}
|
2286
|
+
search$(expression, skip, count) {
|
2287
|
+
let params = new HttpParams();
|
2288
|
+
if (typeof skip === 'number') {
|
2289
|
+
params = params.set('skip', '' + skip);
|
2290
|
+
}
|
2291
|
+
if (typeof count === 'number') {
|
2292
|
+
params = params.set('count', '' + count);
|
2293
|
+
}
|
2294
|
+
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2295
|
+
}
|
2296
|
+
create$(body) {
|
2297
|
+
return this.baseHttpService.api({
|
2298
|
+
url: `${this.serviceUrl}`,
|
2299
|
+
method: 'post',
|
2300
|
+
body,
|
2301
|
+
});
|
2302
|
+
}
|
2303
|
+
update$(body) {
|
2304
|
+
return this.baseHttpService.api({
|
2305
|
+
url: `${this.serviceUrl}/${body.id}`,
|
2306
|
+
method: 'put',
|
2307
|
+
body,
|
2308
|
+
});
|
2309
|
+
}
|
2310
|
+
}
|
2311
|
+
RebateTypeApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2312
|
+
RebateTypeApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService });
|
2313
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, decorators: [{
|
1807
2314
|
type: Injectable
|
1808
2315
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1809
2316
|
|
@@ -1857,9 +2364,9 @@ class RuleGroupsApiService {
|
|
1857
2364
|
};
|
1858
2365
|
}
|
1859
2366
|
}
|
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.
|
2367
|
+
RuleGroupsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2368
|
+
RuleGroupsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService });
|
2369
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService, decorators: [{
|
1863
2370
|
type: Injectable
|
1864
2371
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1865
2372
|
|
@@ -1929,17 +2436,26 @@ class RulesApiService {
|
|
1929
2436
|
});
|
1930
2437
|
}
|
1931
2438
|
execute$(body) {
|
1932
|
-
const url = body.rule.ruleGroupType
|
2439
|
+
const url = this.getExecuteRuleUrl(body.rule.ruleGroupType);
|
1933
2440
|
return this.baseHttpService.api({
|
1934
2441
|
url,
|
1935
2442
|
method: 'post',
|
1936
2443
|
body,
|
1937
2444
|
});
|
1938
2445
|
}
|
2446
|
+
getExecuteRuleUrl(ruleGroupType) {
|
2447
|
+
if (ruleGroupType === RuleGroupTypes.eligibility) {
|
2448
|
+
return '/rules/eligibility/execute';
|
2449
|
+
}
|
2450
|
+
if (ruleGroupType === RuleGroupTypes.catalog) {
|
2451
|
+
return '/rules/catalog/execute';
|
2452
|
+
}
|
2453
|
+
return '/rules/execute';
|
2454
|
+
}
|
1939
2455
|
}
|
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.
|
2456
|
+
RulesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2457
|
+
RulesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService });
|
2458
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService, decorators: [{
|
1943
2459
|
type: Injectable
|
1944
2460
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1945
2461
|
|
@@ -2013,9 +2529,9 @@ class ScriptsApiService {
|
|
2013
2529
|
};
|
2014
2530
|
}
|
2015
2531
|
}
|
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.
|
2532
|
+
ScriptsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2533
|
+
ScriptsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService });
|
2534
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService, decorators: [{
|
2019
2535
|
type: Injectable
|
2020
2536
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2021
2537
|
|
@@ -2036,9 +2552,9 @@ class ShoppingCartSettingsApiService {
|
|
2036
2552
|
}, {})));
|
2037
2553
|
}
|
2038
2554
|
}
|
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.
|
2555
|
+
ShoppingCartSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2556
|
+
ShoppingCartSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService });
|
2557
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService, decorators: [{
|
2042
2558
|
type: Injectable
|
2043
2559
|
}], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
|
2044
2560
|
|
@@ -2084,9 +2600,9 @@ class StatefulConfigurationApiService {
|
|
2084
2600
|
});
|
2085
2601
|
}
|
2086
2602
|
}
|
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.
|
2603
|
+
StatefulConfigurationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StatefulConfigurationApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2604
|
+
StatefulConfigurationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StatefulConfigurationApiService });
|
2605
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StatefulConfigurationApiService, decorators: [{
|
2090
2606
|
type: Injectable
|
2091
2607
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2092
2608
|
|
@@ -2150,9 +2666,9 @@ class UIDefinitionsApiService {
|
|
2150
2666
|
return `/models/${modelId}/uidefinitions`;
|
2151
2667
|
}
|
2152
2668
|
}
|
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.
|
2669
|
+
UIDefinitionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2670
|
+
UIDefinitionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService });
|
2671
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService, decorators: [{
|
2156
2672
|
type: Injectable
|
2157
2673
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2158
2674
|
|
@@ -2388,6 +2904,11 @@ class UITemplatesApiService {
|
|
2388
2904
|
this.fetchComponentAttachmentFile$(templateId, component.id, 'json'),
|
2389
2905
|
]).pipe(map$1(([html, js, css, json]) => ({ html, js, css, json })));
|
2390
2906
|
};
|
2907
|
+
this.fetchComponentsAttachments$ = (templateId) => {
|
2908
|
+
return this.fetchComponents$(templateId).pipe(switchMap$1(components => {
|
2909
|
+
return forkJoin(components.map(component => this.fetchComponentAttachments$(templateId, component)));
|
2910
|
+
}));
|
2911
|
+
};
|
2391
2912
|
this.fetchComponentAttachmentFile$ = (templateId, componentId, attachmentType) => {
|
2392
2913
|
return this.baseHttpService
|
2393
2914
|
.api({
|
@@ -2438,9 +2959,9 @@ class UITemplatesApiService {
|
|
2438
2959
|
});
|
2439
2960
|
}
|
2440
2961
|
}
|
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.
|
2962
|
+
UITemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2963
|
+
UITemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService });
|
2964
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService, decorators: [{
|
2444
2965
|
type: Injectable
|
2445
2966
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2446
2967
|
|
@@ -2476,6 +2997,15 @@ class VeloceObjectsApiService {
|
|
2476
2997
|
url: `${this.serviceUrl}/${id}`,
|
2477
2998
|
});
|
2478
2999
|
};
|
3000
|
+
this.duplicateObject$ = (body) => {
|
3001
|
+
return this.baseHttpService
|
3002
|
+
.api({
|
3003
|
+
method: 'post',
|
3004
|
+
url: `${this.serviceUrl}/${body.id}/clone`,
|
3005
|
+
body,
|
3006
|
+
})
|
3007
|
+
.pipe(map(response => response.clonedRecordId));
|
3008
|
+
};
|
2479
3009
|
this.restoreObject$ = (id) => {
|
2480
3010
|
return this.baseHttpService.api({
|
2481
3011
|
method: 'patch',
|
@@ -2514,206 +3044,17 @@ class VeloceObjectsApiService {
|
|
2514
3044
|
});
|
2515
3045
|
}
|
2516
3046
|
}
|
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: [{
|
2646
|
-
type: Injectable
|
2647
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2648
|
-
|
2649
|
-
class PromotionsApiService {
|
2650
|
-
constructor(baseHttpService) {
|
2651
|
-
this.baseHttpService = baseHttpService;
|
2652
|
-
this.serviceUrl = '/admin/promotion';
|
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 });
|
2690
|
-
}
|
2691
|
-
create$(body) {
|
2692
|
-
return this.baseHttpService.api({
|
2693
|
-
url: `${this.serviceUrl}`,
|
2694
|
-
method: 'post',
|
2695
|
-
body,
|
2696
|
-
});
|
2697
|
-
}
|
2698
|
-
update$(body) {
|
2699
|
-
return this.baseHttpService.api({
|
2700
|
-
url: `${this.serviceUrl}/${body.id}`,
|
2701
|
-
method: 'put',
|
2702
|
-
body,
|
2703
|
-
});
|
2704
|
-
}
|
2705
|
-
}
|
2706
|
-
PromotionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PromotionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2707
|
-
PromotionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PromotionsApiService });
|
2708
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PromotionsApiService, decorators: [{
|
3047
|
+
VeloceObjectsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
3048
|
+
VeloceObjectsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService });
|
3049
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService, decorators: [{
|
2709
3050
|
type: Injectable
|
2710
3051
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2711
3052
|
|
2712
3053
|
class ApiModule {
|
2713
3054
|
}
|
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.
|
3055
|
+
ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
3056
|
+
ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, imports: [HttpClientModule] });
|
3057
|
+
ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, providers: [
|
2717
3058
|
BaseHttpService,
|
2718
3059
|
XrayService,
|
2719
3060
|
ConfigurationApiService,
|
@@ -2750,8 +3091,13 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
|
2750
3091
|
RebateProgramApiService,
|
2751
3092
|
RebateTypeApiService,
|
2752
3093
|
PromotionsApiService,
|
3094
|
+
VeloceAuthService,
|
3095
|
+
ContractedPriceApiService,
|
3096
|
+
PortalsApiService,
|
3097
|
+
ConfigurationProcessorsApiService,
|
3098
|
+
FlowStateApiService,
|
2753
3099
|
], imports: [HttpClientModule] });
|
2754
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
3100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, decorators: [{
|
2755
3101
|
type: NgModule,
|
2756
3102
|
args: [{
|
2757
3103
|
imports: [HttpClientModule],
|
@@ -2792,6 +3138,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
2792
3138
|
RebateProgramApiService,
|
2793
3139
|
RebateTypeApiService,
|
2794
3140
|
PromotionsApiService,
|
3141
|
+
VeloceAuthService,
|
3142
|
+
ContractedPriceApiService,
|
3143
|
+
PortalsApiService,
|
3144
|
+
ConfigurationProcessorsApiService,
|
3145
|
+
FlowStateApiService,
|
2795
3146
|
],
|
2796
3147
|
}]
|
2797
3148
|
}] });
|
@@ -2800,5 +3151,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
2800
3151
|
* Generated bundle index. Do not edit.
|
2801
3152
|
*/
|
2802
3153
|
|
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 };
|
3154
|
+
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, ScriptsApiService, ShoppingCartSettingsApiService, StatefulConfigurationApiService, UIDefinitionsApiService, UITemplatesApiService, VeloceAuthService, VeloceObjectsApiService };
|
2804
3155
|
//# sourceMappingURL=veloceapps-api.mjs.map
|