@veloceapps/api 11.0.0-2 → 11.0.0-21
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2020/index.mjs +2 -45
- package/esm2020/src/index.mjs +32 -0
- package/esm2020/src/lib/api.module.mjs +108 -0
- package/esm2020/src/lib/services/account-api.service.mjs +87 -0
- package/esm2020/src/lib/services/auth.service.mjs +22 -0
- package/esm2020/src/lib/services/catalog-admin-api.service.mjs +192 -0
- package/esm2020/src/lib/services/catalog-api.service.mjs +90 -0
- package/esm2020/src/lib/services/configuration-settings-api.service.mjs +96 -0
- package/esm2020/src/lib/services/contracted-price-api.service.mjs +45 -0
- package/esm2020/src/lib/services/delta-api.service.mjs +23 -0
- package/esm2020/src/lib/services/document-attachment-api.service.mjs +66 -0
- package/esm2020/src/lib/services/endpoints-api.service.mjs +80 -0
- package/esm2020/src/lib/services/flow-state-api.mjs +142 -0
- package/esm2020/src/lib/services/flows-api.service.mjs +29 -0
- package/esm2020/src/lib/services/guided-sellings-admin-api.service.mjs +65 -0
- package/esm2020/src/lib/services/guided-sellings-api.service.mjs +37 -0
- package/esm2020/src/lib/services/offers-api.service.mjs +76 -0
- package/esm2020/src/lib/services/org-info-api.service.mjs +54 -0
- package/esm2020/src/lib/services/picklists-api.service.mjs +41 -0
- package/esm2020/src/lib/services/portals-api.service.mjs +76 -0
- package/esm2020/src/lib/services/price-api.service.mjs +63 -0
- package/esm2020/src/lib/services/product-api.service.mjs +153 -0
- package/esm2020/src/lib/services/promotions-api.service.mjs +68 -0
- package/esm2020/src/lib/services/ramp-api.service.mjs +31 -0
- package/esm2020/src/lib/services/rebate-program-api.service.mjs +68 -0
- package/esm2020/src/lib/services/rebate-type-api.service.mjs +68 -0
- package/esm2020/src/lib/services/salesforce-api.service.mjs +79 -0
- package/esm2020/src/lib/services/sandbox-manager-api.service.mjs +94 -0
- package/esm2020/src/lib/services/shopping-cart-settings-api.service.mjs +28 -0
- package/esm2020/src/lib/services/stateful-configuration-api.mjs +51 -0
- package/esm2020/src/lib/services/veloce-objects-api.service.mjs +90 -0
- package/esm2020/src/lib/types/attachment.types.mjs +2 -0
- package/esm2020/src/lib/types/auth.types.mjs +2 -0
- package/esm2020/src/lib/types/clone-request.types.mjs +2 -0
- package/esm2020/src/lib/types/delta-request.types.mjs +2 -0
- package/esm2020/src/lib/types/dto/configuration-settings-dto.types.mjs +22 -0
- package/esm2020/src/lib/types/dto/offers-dto.types.mjs +2 -0
- package/esm2020/src/lib/types/index.mjs +8 -0
- package/esm2020/src/lib/types/org-info.types.mjs +2 -0
- package/esm2020/src/lib/types/price.types.mjs +2 -0
- package/esm2020/src/lib/types/quote.types.mjs +2 -0
- package/esm2020/src/lib/types/ramp-request.types.mjs +2 -0
- package/esm2020/src/lib/types/search-request.types.mjs +2 -0
- package/esm2020/src/lib/types/stateful-configuration.types.mjs +2 -0
- package/esm2020/src/lib/utils/canvas.utils.mjs +33 -0
- package/esm2020/src/lib/utils/index.mjs +2 -0
- package/esm2020/v2/api-v2.module.mjs +48 -0
- package/esm2020/v2/index.mjs +4 -0
- package/esm2020/v2/services/configuration-processors-api.service.mjs +38 -0
- package/esm2020/v2/services/context-definition-api.service.mjs +62 -0
- package/esm2020/v2/services/index.mjs +13 -0
- package/esm2020/v2/services/procedures-admin-api.service.mjs +82 -0
- package/esm2020/v2/services/procedures-api.service.mjs +44 -0
- package/esm2020/v2/services/rule-groups-admin-api.service.mjs +62 -0
- package/esm2020/v2/services/rules-admin-api.service.mjs +95 -0
- package/esm2020/v2/services/rules-api.service.mjs +36 -0
- package/esm2020/v2/services/sales-transactions-api.service.mjs +52 -0
- package/esm2020/v2/services/scripts-admin-api.service.mjs +75 -0
- package/esm2020/v2/services/scripts-api.service.mjs +23 -0
- package/esm2020/v2/services/ui-definitions-api.service.mjs +66 -0
- package/esm2020/{lib → v2}/services/ui-templates-api.service.mjs +2 -2
- package/esm2020/v2/types/clone-request.types.mjs +2 -0
- package/esm2020/v2/types/dto/ui-definition-dto.types.mjs +2 -0
- package/esm2020/v2/types/dto/ui-template-dto.types.mjs +2 -0
- package/esm2020/v2/types/index.mjs +4 -0
- package/esm2020/v2/types/procedure.types.mjs +2 -0
- package/esm2020/v2/types/sales-transaction.types.mjs +2 -0
- package/esm2020/v2/utils/ui-definition.utils.mjs +23 -0
- package/esm2020/v2/utils/ui-template.utils.mjs +13 -0
- package/esm2020/v2/veloceapps-api-v2.mjs +5 -0
- package/esm2020/veloceapps-api.mjs +1 -1
- package/fesm2015/veloceapps-api-v2.mjs +940 -0
- package/fesm2015/veloceapps-api-v2.mjs.map +1 -0
- package/fesm2015/veloceapps-api.mjs +14 -1217
- package/fesm2015/veloceapps-api.mjs.map +1 -1
- package/fesm2020/veloceapps-api-v2.mjs +956 -0
- package/fesm2020/veloceapps-api-v2.mjs.map +1 -0
- package/fesm2020/veloceapps-api.mjs +11 -1246
- package/fesm2020/veloceapps-api.mjs.map +1 -1
- package/index.d.ts +1 -44
- package/package.json +9 -1
- package/src/index.d.ts +31 -0
- package/{lib → src/lib}/api.module.d.ts +2 -1
- package/{lib → src/lib}/services/catalog-api.service.d.ts +5 -5
- package/src/lib/types/price.types.d.ts +5 -0
- package/{lib → src/lib}/types/ramp-request.types.d.ts +3 -3
- package/{lib → src/lib}/types/stateful-configuration.types.d.ts +1 -2
- package/src/lib/utils/index.d.ts +1 -0
- package/v2/api-v2.module.d.ts +7 -0
- package/v2/index.d.ts +3 -0
- package/{lib/services/rlm-api.service.d.ts → v2/services/context-definition-api.service.d.ts} +3 -3
- package/v2/services/index.d.ts +12 -0
- package/{lib/services/procedures-api.service.d.ts → v2/services/procedures-admin-api.service.d.ts} +6 -13
- package/v2/services/procedures-api.service.d.ts +15 -0
- package/{lib/services/rule-groups-api.service.d.ts → v2/services/rule-groups-admin-api.service.d.ts} +3 -3
- package/{lib/services/rules-api.service.d.ts → v2/services/rules-admin-api.service.d.ts} +4 -4
- package/v2/services/rules-api.service.d.ts +11 -0
- package/v2/services/sales-transactions-api.service.d.ts +20 -0
- package/{lib/services/scripts-api.service.d.ts → v2/services/scripts-admin-api.service.d.ts} +4 -5
- package/v2/services/scripts-api.service.d.ts +11 -0
- package/{lib → v2}/services/ui-definitions-api.service.d.ts +8 -5
- package/v2/types/clone-request.types.d.ts +5 -0
- package/v2/types/dto/ui-definition-dto.types.d.ts +7 -0
- package/v2/types/index.d.ts +3 -0
- package/v2/types/procedure.types.d.ts +10 -0
- package/v2/types/sales-transaction.types.d.ts +14 -0
- package/v2/utils/ui-definition.utils.d.ts +5 -0
- package/esm2020/lib/api.module.mjs +0 -146
- package/esm2020/lib/services/account-api.service.mjs +0 -87
- package/esm2020/lib/services/auth.service.mjs +0 -22
- package/esm2020/lib/services/catalog-admin-api.service.mjs +0 -192
- package/esm2020/lib/services/catalog-api.service.mjs +0 -90
- package/esm2020/lib/services/configuration-api.service.mjs +0 -109
- package/esm2020/lib/services/configuration-processors-api.service.mjs +0 -38
- package/esm2020/lib/services/configuration-settings-api.service.mjs +0 -96
- package/esm2020/lib/services/context-api.service.mjs +0 -26
- package/esm2020/lib/services/contracted-price-api.service.mjs +0 -45
- package/esm2020/lib/services/delta-api.service.mjs +0 -23
- package/esm2020/lib/services/document-attachment-api.service.mjs +0 -66
- package/esm2020/lib/services/endpoints-api.service.mjs +0 -80
- package/esm2020/lib/services/flow-state-api.mjs +0 -142
- package/esm2020/lib/services/flows-api.service.mjs +0 -29
- package/esm2020/lib/services/guided-sellings-admin-api.service.mjs +0 -65
- package/esm2020/lib/services/guided-sellings-api.service.mjs +0 -37
- package/esm2020/lib/services/offers-api.service.mjs +0 -76
- package/esm2020/lib/services/org-info-api.service.mjs +0 -54
- package/esm2020/lib/services/picklists-api.service.mjs +0 -41
- package/esm2020/lib/services/portals-api.service.mjs +0 -76
- package/esm2020/lib/services/price-api.service.mjs +0 -63
- package/esm2020/lib/services/procedures-api.service.mjs +0 -113
- package/esm2020/lib/services/product-api.service.mjs +0 -153
- package/esm2020/lib/services/product-model-api.service.mjs +0 -223
- package/esm2020/lib/services/promotions-api.service.mjs +0 -68
- package/esm2020/lib/services/quote-api.service.mjs +0 -56
- package/esm2020/lib/services/ramp-api.service.mjs +0 -31
- package/esm2020/lib/services/rebate-program-api.service.mjs +0 -68
- package/esm2020/lib/services/rebate-type-api.service.mjs +0 -68
- package/esm2020/lib/services/rlm-api.service.mjs +0 -65
- package/esm2020/lib/services/rlm-quote-api.service.mjs +0 -27
- package/esm2020/lib/services/rule-groups-api.service.mjs +0 -62
- package/esm2020/lib/services/rules-api.service.mjs +0 -98
- package/esm2020/lib/services/salesforce-api.service.mjs +0 -79
- package/esm2020/lib/services/sandbox-manager-api.service.mjs +0 -94
- package/esm2020/lib/services/scripts-api.service.mjs +0 -83
- package/esm2020/lib/services/shopping-cart-settings-api.service.mjs +0 -28
- package/esm2020/lib/services/stateful-configuration-api.mjs +0 -51
- package/esm2020/lib/services/ui-definitions-api.service.mjs +0 -76
- package/esm2020/lib/services/veloce-objects-api.service.mjs +0 -90
- package/esm2020/lib/types/attachment.types.mjs +0 -2
- package/esm2020/lib/types/auth.types.mjs +0 -2
- package/esm2020/lib/types/clone-request.types.mjs +0 -2
- package/esm2020/lib/types/delta-request.types.mjs +0 -2
- package/esm2020/lib/types/dto/configuration-settings-dto.types.mjs +0 -22
- package/esm2020/lib/types/dto/offers-dto.types.mjs +0 -2
- package/esm2020/lib/types/dto/ui-template-dto.types.mjs +0 -2
- package/esm2020/lib/types/index.mjs +0 -8
- package/esm2020/lib/types/org-info.types.mjs +0 -2
- package/esm2020/lib/types/price.types.mjs +0 -2
- package/esm2020/lib/types/quote.types.mjs +0 -2
- package/esm2020/lib/types/ramp-request.types.mjs +0 -2
- package/esm2020/lib/types/search-request.types.mjs +0 -2
- package/esm2020/lib/types/stateful-configuration.types.mjs +0 -2
- package/esm2020/lib/utils/canvas.utils.mjs +0 -33
- package/esm2020/lib/utils/index.mjs +0 -3
- package/esm2020/lib/utils/ui-template.utils.mjs +0 -13
- package/lib/services/configuration-api.service.d.ts +0 -23
- package/lib/services/context-api.service.d.ts +0 -11
- package/lib/services/product-model-api.service.d.ts +0 -29
- package/lib/services/quote-api.service.d.ts +0 -22
- package/lib/services/rlm-quote-api.service.d.ts +0 -11
- package/lib/types/price.types.d.ts +0 -5
- package/lib/utils/index.d.ts +0 -2
- /package/{lib → src/lib}/services/account-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/auth.service.d.ts +0 -0
- /package/{lib → src/lib}/services/catalog-admin-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/configuration-settings-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/contracted-price-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/delta-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/document-attachment-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/endpoints-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/flow-state-api.d.ts +0 -0
- /package/{lib → src/lib}/services/flows-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/guided-sellings-admin-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/guided-sellings-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/offers-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/org-info-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/picklists-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/portals-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/price-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/product-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/promotions-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/ramp-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/rebate-program-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/rebate-type-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/salesforce-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/sandbox-manager-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/shopping-cart-settings-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/stateful-configuration-api.d.ts +0 -0
- /package/{lib → src/lib}/services/veloce-objects-api.service.d.ts +0 -0
- /package/{lib → src/lib}/types/attachment.types.d.ts +0 -0
- /package/{lib → src/lib}/types/auth.types.d.ts +0 -0
- /package/{lib → src/lib}/types/clone-request.types.d.ts +0 -0
- /package/{lib → src/lib}/types/delta-request.types.d.ts +0 -0
- /package/{lib → src/lib}/types/dto/configuration-settings-dto.types.d.ts +0 -0
- /package/{lib → src/lib}/types/dto/offers-dto.types.d.ts +0 -0
- /package/{lib → src/lib}/types/index.d.ts +0 -0
- /package/{lib → src/lib}/types/org-info.types.d.ts +0 -0
- /package/{lib → src/lib}/types/quote.types.d.ts +0 -0
- /package/{lib → src/lib}/types/search-request.types.d.ts +0 -0
- /package/{lib → src/lib}/utils/canvas.utils.d.ts +0 -0
- /package/{lib → v2}/services/configuration-processors-api.service.d.ts +0 -0
- /package/{lib → v2}/services/ui-templates-api.service.d.ts +0 -0
- /package/{lib → v2}/types/dto/ui-template-dto.types.d.ts +0 -0
- /package/{lib → v2}/utils/ui-template.utils.d.ts +0 -0
@@ -2,13 +2,13 @@ import * as i1$1 from '@angular/common/http';
|
|
2
2
|
import { HttpParams, HttpHeaders, HttpErrorResponse, HttpClientModule } from '@angular/common/http';
|
3
3
|
import * as i0 from '@angular/core';
|
4
4
|
import { Injectable, NgModule } from '@angular/core';
|
5
|
+
import { ApiV2Module } from '@veloceapps/api/v2';
|
5
6
|
import * as i1 from '@veloceapps/core';
|
6
|
-
import {
|
7
|
-
import { noop,
|
7
|
+
import { Expression, Operator, isApexError, isCanvasError, parseJsonSafely, BaseHttpService, XrayService } from '@veloceapps/core';
|
8
|
+
import { noop, of, map as map$1, from, catchError as catchError$1 } from 'rxjs';
|
8
9
|
import { map, catchError, tap } from 'rxjs/operators';
|
9
10
|
import * as i1$2 from 'primeng/api';
|
10
|
-
import { isArray
|
11
|
-
import { __rest } from 'tslib';
|
11
|
+
import { isArray } from 'lodash';
|
12
12
|
|
13
13
|
class AccountApiService {
|
14
14
|
constructor(httpService) {
|
@@ -350,132 +350,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
350
350
|
type: Injectable
|
351
351
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
352
352
|
|
353
|
-
class ConfigurationApiService {
|
354
|
-
constructor(httpService) {
|
355
|
-
this.httpService = httpService;
|
356
|
-
this.SERVICE_URL = '/configuration';
|
357
|
-
}
|
358
|
-
configureLineItem({ configurationRequest, runtimeModel, pricingEnabled, }) {
|
359
|
-
return this.httpService
|
360
|
-
.api({
|
361
|
-
method: 'post',
|
362
|
-
url: `${this.SERVICE_URL}${pricingEnabled ? '/price' : ''}`,
|
363
|
-
body: configurationRequest,
|
364
|
-
errorHandler: e => throwError(e),
|
365
|
-
})
|
366
|
-
.pipe(map(configurePrice => {
|
367
|
-
if (runtimeModel) {
|
368
|
-
return Object.assign(Object.assign({}, configurePrice), { lineItem: this.updateDomains(configurePrice.lineItem, runtimeModel) });
|
369
|
-
}
|
370
|
-
else {
|
371
|
-
return configurePrice;
|
372
|
-
}
|
373
|
-
}));
|
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.updateDomains(configurePrice.lineItem, runtimeModel) });
|
386
|
-
}
|
387
|
-
else {
|
388
|
-
return configurePrice;
|
389
|
-
}
|
390
|
-
}));
|
391
|
-
}
|
392
|
-
getRuntimeDataByProductId(productId, offeringId) {
|
393
|
-
return this.httpService
|
394
|
-
.api({
|
395
|
-
method: 'get',
|
396
|
-
url: `${this.SERVICE_URL}/${productId}/model` + ((offeringId && `/${offeringId}`) || ''),
|
397
|
-
})
|
398
|
-
.pipe(map(runtimeData => {
|
399
|
-
return Object.assign(Object.assign({}, runtimeData), { uiDefinitions: runtimeData.uiDefinitions.map(dto => uiDefinitionFromDTO(dto)) });
|
400
|
-
}));
|
401
|
-
}
|
402
|
-
getRuntimeDataByModelId(modelId) {
|
403
|
-
return this.httpService.api({
|
404
|
-
method: 'get',
|
405
|
-
url: `${this.SERVICE_URL}/${modelId}/model-test`,
|
406
|
-
});
|
407
|
-
}
|
408
|
-
updateDomains(lineItem, runtimeModel) {
|
409
|
-
var _a, _b, _c;
|
410
|
-
const component = runtimeModel.components.get(lineItem.type);
|
411
|
-
const portDomains = Object.assign({}, lineItem.portDomains);
|
412
|
-
// loop through ports to look for 'None' type domain computations
|
413
|
-
for (const port of (_a = component === null || component === void 0 ? void 0 : component.ports) !== null && _a !== void 0 ? _a : []) {
|
414
|
-
const portDomain = portDomains[port.name];
|
415
|
-
if (((_b = portDomain === null || portDomain === void 0 ? void 0 : portDomain.properties) === null || _b === void 0 ? void 0 : _b['domainComputation']) === DomainComputation.NONE) {
|
416
|
-
portDomain.domainTypes = port.domainTypes;
|
417
|
-
}
|
418
|
-
}
|
419
|
-
const type = runtimeModel.types.find(({ name }) => {
|
420
|
-
return lineItem.type === name;
|
421
|
-
});
|
422
|
-
const attributeDomains = lineItem.attributeDomains;
|
423
|
-
if (type) {
|
424
|
-
const initialDomains = lineItem.attributeDomains;
|
425
|
-
type.attributes.forEach(attribute => {
|
426
|
-
if (Object.prototype.hasOwnProperty.call(initialDomains, attribute.name)) {
|
427
|
-
return;
|
428
|
-
}
|
429
|
-
if (attribute.attributeDomain) {
|
430
|
-
attributeDomains[attribute.name] = attribute.attributeDomain;
|
431
|
-
}
|
432
|
-
});
|
433
|
-
}
|
434
|
-
return Object.assign(Object.assign({}, lineItem), { lineItems: (_c = lineItem.lineItems) === null || _c === void 0 ? void 0 : _c.map(i => this.updateDomains(i, runtimeModel)), attributeDomains,
|
435
|
-
portDomains });
|
436
|
-
}
|
437
|
-
}
|
438
|
-
ConfigurationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
439
|
-
ConfigurationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationApiService });
|
440
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationApiService, decorators: [{
|
441
|
-
type: Injectable
|
442
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
443
|
-
|
444
|
-
class ConfigurationProcessorsApiService {
|
445
|
-
constructor(baseHttpService) {
|
446
|
-
this.baseHttpService = baseHttpService;
|
447
|
-
this.serviceUrl = '/configuration/processors/owners';
|
448
|
-
this.fetchConfigurationProcessors$ = (ownerId) => {
|
449
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/${ownerId}` });
|
450
|
-
};
|
451
|
-
this.createConfigurationProcessors$ = (configurationProcessor) => {
|
452
|
-
return this.baseHttpService.api({
|
453
|
-
method: 'post',
|
454
|
-
url: `${this.serviceUrl}/${configurationProcessor.ownerId}`,
|
455
|
-
body: configurationProcessor,
|
456
|
-
});
|
457
|
-
};
|
458
|
-
this.updateConfigurationProcessors$ = (configurationProcessor) => {
|
459
|
-
return this.baseHttpService.api({
|
460
|
-
method: 'put',
|
461
|
-
url: `${this.serviceUrl}/${configurationProcessor.ownerId}/${configurationProcessor.id}`,
|
462
|
-
body: configurationProcessor,
|
463
|
-
});
|
464
|
-
};
|
465
|
-
this.deleteConfigurationProcessors$ = (configurationProcessor) => {
|
466
|
-
return this.baseHttpService.api({
|
467
|
-
method: 'delete',
|
468
|
-
url: `${this.serviceUrl}/${configurationProcessor.ownerId}/${configurationProcessor.id}`,
|
469
|
-
});
|
470
|
-
};
|
471
|
-
}
|
472
|
-
}
|
473
|
-
ConfigurationProcessorsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
474
|
-
ConfigurationProcessorsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService });
|
475
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService, decorators: [{
|
476
|
-
type: Injectable
|
477
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
478
|
-
|
479
353
|
class ConfigurationSettingsDTO {
|
480
354
|
static fromDTO(dto, key) {
|
481
355
|
return {
|
@@ -551,28 +425,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
551
425
|
type: Injectable
|
552
426
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i1$2.MessageService }]; } });
|
553
427
|
|
554
|
-
class ContextApiService {
|
555
|
-
constructor(httpService) {
|
556
|
-
this.httpService = httpService;
|
557
|
-
this.SERVICE_URL = '/context';
|
558
|
-
}
|
559
|
-
getContext(headerId, mode) {
|
560
|
-
return this.httpService.api({
|
561
|
-
method: 'post',
|
562
|
-
body: {
|
563
|
-
headerId: headerId,
|
564
|
-
contextMode: ConfigurationContextMode[mode],
|
565
|
-
},
|
566
|
-
url: `${this.SERVICE_URL}`,
|
567
|
-
});
|
568
|
-
}
|
569
|
-
}
|
570
|
-
ContextApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
571
|
-
ContextApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextApiService });
|
572
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextApiService, decorators: [{
|
573
|
-
type: Injectable
|
574
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
575
|
-
|
576
428
|
class ContractedPriceApiService {
|
577
429
|
constructor(baseHttpService) {
|
578
430
|
this.baseHttpService = baseHttpService;
|
@@ -1343,113 +1195,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1343
1195
|
type: Injectable
|
1344
1196
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1345
1197
|
|
1346
|
-
class ProceduresApiService {
|
1347
|
-
constructor(baseHttpService) {
|
1348
|
-
this.baseHttpService = baseHttpService;
|
1349
|
-
this.ADMIN_SERVICE_URL = '/admin/procedures';
|
1350
|
-
this.SERVICE_URL = '/procedures';
|
1351
|
-
this.fetchProcedures$ = () => {
|
1352
|
-
return this.searchProcedures$(new Expression(), 0, 100);
|
1353
|
-
};
|
1354
|
-
this.searchProcedures$ = (expression, skip, count) => {
|
1355
|
-
let params = new HttpParams();
|
1356
|
-
params = params.set('skip', '' + skip);
|
1357
|
-
params = params.set('count', '' + count);
|
1358
|
-
return this.baseHttpService.api({
|
1359
|
-
method: 'post',
|
1360
|
-
url: `${this.ADMIN_SERVICE_URL}/search`,
|
1361
|
-
params,
|
1362
|
-
body: expression,
|
1363
|
-
});
|
1364
|
-
};
|
1365
|
-
this.createProcedure$ = (newProcedure) => {
|
1366
|
-
return this.baseHttpService.api({
|
1367
|
-
url: `${this.ADMIN_SERVICE_URL}`,
|
1368
|
-
method: 'post',
|
1369
|
-
body: newProcedure,
|
1370
|
-
});
|
1371
|
-
};
|
1372
|
-
this.updateProcedure$ = (procedure) => {
|
1373
|
-
return this.baseHttpService.api({
|
1374
|
-
url: `${this.ADMIN_SERVICE_URL}/${procedure.id}`,
|
1375
|
-
method: 'put',
|
1376
|
-
body: procedure,
|
1377
|
-
});
|
1378
|
-
};
|
1379
|
-
this.duplicateProcedure$ = (body) => {
|
1380
|
-
return this.baseHttpService
|
1381
|
-
.api({
|
1382
|
-
url: `${this.ADMIN_SERVICE_URL}/${body.id}/clone`,
|
1383
|
-
method: 'post',
|
1384
|
-
body,
|
1385
|
-
})
|
1386
|
-
.pipe(map(response => response.clonedRecordId));
|
1387
|
-
};
|
1388
|
-
this.removeProcedure$ = (id) => {
|
1389
|
-
return this.baseHttpService.api({
|
1390
|
-
url: `${this.ADMIN_SERVICE_URL}/${id}`,
|
1391
|
-
method: 'delete',
|
1392
|
-
});
|
1393
|
-
};
|
1394
|
-
this.restoreProcedure$ = (id) => {
|
1395
|
-
return this.baseHttpService.api({
|
1396
|
-
url: `${this.ADMIN_SERVICE_URL}/${id}/restore`,
|
1397
|
-
method: 'patch',
|
1398
|
-
});
|
1399
|
-
};
|
1400
|
-
}
|
1401
|
-
fetchProcedure$(id) {
|
1402
|
-
return this.baseHttpService.api({
|
1403
|
-
url: `${this.ADMIN_SERVICE_URL}/${id}`,
|
1404
|
-
method: 'get',
|
1405
|
-
});
|
1406
|
-
}
|
1407
|
-
execute$(body) {
|
1408
|
-
return this.baseHttpService.api({
|
1409
|
-
url: `${this.SERVICE_URL}/execute`,
|
1410
|
-
method: 'post',
|
1411
|
-
body,
|
1412
|
-
});
|
1413
|
-
}
|
1414
|
-
catalogExecute$(body) {
|
1415
|
-
return this.baseHttpService.api({
|
1416
|
-
url: `${this.SERVICE_URL}/catalog/execute`,
|
1417
|
-
method: 'post',
|
1418
|
-
body,
|
1419
|
-
});
|
1420
|
-
}
|
1421
|
-
rlmExecute$(body) {
|
1422
|
-
return this.baseHttpService.api({
|
1423
|
-
url: `${this.SERVICE_URL}/rlm/execute`,
|
1424
|
-
method: 'post',
|
1425
|
-
body,
|
1426
|
-
});
|
1427
|
-
}
|
1428
|
-
/**
|
1429
|
-
* Run active procedure against QuoteDraft
|
1430
|
-
* @param body
|
1431
|
-
* @returns
|
1432
|
-
*/
|
1433
|
-
apply$(body) {
|
1434
|
-
return this.baseHttpService.api({
|
1435
|
-
url: `${this.SERVICE_URL}/apply`,
|
1436
|
-
method: 'post',
|
1437
|
-
body,
|
1438
|
-
});
|
1439
|
-
}
|
1440
|
-
fetchDefaultPricingSteps$() {
|
1441
|
-
return this.baseHttpService.api({
|
1442
|
-
url: `${this.ADMIN_SERVICE_URL}/pricing-steps`,
|
1443
|
-
method: 'get',
|
1444
|
-
});
|
1445
|
-
}
|
1446
|
-
}
|
1447
|
-
ProceduresApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1448
|
-
ProceduresApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService });
|
1449
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService, decorators: [{
|
1450
|
-
type: Injectable
|
1451
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1452
|
-
|
1453
1198
|
class ProductApiService {
|
1454
1199
|
constructor(baseHttpService) {
|
1455
1200
|
this.baseHttpService = baseHttpService;
|
@@ -1598,224 +1343,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1598
1343
|
type: Injectable
|
1599
1344
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1600
1345
|
|
1601
|
-
class ProductModelApiService {
|
1602
|
-
constructor(httpService) {
|
1603
|
-
this.httpService = httpService;
|
1604
|
-
this.SERVICE_URL = '/models';
|
1605
|
-
}
|
1606
|
-
addModel(model) {
|
1607
|
-
return this.httpService
|
1608
|
-
.api({
|
1609
|
-
method: 'post',
|
1610
|
-
url: this.SERVICE_URL,
|
1611
|
-
body: model,
|
1612
|
-
errorHandler: this.httpService.handleValidationError,
|
1613
|
-
})
|
1614
|
-
.pipe(map(result => {
|
1615
|
-
if (result.successful) {
|
1616
|
-
return result;
|
1617
|
-
}
|
1618
|
-
else {
|
1619
|
-
throw new Error(result.message);
|
1620
|
-
}
|
1621
|
-
}));
|
1622
|
-
}
|
1623
|
-
releaseModel(model) {
|
1624
|
-
return this.httpService
|
1625
|
-
.api({
|
1626
|
-
method: 'put',
|
1627
|
-
url: `${this.SERVICE_URL}/${model.id}/release`,
|
1628
|
-
body: model,
|
1629
|
-
errorHandler: this.httpService.handleValidationError,
|
1630
|
-
})
|
1631
|
-
.pipe(map(result => {
|
1632
|
-
if (result.successful) {
|
1633
|
-
return '';
|
1634
|
-
}
|
1635
|
-
else {
|
1636
|
-
throw new Error(result.message);
|
1637
|
-
}
|
1638
|
-
}));
|
1639
|
-
}
|
1640
|
-
removeModel(modelId, successFn, failureFn) {
|
1641
|
-
const observable = this.httpService
|
1642
|
-
.api({
|
1643
|
-
method: 'delete',
|
1644
|
-
url: `${this.SERVICE_URL}/${modelId}`,
|
1645
|
-
errorHandler: this.httpService.handleValidationError,
|
1646
|
-
})
|
1647
|
-
.pipe(map(result => {
|
1648
|
-
if (result.successful) {
|
1649
|
-
return '';
|
1650
|
-
}
|
1651
|
-
else {
|
1652
|
-
throw new Error(result.message);
|
1653
|
-
}
|
1654
|
-
}));
|
1655
|
-
observable.subscribe(() => {
|
1656
|
-
successFn && successFn.apply();
|
1657
|
-
}, () => {
|
1658
|
-
failureFn && failureFn.apply();
|
1659
|
-
});
|
1660
|
-
}
|
1661
|
-
getModelVersions(modelId, count = 100, skip = 0) {
|
1662
|
-
return this.httpService.api({
|
1663
|
-
method: 'post',
|
1664
|
-
url: `${this.SERVICE_URL}/${modelId}/versions`,
|
1665
|
-
body: {
|
1666
|
-
skipCount: skip,
|
1667
|
-
count: count,
|
1668
|
-
},
|
1669
|
-
});
|
1670
|
-
}
|
1671
|
-
getModel(id, version) {
|
1672
|
-
let url = `${this.SERVICE_URL}/${id}`;
|
1673
|
-
if (version) {
|
1674
|
-
url += `/versions/${version}`;
|
1675
|
-
}
|
1676
|
-
return this.httpService.api({ url });
|
1677
|
-
}
|
1678
|
-
getModels(skipCount, searchText) {
|
1679
|
-
return this.httpService.api({
|
1680
|
-
method: 'post',
|
1681
|
-
url: `${this.SERVICE_URL}/search`,
|
1682
|
-
body: {
|
1683
|
-
nameRegex: searchText,
|
1684
|
-
skipCount: skipCount.toString(),
|
1685
|
-
count: ProductModelApiService.MAX_RESULTS,
|
1686
|
-
},
|
1687
|
-
});
|
1688
|
-
}
|
1689
|
-
getLinkedModels(id, version) {
|
1690
|
-
let url = `${this.SERVICE_URL}/${id}`;
|
1691
|
-
if (version) {
|
1692
|
-
url += `/versions/${version}`;
|
1693
|
-
}
|
1694
|
-
url += '/linked';
|
1695
|
-
return this.httpService.api({ url }).pipe(map((linkedModels) => {
|
1696
|
-
if (linkedModels) {
|
1697
|
-
linkedModels.forEach(model => ModelTranslatorUtils.toLocalModel(model));
|
1698
|
-
}
|
1699
|
-
return linkedModels;
|
1700
|
-
}));
|
1701
|
-
}
|
1702
|
-
getPML(modelId, version) {
|
1703
|
-
let url = `${this.SERVICE_URL}/${modelId}/pml/${version}`;
|
1704
|
-
if (version) {
|
1705
|
-
url += `/versions/${version}`;
|
1706
|
-
}
|
1707
|
-
return this.httpService.api({
|
1708
|
-
url,
|
1709
|
-
responseType: 'text',
|
1710
|
-
});
|
1711
|
-
}
|
1712
|
-
savePML(modelId, pml, comment) {
|
1713
|
-
return this.httpService
|
1714
|
-
.api({
|
1715
|
-
method: 'put',
|
1716
|
-
url: `${this.SERVICE_URL}/${modelId}/pml`,
|
1717
|
-
body: {
|
1718
|
-
id: modelId,
|
1719
|
-
pml: pml,
|
1720
|
-
comment: comment,
|
1721
|
-
},
|
1722
|
-
})
|
1723
|
-
.pipe(map(result => {
|
1724
|
-
if (result.successful) {
|
1725
|
-
return '';
|
1726
|
-
}
|
1727
|
-
else {
|
1728
|
-
throw new Error(result.message);
|
1729
|
-
}
|
1730
|
-
}), catchError(this.httpService.handleValidationError));
|
1731
|
-
}
|
1732
|
-
generateProducts(modelId) {
|
1733
|
-
return this.httpService.api({
|
1734
|
-
url: `${this.SERVICE_URL}/${modelId}/generate-products`,
|
1735
|
-
});
|
1736
|
-
}
|
1737
|
-
saveModel(productModel, comment) {
|
1738
|
-
const model = EntityUtil.clone(productModel);
|
1739
|
-
model.comment = comment;
|
1740
|
-
ModelTranslatorUtils.toServerModel(model);
|
1741
|
-
return this.httpService
|
1742
|
-
.api({
|
1743
|
-
method: 'put',
|
1744
|
-
url: `${this.SERVICE_URL}/${model.id}`,
|
1745
|
-
body: model,
|
1746
|
-
})
|
1747
|
-
.pipe(map(result => {
|
1748
|
-
if (result.successful) {
|
1749
|
-
return '';
|
1750
|
-
}
|
1751
|
-
else {
|
1752
|
-
throw new Error(result.message);
|
1753
|
-
}
|
1754
|
-
}), catchError(this.httpService.handleValidationError));
|
1755
|
-
}
|
1756
|
-
validateModel(productModel) {
|
1757
|
-
return this.httpService
|
1758
|
-
.api({
|
1759
|
-
method: 'post',
|
1760
|
-
url: `${this.SERVICE_URL}/validate`,
|
1761
|
-
body: productModel,
|
1762
|
-
errorHandler: this.httpService.handleValidationError,
|
1763
|
-
})
|
1764
|
-
.pipe(map(result => {
|
1765
|
-
if (result.successful) {
|
1766
|
-
return '';
|
1767
|
-
}
|
1768
|
-
else {
|
1769
|
-
throw new Error(result.message);
|
1770
|
-
}
|
1771
|
-
}));
|
1772
|
-
}
|
1773
|
-
renameModel(productModel, name) {
|
1774
|
-
const model = EntityUtil.clone(productModel);
|
1775
|
-
model.name = name;
|
1776
|
-
ModelTranslatorUtils.toServerModel(model);
|
1777
|
-
return this.httpService
|
1778
|
-
.api({
|
1779
|
-
method: 'patch',
|
1780
|
-
url: `${this.SERVICE_URL}/${model.id}`,
|
1781
|
-
body: model,
|
1782
|
-
})
|
1783
|
-
.pipe(catchError(this.httpService.handleValidationError));
|
1784
|
-
}
|
1785
|
-
uploadPmlFile(file, modelId) {
|
1786
|
-
const formData = new FormData();
|
1787
|
-
formData.append('file', file, file.name);
|
1788
|
-
return this.httpService.upload({
|
1789
|
-
url: `${this.SERVICE_URL}/${modelId}/pml/upload`,
|
1790
|
-
body: formData,
|
1791
|
-
});
|
1792
|
-
}
|
1793
|
-
runPml(modelId, pml, rootType, configurationMode) {
|
1794
|
-
return this.httpService.api({
|
1795
|
-
method: 'post',
|
1796
|
-
url: `${this.SERVICE_URL}/${modelId}/pml/run`,
|
1797
|
-
body: {
|
1798
|
-
pml,
|
1799
|
-
rootType,
|
1800
|
-
configurationMode,
|
1801
|
-
},
|
1802
|
-
responseType: 'text',
|
1803
|
-
});
|
1804
|
-
}
|
1805
|
-
evictAllCache() {
|
1806
|
-
return this.httpService.api({
|
1807
|
-
method: 'get',
|
1808
|
-
url: '/cache/evict/environment-variables',
|
1809
|
-
});
|
1810
|
-
}
|
1811
|
-
}
|
1812
|
-
ProductModelApiService.MAX_RESULTS = 200;
|
1813
|
-
ProductModelApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModelApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1814
|
-
ProductModelApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModelApiService });
|
1815
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModelApiService, decorators: [{
|
1816
|
-
type: Injectable
|
1817
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1818
|
-
|
1819
1346
|
class PromotionsApiService {
|
1820
1347
|
constructor(baseHttpService) {
|
1821
1348
|
this.baseHttpService = baseHttpService;
|
@@ -1879,54 +1406,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1879
1406
|
type: Injectable
|
1880
1407
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1881
1408
|
|
1882
|
-
class
|
1409
|
+
class RampApiService {
|
1883
1410
|
constructor(httpService) {
|
1884
1411
|
this.httpService = httpService;
|
1885
|
-
this.SERVICE_URL = '/
|
1886
|
-
}
|
1887
|
-
/**
|
1888
|
-
* This endpoint doesn't include orders and assets
|
1889
|
-
* @param objectId quoteId | accountId | opportunityId | orderId
|
1890
|
-
* @param params Query params
|
1891
|
-
* @param options Request options
|
1892
|
-
*/
|
1893
|
-
getQuoteState(objectId, params, options) {
|
1894
|
-
return this.httpService.api(Object.assign({ method: 'get', url: `/v2${this.SERVICE_URL}/${objectId}`, params }, options));
|
1412
|
+
this.SERVICE_URL = '/ramp';
|
1895
1413
|
}
|
1896
|
-
|
1897
|
-
return this.httpService.api(Object.assign({ method: 'post', url: `${this.SERVICE_URL}`, body: request }, options));
|
1414
|
+
next(request, options) {
|
1415
|
+
return this.httpService.api(Object.assign({ method: 'post', url: `${this.SERVICE_URL}/next`, body: request }, options));
|
1898
1416
|
}
|
1899
|
-
|
1900
|
-
return this.httpService.api(Object.assign({ method: 'post', url: `${this.SERVICE_URL}/
|
1901
|
-
}
|
1902
|
-
attachDocument(id, documentName, data) {
|
1903
|
-
const formData = new FormData();
|
1904
|
-
const blob = new Blob([data]);
|
1905
|
-
formData.append('file', blob, documentName);
|
1906
|
-
return this.httpService.upload({
|
1907
|
-
url: `${this.SERVICE_URL}/${id}/attach-document`,
|
1908
|
-
responseType: 'arraybuffer',
|
1909
|
-
method: 'post',
|
1910
|
-
body: formData,
|
1911
|
-
});
|
1912
|
-
}
|
1913
|
-
}
|
1914
|
-
QuoteApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1915
|
-
QuoteApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService });
|
1916
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService, decorators: [{
|
1917
|
-
type: Injectable
|
1918
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1919
|
-
|
1920
|
-
class RampApiService {
|
1921
|
-
constructor(httpService) {
|
1922
|
-
this.httpService = httpService;
|
1923
|
-
this.SERVICE_URL = '/ramp';
|
1924
|
-
}
|
1925
|
-
next(request, options) {
|
1926
|
-
return this.httpService.api(Object.assign({ method: 'post', url: `${this.SERVICE_URL}/next`, body: request }, options));
|
1927
|
-
}
|
1928
|
-
renew(request, options) {
|
1929
|
-
return this.httpService.api(Object.assign({ method: 'post', url: `${this.SERVICE_URL}/renew`, body: request }, options));
|
1417
|
+
renew(request, options) {
|
1418
|
+
return this.httpService.api(Object.assign({ method: 'post', url: `${this.SERVICE_URL}/renew`, body: request }, options));
|
1930
1419
|
}
|
1931
1420
|
}
|
1932
1421
|
RampApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RampApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
@@ -2061,235 +1550,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
2061
1550
|
type: Injectable
|
2062
1551
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2063
1552
|
|
2064
|
-
class RlmApiService {
|
2065
|
-
constructor(baseHttpService) {
|
2066
|
-
this.baseHttpService = baseHttpService;
|
2067
|
-
this.serviceUrl = '/rlm';
|
2068
|
-
}
|
2069
|
-
// TODO: request RLM data only when RLM is installed. Otherwise skip rlm requests. Discuss solution|approach with BE
|
2070
|
-
fetchContextDefinitions$() {
|
2071
|
-
return this.baseHttpService
|
2072
|
-
.api({ url: `${this.serviceUrl}/context`, skipErrorHandler: true })
|
2073
|
-
.pipe(catchError(() => {
|
2074
|
-
return of([]);
|
2075
|
-
}));
|
2076
|
-
}
|
2077
|
-
fetchContextMappings$(id) {
|
2078
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/context/${id}/mappings` });
|
2079
|
-
}
|
2080
|
-
fetchContextDefinitionStructure$(id) {
|
2081
|
-
return this.baseHttpService
|
2082
|
-
.api({
|
2083
|
-
url: `${this.serviceUrl}/context/${id}/structure/details`,
|
2084
|
-
skipErrorHandler: true,
|
2085
|
-
})
|
2086
|
-
.pipe(catchError(() => {
|
2087
|
-
return of([]);
|
2088
|
-
}), map(objects => {
|
2089
|
-
return objects.map(object => {
|
2090
|
-
var _a, _b;
|
2091
|
-
const tag = (_b = (_a = object.tags) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.title;
|
2092
|
-
const objectAttributes = object.attributes || [];
|
2093
|
-
return {
|
2094
|
-
id: object.id,
|
2095
|
-
title: tag || object.title,
|
2096
|
-
attributes: objectAttributes.map(attribute => {
|
2097
|
-
var _a, _b;
|
2098
|
-
const tag = (_b = (_a = attribute.tags) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.title;
|
2099
|
-
return {
|
2100
|
-
title: tag || attribute.title,
|
2101
|
-
fieldType: attribute.fieldType,
|
2102
|
-
dataType: attribute.dataType,
|
2103
|
-
};
|
2104
|
-
}),
|
2105
|
-
};
|
2106
|
-
});
|
2107
|
-
}));
|
2108
|
-
}
|
2109
|
-
fetchRlmProcedures(contextDefinitionId) {
|
2110
|
-
const params = {};
|
2111
|
-
if (contextDefinitionId) {
|
2112
|
-
params['contextDefinitionId'] = contextDefinitionId;
|
2113
|
-
}
|
2114
|
-
return this.baseHttpService.api({
|
2115
|
-
url: `${this.serviceUrl}/procedures`,
|
2116
|
-
params,
|
2117
|
-
});
|
2118
|
-
}
|
2119
|
-
}
|
2120
|
-
RlmApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2121
|
-
RlmApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmApiService });
|
2122
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmApiService, decorators: [{
|
2123
|
-
type: Injectable
|
2124
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2125
|
-
|
2126
|
-
class RlmQuoteApiService {
|
2127
|
-
constructor(httpService) {
|
2128
|
-
this.httpService = httpService;
|
2129
|
-
this.SERVICE_URL = '/quotes/rlm';
|
2130
|
-
}
|
2131
|
-
getQuote(mappingType, objectId, contextMappingId, options) {
|
2132
|
-
const params = { mappingType };
|
2133
|
-
if (contextMappingId) {
|
2134
|
-
params['contextMappingId'] = contextMappingId;
|
2135
|
-
}
|
2136
|
-
return this.httpService.api(Object.assign({ method: 'get', url: `${this.SERVICE_URL}/${objectId}`, params }, options));
|
2137
|
-
}
|
2138
|
-
}
|
2139
|
-
RlmQuoteApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmQuoteApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2140
|
-
RlmQuoteApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmQuoteApiService });
|
2141
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmQuoteApiService, decorators: [{
|
2142
|
-
type: Injectable
|
2143
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2144
|
-
|
2145
|
-
class RuleGroupsApiService {
|
2146
|
-
constructor(baseHttpService) {
|
2147
|
-
this.baseHttpService = baseHttpService;
|
2148
|
-
this.serviceUrl = '/admin/rule-groups';
|
2149
|
-
this.fetchRuleGroups$ = () => {
|
2150
|
-
return this.searchRuleGroups$(new Expression(), 0, 100);
|
2151
|
-
};
|
2152
|
-
this.searchRuleGroups$ = (expression, skip, count) => {
|
2153
|
-
let params = new HttpParams();
|
2154
|
-
params = params.set('skip', '' + skip);
|
2155
|
-
params = params.set('count', '' + count);
|
2156
|
-
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2157
|
-
};
|
2158
|
-
this.createRuleGroup$ = (ruleGroup) => {
|
2159
|
-
return this.baseHttpService.api({
|
2160
|
-
url: `${this.serviceUrl}`,
|
2161
|
-
method: 'post',
|
2162
|
-
body: ruleGroup,
|
2163
|
-
});
|
2164
|
-
};
|
2165
|
-
this.updateRuleGroup$ = (ruleGroup) => {
|
2166
|
-
return this.baseHttpService.api({
|
2167
|
-
url: `${this.serviceUrl}/${ruleGroup.id}`,
|
2168
|
-
method: 'post',
|
2169
|
-
body: ruleGroup,
|
2170
|
-
});
|
2171
|
-
};
|
2172
|
-
this.duplicateRuleGroup$ = (body) => {
|
2173
|
-
return this.baseHttpService
|
2174
|
-
.api({
|
2175
|
-
url: `${this.serviceUrl}/${body.id}/clone`,
|
2176
|
-
method: 'post',
|
2177
|
-
body,
|
2178
|
-
})
|
2179
|
-
.pipe(map$1(response => response.clonedRecordId));
|
2180
|
-
};
|
2181
|
-
this.removeRuleGroup$ = (id) => {
|
2182
|
-
return this.baseHttpService.api({
|
2183
|
-
url: `${this.serviceUrl}/${id}`,
|
2184
|
-
method: 'delete',
|
2185
|
-
});
|
2186
|
-
};
|
2187
|
-
this.restoreRuleGroup$ = (id) => {
|
2188
|
-
return this.baseHttpService.api({
|
2189
|
-
url: `${this.serviceUrl}/${id}/restore`,
|
2190
|
-
method: 'patch',
|
2191
|
-
});
|
2192
|
-
};
|
2193
|
-
}
|
2194
|
-
}
|
2195
|
-
RuleGroupsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2196
|
-
RuleGroupsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService });
|
2197
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService, decorators: [{
|
2198
|
-
type: Injectable
|
2199
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2200
|
-
|
2201
|
-
class RulesApiService {
|
2202
|
-
constructor(baseHttpService) {
|
2203
|
-
this.baseHttpService = baseHttpService;
|
2204
|
-
this.serviceUrl = '/admin/rules';
|
2205
|
-
this.fetchRules$ = () => {
|
2206
|
-
return this.searchRules$(new Expression(), 0, 100);
|
2207
|
-
};
|
2208
|
-
this.searchRules$ = (expression, skip, count) => {
|
2209
|
-
let params = new HttpParams();
|
2210
|
-
if (typeof skip === 'number') {
|
2211
|
-
params = params.set('skip', '' + skip);
|
2212
|
-
}
|
2213
|
-
if (typeof count === 'number') {
|
2214
|
-
params = params.set('count', '' + count);
|
2215
|
-
}
|
2216
|
-
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2217
|
-
};
|
2218
|
-
this.createRule$ = (rule) => {
|
2219
|
-
return this.baseHttpService.api({
|
2220
|
-
url: `${this.serviceUrl}`,
|
2221
|
-
method: 'post',
|
2222
|
-
body: rule,
|
2223
|
-
});
|
2224
|
-
};
|
2225
|
-
this.updateRule$ = (rule) => {
|
2226
|
-
return this.baseHttpService.api({
|
2227
|
-
url: `${this.serviceUrl}/${rule.id}`,
|
2228
|
-
method: 'put',
|
2229
|
-
body: rule,
|
2230
|
-
});
|
2231
|
-
};
|
2232
|
-
this.duplicateRule$ = (body) => {
|
2233
|
-
return this.baseHttpService
|
2234
|
-
.api({
|
2235
|
-
url: `${this.serviceUrl}/${body.id}/clone`,
|
2236
|
-
method: 'post',
|
2237
|
-
body,
|
2238
|
-
})
|
2239
|
-
.pipe(map(response => response.clonedRecordId));
|
2240
|
-
};
|
2241
|
-
this.removeRule$ = (id) => {
|
2242
|
-
return this.baseHttpService.api({
|
2243
|
-
url: `${this.serviceUrl}/${id}`,
|
2244
|
-
method: 'delete',
|
2245
|
-
});
|
2246
|
-
};
|
2247
|
-
this.restoreRule$ = (id) => {
|
2248
|
-
return this.baseHttpService.api({
|
2249
|
-
url: `${this.serviceUrl}/${id}/restore`,
|
2250
|
-
method: 'patch',
|
2251
|
-
});
|
2252
|
-
};
|
2253
|
-
}
|
2254
|
-
fetchRule$(id) {
|
2255
|
-
return this.baseHttpService.api({
|
2256
|
-
url: `${this.serviceUrl}/${id}`,
|
2257
|
-
method: 'get',
|
2258
|
-
});
|
2259
|
-
}
|
2260
|
-
fetchHeaderFields$() {
|
2261
|
-
return this.baseHttpService.api({
|
2262
|
-
url: `${this.serviceUrl}/describe/Header`,
|
2263
|
-
method: 'get',
|
2264
|
-
});
|
2265
|
-
}
|
2266
|
-
execute$(body) {
|
2267
|
-
const url = this.getExecuteRuleUrl(body.rule.ruleGroupType);
|
2268
|
-
return this.baseHttpService.api({
|
2269
|
-
url,
|
2270
|
-
method: 'post',
|
2271
|
-
body,
|
2272
|
-
});
|
2273
|
-
}
|
2274
|
-
getExecuteRuleUrl(ruleGroupType) {
|
2275
|
-
if (ruleGroupType === RuleGroupTypes.eligibility) {
|
2276
|
-
return '/rules/eligibility/execute';
|
2277
|
-
}
|
2278
|
-
if (ruleGroupType === RuleGroupTypes.catalog) {
|
2279
|
-
return '/rules/catalog/execute';
|
2280
|
-
}
|
2281
|
-
if (ruleGroupType === RuleGroupTypes.rlmContextBased) {
|
2282
|
-
return '/rules/rlm/execute';
|
2283
|
-
}
|
2284
|
-
return '/rules/execute';
|
2285
|
-
}
|
2286
|
-
}
|
2287
|
-
RulesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2288
|
-
RulesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService });
|
2289
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService, decorators: [{
|
2290
|
-
type: Injectable
|
2291
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2292
|
-
|
2293
1553
|
class SalesforceApiService {
|
2294
1554
|
constructor(httpService) {
|
2295
1555
|
this.httpService = httpService;
|
@@ -2436,84 +1696,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
2436
1696
|
type: Injectable
|
2437
1697
|
}], ctorParameters: function () { return [{ type: i1$2.MessageService }]; } });
|
2438
1698
|
|
2439
|
-
class ScriptsApiService {
|
2440
|
-
constructor(baseHttpService) {
|
2441
|
-
this.baseHttpService = baseHttpService;
|
2442
|
-
this.serviceUrl = '/admin/scripts';
|
2443
|
-
this.fetchScripts$ = () => {
|
2444
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}` });
|
2445
|
-
};
|
2446
|
-
this.searchScripts$ = (expression, skip, count) => {
|
2447
|
-
let params = new HttpParams();
|
2448
|
-
if (typeof skip === 'number') {
|
2449
|
-
params = params.set('skip', '' + skip);
|
2450
|
-
}
|
2451
|
-
if (typeof count === 'number') {
|
2452
|
-
params = params.set('count', '' + count);
|
2453
|
-
}
|
2454
|
-
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2455
|
-
};
|
2456
|
-
this.fetchScript$ = (id) => {
|
2457
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
2458
|
-
};
|
2459
|
-
this.createScript$ = (script) => {
|
2460
|
-
return this.baseHttpService.api({
|
2461
|
-
url: `${this.serviceUrl}`,
|
2462
|
-
method: 'post',
|
2463
|
-
body: script,
|
2464
|
-
});
|
2465
|
-
};
|
2466
|
-
this.updateScriptMeta$ = (script) => {
|
2467
|
-
return this.baseHttpService.api({
|
2468
|
-
url: `${this.serviceUrl}/${script.id}`,
|
2469
|
-
method: 'put',
|
2470
|
-
body: script,
|
2471
|
-
});
|
2472
|
-
};
|
2473
|
-
this.updateScriptDetails$ = (script) => {
|
2474
|
-
return this.baseHttpService.api({
|
2475
|
-
url: `${this.serviceUrl}/${script.id}`,
|
2476
|
-
method: 'put',
|
2477
|
-
body: script,
|
2478
|
-
});
|
2479
|
-
};
|
2480
|
-
this.cloneScript$ = (cloneRequest) => {
|
2481
|
-
return this.baseHttpService
|
2482
|
-
.api({
|
2483
|
-
url: `${this.serviceUrl}/${cloneRequest.id}/clone`,
|
2484
|
-
method: 'post',
|
2485
|
-
body: cloneRequest,
|
2486
|
-
})
|
2487
|
-
.pipe(map(response => response.clonedRecordId));
|
2488
|
-
};
|
2489
|
-
this.removeScript$ = (id) => {
|
2490
|
-
return this.baseHttpService.api({
|
2491
|
-
url: `${this.serviceUrl}/${id}`,
|
2492
|
-
method: 'delete',
|
2493
|
-
});
|
2494
|
-
};
|
2495
|
-
this.restoreScript$ = (id) => {
|
2496
|
-
return this.baseHttpService.api({
|
2497
|
-
url: `${this.serviceUrl}/${id}/restore`,
|
2498
|
-
method: 'patch',
|
2499
|
-
});
|
2500
|
-
};
|
2501
|
-
this.execute$ = (body) => {
|
2502
|
-
return this.baseHttpService.api({
|
2503
|
-
url: `/scripts/execute`,
|
2504
|
-
method: 'post',
|
2505
|
-
body,
|
2506
|
-
errorHandler: () => null,
|
2507
|
-
});
|
2508
|
-
};
|
2509
|
-
}
|
2510
|
-
}
|
2511
|
-
ScriptsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2512
|
-
ScriptsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService });
|
2513
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService, decorators: [{
|
2514
|
-
type: Injectable
|
2515
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2516
|
-
|
2517
1699
|
class ShoppingCartSettingsApiService {
|
2518
1700
|
constructor(configurationSettingsApiService) {
|
2519
1701
|
this.configurationSettingsApiService = configurationSettingsApiService;
|
@@ -2585,365 +1767,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
2585
1767
|
type: Injectable
|
2586
1768
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2587
1769
|
|
2588
|
-
class UIDefinitionsApiService {
|
2589
|
-
constructor(baseHttpService) {
|
2590
|
-
this.baseHttpService = baseHttpService;
|
2591
|
-
}
|
2592
|
-
fetch$(modelId, version) {
|
2593
|
-
const serviceUrl = this.getServiceUrl(modelId);
|
2594
|
-
let params = new HttpParams();
|
2595
|
-
if (version != null) {
|
2596
|
-
params = params.set('modelVersion', version);
|
2597
|
-
}
|
2598
|
-
return this.baseHttpService
|
2599
|
-
.api({
|
2600
|
-
method: 'get',
|
2601
|
-
url: serviceUrl,
|
2602
|
-
params: params,
|
2603
|
-
})
|
2604
|
-
.pipe(map$1(containers => containers.map(uiDefinitionFromDTO)));
|
2605
|
-
}
|
2606
|
-
create$(modelId, uiDefinitionContainer) {
|
2607
|
-
const serviceUrl = this.getServiceUrl(modelId);
|
2608
|
-
const dto = Object.assign(Object.assign({}, omit(uiDefinitionContainer, 'source')), { sourceBlob: JSON.stringify(uiDefinitionContainer.source) });
|
2609
|
-
return this.baseHttpService
|
2610
|
-
.api({
|
2611
|
-
method: 'post',
|
2612
|
-
url: serviceUrl,
|
2613
|
-
body: dto,
|
2614
|
-
})
|
2615
|
-
.pipe(map$1(container => uiDefinitionFromDTO(container)));
|
2616
|
-
}
|
2617
|
-
get$(modelId, uiDefinitionId) {
|
2618
|
-
const serviceUrl = this.getServiceUrl(modelId);
|
2619
|
-
return this.baseHttpService
|
2620
|
-
.api({
|
2621
|
-
method: 'get',
|
2622
|
-
url: `${serviceUrl}/${uiDefinitionId}`,
|
2623
|
-
})
|
2624
|
-
.pipe(map$1(container => uiDefinitionFromDTO(Object.assign(Object.assign({}, container), { id: uiDefinitionId }))));
|
2625
|
-
}
|
2626
|
-
update$(uiDefinitionContainer) {
|
2627
|
-
const serviceUrl = this.getServiceUrl(uiDefinitionContainer.modelId);
|
2628
|
-
const dto = uiDefinitionToDTO(uiDefinitionContainer);
|
2629
|
-
return this.baseHttpService
|
2630
|
-
.api({
|
2631
|
-
method: 'put',
|
2632
|
-
url: `${serviceUrl}/${uiDefinitionContainer.id}`,
|
2633
|
-
body: dto,
|
2634
|
-
})
|
2635
|
-
.pipe(map$1(container => uiDefinitionFromDTO(container)));
|
2636
|
-
}
|
2637
|
-
delete$(uiDefinitionContainer) {
|
2638
|
-
const serviceUrl = this.getServiceUrl(uiDefinitionContainer.modelId);
|
2639
|
-
return this.baseHttpService.api({
|
2640
|
-
method: 'delete',
|
2641
|
-
url: `${serviceUrl}/${uiDefinitionContainer.id}`,
|
2642
|
-
});
|
2643
|
-
}
|
2644
|
-
getServiceUrl(modelId) {
|
2645
|
-
return `/models/${modelId}/uidefinitions`;
|
2646
|
-
}
|
2647
|
-
}
|
2648
|
-
UIDefinitionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2649
|
-
UIDefinitionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService });
|
2650
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService, decorators: [{
|
2651
|
-
type: Injectable
|
2652
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2653
|
-
|
2654
|
-
const fromUIComponentStoryDTO = (dto, attachments) => {
|
2655
|
-
return {
|
2656
|
-
id: dto.id,
|
2657
|
-
name: dto.name,
|
2658
|
-
uiComponentId: dto.uiComponentId,
|
2659
|
-
description: dto.description,
|
2660
|
-
section: attachments.json,
|
2661
|
-
template: attachments.html,
|
2662
|
-
script: attachments.js,
|
2663
|
-
styles: attachments.css,
|
2664
|
-
};
|
2665
|
-
};
|
2666
|
-
|
2667
|
-
class UITemplatesApiService {
|
2668
|
-
constructor(baseHttpService) {
|
2669
|
-
this.baseHttpService = baseHttpService;
|
2670
|
-
this.serviceUrl = '/uitemplates';
|
2671
|
-
this.fetchTemplates$ = (name) => {
|
2672
|
-
let params = new HttpParams();
|
2673
|
-
if (name) {
|
2674
|
-
params = params.append('name', name);
|
2675
|
-
}
|
2676
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}`, params });
|
2677
|
-
};
|
2678
|
-
this.createTemplate$ = (template) => {
|
2679
|
-
return this.baseHttpService.api({
|
2680
|
-
method: 'post',
|
2681
|
-
url: `${this.serviceUrl}`,
|
2682
|
-
body: template,
|
2683
|
-
});
|
2684
|
-
};
|
2685
|
-
this.updateTemplate$ = (template) => {
|
2686
|
-
return this.baseHttpService.api({
|
2687
|
-
method: 'put',
|
2688
|
-
url: `${this.serviceUrl}/${template.id}`,
|
2689
|
-
body: template,
|
2690
|
-
});
|
2691
|
-
};
|
2692
|
-
this.duplicateTemplate$ = (template, cloneRequest) => {
|
2693
|
-
return this.baseHttpService
|
2694
|
-
.api({
|
2695
|
-
url: `${this.serviceUrl}/${template.id}/clone`,
|
2696
|
-
method: 'post',
|
2697
|
-
body: cloneRequest,
|
2698
|
-
})
|
2699
|
-
.pipe(map$1(response => response.clonedRecordId));
|
2700
|
-
};
|
2701
|
-
this.removeTemplate$ = (id) => {
|
2702
|
-
return this.baseHttpService.api({
|
2703
|
-
method: 'delete',
|
2704
|
-
url: `${this.serviceUrl}/${id}`,
|
2705
|
-
});
|
2706
|
-
};
|
2707
|
-
this.restoreTemplate$ = (id) => {
|
2708
|
-
return this.baseHttpService.api({
|
2709
|
-
method: 'patch',
|
2710
|
-
url: `${this.serviceUrl}/${id}`,
|
2711
|
-
});
|
2712
|
-
};
|
2713
|
-
this.searchTemplates$ = (data) => {
|
2714
|
-
return this.baseHttpService.api({
|
2715
|
-
method: 'post',
|
2716
|
-
url: `${this.serviceUrl}/search`,
|
2717
|
-
params: data.params,
|
2718
|
-
body: data.expression,
|
2719
|
-
});
|
2720
|
-
};
|
2721
|
-
this.fetchComponents$ = (templateId, name) => {
|
2722
|
-
let params = new HttpParams();
|
2723
|
-
if (name) {
|
2724
|
-
params = params.append('name', name);
|
2725
|
-
}
|
2726
|
-
return this.baseHttpService.api({
|
2727
|
-
url: `${this.serviceUrl}/${templateId}/components`,
|
2728
|
-
params,
|
2729
|
-
});
|
2730
|
-
};
|
2731
|
-
this.fetchComponent$ = (templateId, componentId) => {
|
2732
|
-
return this.baseHttpService.api({
|
2733
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}`,
|
2734
|
-
});
|
2735
|
-
};
|
2736
|
-
this.createComponent$ = (component) => {
|
2737
|
-
return this.baseHttpService.api({
|
2738
|
-
method: 'post',
|
2739
|
-
url: `${this.serviceUrl}/${component.uiTemplateId}/components`,
|
2740
|
-
body: component,
|
2741
|
-
});
|
2742
|
-
};
|
2743
|
-
this.updateComponent$ = (component) => {
|
2744
|
-
return this.baseHttpService.api({
|
2745
|
-
method: 'put',
|
2746
|
-
url: `${this.serviceUrl}/${component.uiTemplateId}/components/${component.id}`,
|
2747
|
-
body: component,
|
2748
|
-
});
|
2749
|
-
};
|
2750
|
-
this.duplicateComponent$ = (component, cloneRequest) => {
|
2751
|
-
return this.baseHttpService
|
2752
|
-
.api({
|
2753
|
-
url: `${this.serviceUrl}/${component.uiTemplateId}/components/${component.id}/clone`,
|
2754
|
-
method: 'post',
|
2755
|
-
body: cloneRequest,
|
2756
|
-
})
|
2757
|
-
.pipe(map$1(response => response.clonedRecordId));
|
2758
|
-
};
|
2759
|
-
this.removeComponent$ = (templateId, componentId) => {
|
2760
|
-
return this.baseHttpService.api({
|
2761
|
-
method: 'delete',
|
2762
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}`,
|
2763
|
-
});
|
2764
|
-
};
|
2765
|
-
this.restoreComponent$ = (templateId, componentId) => {
|
2766
|
-
return this.baseHttpService.api({
|
2767
|
-
method: 'patch',
|
2768
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}`,
|
2769
|
-
});
|
2770
|
-
};
|
2771
|
-
this.searchComponents$ = (templateId, data) => {
|
2772
|
-
return this.baseHttpService.api({
|
2773
|
-
method: 'post',
|
2774
|
-
url: `${this.serviceUrl}/${templateId}/components/search`,
|
2775
|
-
params: data.params,
|
2776
|
-
body: data.expression,
|
2777
|
-
});
|
2778
|
-
};
|
2779
|
-
this.fetchStoryAttachment = (templateId, componentId, storyId, type) => {
|
2780
|
-
return this.baseHttpService
|
2781
|
-
.api({
|
2782
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories/${storyId}/attachments/${type}/file`,
|
2783
|
-
responseType: 'text',
|
2784
|
-
errorHandler: noop,
|
2785
|
-
})
|
2786
|
-
.pipe(catchError$1(() => of('')));
|
2787
|
-
};
|
2788
|
-
this.convertToComponentStory$ = (templateId, componentId, storyDto) => {
|
2789
|
-
return forkJoin([
|
2790
|
-
this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'html'),
|
2791
|
-
this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'js'),
|
2792
|
-
this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'css'),
|
2793
|
-
this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'json'),
|
2794
|
-
]).pipe(map$1(([html, js, css, json]) => ({ html, js, css, json })), map$1(attachments => fromUIComponentStoryDTO(storyDto, attachments)));
|
2795
|
-
};
|
2796
|
-
this.fetchStories$ = (templateId, componentId, name) => {
|
2797
|
-
let params = new HttpParams();
|
2798
|
-
if (name) {
|
2799
|
-
params = params.append('name', name);
|
2800
|
-
}
|
2801
|
-
return this.baseHttpService
|
2802
|
-
.api({
|
2803
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories`,
|
2804
|
-
params,
|
2805
|
-
})
|
2806
|
-
.pipe(switchMap(dtos => {
|
2807
|
-
if (!dtos.length) {
|
2808
|
-
return of([]);
|
2809
|
-
}
|
2810
|
-
return forkJoin(dtos.map(dto => this.convertToComponentStory$(templateId, componentId, dto)));
|
2811
|
-
}));
|
2812
|
-
};
|
2813
|
-
this.fetchStory$ = (templateId, componentId, storyId) => {
|
2814
|
-
return this.baseHttpService
|
2815
|
-
.api({
|
2816
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories/${storyId}`,
|
2817
|
-
})
|
2818
|
-
.pipe(switchMap(dto => this.convertToComponentStory$(templateId, componentId, dto)));
|
2819
|
-
};
|
2820
|
-
this.createComponentStory$ = (templateId, story) => {
|
2821
|
-
return this.baseHttpService.api({
|
2822
|
-
method: 'post',
|
2823
|
-
url: `${this.serviceUrl}/${templateId}/components/${story.uiComponentId}/stories`,
|
2824
|
-
body: story,
|
2825
|
-
});
|
2826
|
-
};
|
2827
|
-
this.updateComponentStory$ = (templateId, story) => {
|
2828
|
-
const { script, template, styles, section } = story, rest = __rest(story, ["script", "template", "styles", "section"]);
|
2829
|
-
return this.baseHttpService
|
2830
|
-
.api({
|
2831
|
-
method: 'put',
|
2832
|
-
url: `${this.serviceUrl}/${templateId}/components/${story.uiComponentId}/stories/${story.id}`,
|
2833
|
-
body: rest,
|
2834
|
-
})
|
2835
|
-
.pipe(map$1(dto => fromUIComponentStoryDTO(dto, { html: template, js: script, css: styles, json: section })));
|
2836
|
-
};
|
2837
|
-
this.duplicateComponentStory$ = (story, cloneRequest) => {
|
2838
|
-
return this.baseHttpService
|
2839
|
-
.api({
|
2840
|
-
url: `${this.serviceUrl}/${story.template}/components/${story.uiComponentId}/stories/${story.id}/clone`,
|
2841
|
-
method: 'post',
|
2842
|
-
body: cloneRequest,
|
2843
|
-
})
|
2844
|
-
.pipe(map$1(response => response.clonedRecordId));
|
2845
|
-
};
|
2846
|
-
this.deleteComponentStory$ = (templateId, componentId, storyId) => {
|
2847
|
-
return this.baseHttpService.api({
|
2848
|
-
method: 'delete',
|
2849
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories/${storyId}`,
|
2850
|
-
});
|
2851
|
-
};
|
2852
|
-
this.restoreComponentStory$ = (templateId, componentId, storyId) => {
|
2853
|
-
return this.baseHttpService.api({
|
2854
|
-
method: 'patch',
|
2855
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories/${storyId}`,
|
2856
|
-
});
|
2857
|
-
};
|
2858
|
-
this.uploadStoryAttachments$ = (templateId, componentId, storyId, attachments) => {
|
2859
|
-
const formData = new FormData();
|
2860
|
-
if (attachments.html != null) {
|
2861
|
-
formData.append('html', new Blob([attachments.html]), 'story-template.html');
|
2862
|
-
}
|
2863
|
-
if (attachments.css != null) {
|
2864
|
-
formData.append('css', new Blob([attachments.css]), 'story-styles.css');
|
2865
|
-
}
|
2866
|
-
if (attachments.js != null) {
|
2867
|
-
formData.append('js', new Blob([attachments.js]), 'story-script.js');
|
2868
|
-
}
|
2869
|
-
if (attachments.json != null) {
|
2870
|
-
formData.append('json', new Blob([attachments.json]), 'story-section.json');
|
2871
|
-
}
|
2872
|
-
return this.baseHttpService.upload({
|
2873
|
-
method: 'post',
|
2874
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories/${storyId}/attachments`,
|
2875
|
-
body: formData,
|
2876
|
-
});
|
2877
|
-
};
|
2878
|
-
this.fetchComponentAttachments$ = (templateId, component) => {
|
2879
|
-
return forkJoin([
|
2880
|
-
this.fetchComponentAttachmentFile$(templateId, component.id, 'html'),
|
2881
|
-
this.fetchComponentAttachmentFile$(templateId, component.id, 'js'),
|
2882
|
-
this.fetchComponentAttachmentFile$(templateId, component.id, 'css'),
|
2883
|
-
this.fetchComponentAttachmentFile$(templateId, component.id, 'json'),
|
2884
|
-
]).pipe(map$1(([html, js, css, json]) => ({ html, js, css, json })));
|
2885
|
-
};
|
2886
|
-
this.fetchComponentsAttachments$ = (templateId) => {
|
2887
|
-
return this.fetchComponents$(templateId).pipe(switchMap(components => {
|
2888
|
-
return forkJoin(components.map(component => this.fetchComponentAttachments$(templateId, component)));
|
2889
|
-
}));
|
2890
|
-
};
|
2891
|
-
this.fetchComponentAttachmentFile$ = (templateId, componentId, attachmentType) => {
|
2892
|
-
return this.baseHttpService
|
2893
|
-
.api({
|
2894
|
-
method: 'get',
|
2895
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}/attachments/${attachmentType}/file`,
|
2896
|
-
responseType: 'text',
|
2897
|
-
errorHandler: noop,
|
2898
|
-
})
|
2899
|
-
.pipe(catchError$1(() => of('')));
|
2900
|
-
};
|
2901
|
-
this.uploadComponentAttachments$ = (templateId, componentId, attachments) => {
|
2902
|
-
const formData = new FormData();
|
2903
|
-
if (attachments.html != null) {
|
2904
|
-
formData.append('html', new Blob([attachments.html]), 'template.html');
|
2905
|
-
}
|
2906
|
-
if (attachments.css != null) {
|
2907
|
-
formData.append('css', new Blob([attachments.css]), 'styles.css');
|
2908
|
-
}
|
2909
|
-
if (attachments.js != null) {
|
2910
|
-
formData.append('js', new Blob([attachments.js]), 'script.js');
|
2911
|
-
}
|
2912
|
-
if (attachments.json != null) {
|
2913
|
-
formData.append('json', new Blob([attachments.json]), 'section.json');
|
2914
|
-
}
|
2915
|
-
return this.baseHttpService.upload({
|
2916
|
-
method: 'post',
|
2917
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}/attachments`,
|
2918
|
-
body: formData,
|
2919
|
-
});
|
2920
|
-
};
|
2921
|
-
}
|
2922
|
-
getTemplateThumbnailUrl(templateId) {
|
2923
|
-
return `${this.serviceUrl}/${templateId}/thumbnail/file`;
|
2924
|
-
}
|
2925
|
-
attachTemplateThumbnail$(templateId, file) {
|
2926
|
-
const data = new FormData();
|
2927
|
-
data.append('thumb', file);
|
2928
|
-
return this.baseHttpService.upload({
|
2929
|
-
method: 'post',
|
2930
|
-
url: `${this.serviceUrl}/${templateId}/thumbnail`,
|
2931
|
-
body: data,
|
2932
|
-
});
|
2933
|
-
}
|
2934
|
-
removeTemplateThumbnail$(templateId) {
|
2935
|
-
return this.baseHttpService.api({
|
2936
|
-
method: 'delete',
|
2937
|
-
url: `${this.serviceUrl}/${templateId}/thumbnail`,
|
2938
|
-
});
|
2939
|
-
}
|
2940
|
-
}
|
2941
|
-
UITemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2942
|
-
UITemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService });
|
2943
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService, decorators: [{
|
2944
|
-
type: Injectable
|
2945
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2946
|
-
|
2947
1770
|
class VeloceObjectsApiService {
|
2948
1771
|
constructor(baseHttpService) {
|
2949
1772
|
this.baseHttpService = baseHttpService;
|
@@ -3032,24 +1855,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
3032
1855
|
class ApiModule {
|
3033
1856
|
}
|
3034
1857
|
ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
3035
|
-
ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, imports: [HttpClientModule] });
|
1858
|
+
ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, imports: [HttpClientModule, ApiV2Module] });
|
3036
1859
|
ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, providers: [
|
3037
1860
|
BaseHttpService,
|
3038
1861
|
XrayService,
|
3039
|
-
ConfigurationApiService,
|
3040
1862
|
ConfigurationSettingsApiService,
|
3041
|
-
ContextApiService,
|
3042
1863
|
DocumentAttachmentApiService,
|
3043
1864
|
PriceApiService,
|
3044
|
-
ProductModelApiService,
|
3045
|
-
ProceduresApiService,
|
3046
|
-
QuoteApiService,
|
3047
1865
|
RampApiService,
|
3048
1866
|
SalesforceApiService,
|
3049
|
-
UITemplatesApiService,
|
3050
|
-
ScriptsApiService,
|
3051
|
-
RulesApiService,
|
3052
|
-
RuleGroupsApiService,
|
3053
1867
|
FlowsApiService,
|
3054
1868
|
GuidedSellingsAdminApiService,
|
3055
1869
|
ShoppingCartSettingsApiService,
|
@@ -3063,7 +1877,6 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
|
3063
1877
|
EndpointsApiService,
|
3064
1878
|
OrgInfoApiService,
|
3065
1879
|
OffersApiService,
|
3066
|
-
UIDefinitionsApiService,
|
3067
1880
|
VeloceObjectsApiService,
|
3068
1881
|
StatefulConfigurationApiService,
|
3069
1882
|
RebateProgramApiService,
|
@@ -3072,33 +1885,21 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
|
3072
1885
|
VeloceAuthService,
|
3073
1886
|
ContractedPriceApiService,
|
3074
1887
|
PortalsApiService,
|
3075
|
-
ConfigurationProcessorsApiService,
|
3076
1888
|
FlowStateApiService,
|
3077
1889
|
SandboxManagerApiService,
|
3078
|
-
|
3079
|
-
RlmQuoteApiService,
|
3080
|
-
], imports: [HttpClientModule] });
|
1890
|
+
], imports: [HttpClientModule, ApiV2Module] });
|
3081
1891
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, decorators: [{
|
3082
1892
|
type: NgModule,
|
3083
1893
|
args: [{
|
3084
|
-
imports: [HttpClientModule],
|
1894
|
+
imports: [HttpClientModule, ApiV2Module],
|
3085
1895
|
providers: [
|
3086
1896
|
BaseHttpService,
|
3087
1897
|
XrayService,
|
3088
|
-
ConfigurationApiService,
|
3089
1898
|
ConfigurationSettingsApiService,
|
3090
|
-
ContextApiService,
|
3091
1899
|
DocumentAttachmentApiService,
|
3092
1900
|
PriceApiService,
|
3093
|
-
ProductModelApiService,
|
3094
|
-
ProceduresApiService,
|
3095
|
-
QuoteApiService,
|
3096
1901
|
RampApiService,
|
3097
1902
|
SalesforceApiService,
|
3098
|
-
UITemplatesApiService,
|
3099
|
-
ScriptsApiService,
|
3100
|
-
RulesApiService,
|
3101
|
-
RuleGroupsApiService,
|
3102
1903
|
FlowsApiService,
|
3103
1904
|
GuidedSellingsAdminApiService,
|
3104
1905
|
ShoppingCartSettingsApiService,
|
@@ -3112,7 +1913,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
3112
1913
|
EndpointsApiService,
|
3113
1914
|
OrgInfoApiService,
|
3114
1915
|
OffersApiService,
|
3115
|
-
UIDefinitionsApiService,
|
3116
1916
|
VeloceObjectsApiService,
|
3117
1917
|
StatefulConfigurationApiService,
|
3118
1918
|
RebateProgramApiService,
|
@@ -3121,11 +1921,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
3121
1921
|
VeloceAuthService,
|
3122
1922
|
ContractedPriceApiService,
|
3123
1923
|
PortalsApiService,
|
3124
|
-
ConfigurationProcessorsApiService,
|
3125
1924
|
FlowStateApiService,
|
3126
1925
|
SandboxManagerApiService,
|
3127
|
-
RlmApiService,
|
3128
|
-
RlmQuoteApiService,
|
3129
1926
|
],
|
3130
1927
|
}]
|
3131
1928
|
}] });
|
@@ -3134,5 +1931,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
3134
1931
|
* Generated bundle index. Do not edit.
|
3135
1932
|
*/
|
3136
1933
|
|
3137
|
-
export { AccountApiService, ApiModule, CatalogAdminApiService, CatalogApiService,
|
1934
|
+
export { AccountApiService, ApiModule, CatalogAdminApiService, CatalogApiService, ConfigurationSettingsApiService, ContractedPriceApiService, DeltaApiService, DocumentAttachmentApiService, EndpointsApiService, FlowStateApiService, FlowsApiService, GuidedSellingApiService, GuidedSellingsAdminApiService, OffersApiService, OrgInfoApiService, PicklistsApiService, PortalsApiService, PriceApiService, ProductApiService, PromotionsApiService, RampApiService, RebateProgramApiService, RebateTypeApiService, SalesforceApiService, SandboxManagerApiService, ShoppingCartSettingsApiService, StatefulConfigurationApiService, VeloceAuthService, VeloceObjectsApiService, handleCanvasResponse };
|
3138
1935
|
//# sourceMappingURL=veloceapps-api.mjs.map
|