@veloceapps/api 11.0.0-3 → 11.0.0-31
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 +2 -45
- package/esm2020/src/index.mjs +21 -0
- package/esm2020/src/lib/api.module.mjs +75 -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/contracted-price-api.service.mjs +45 -0
- package/esm2020/src/lib/services/document-attachment-api.service.mjs +66 -0
- package/esm2020/src/lib/services/flow-state-api.mjs +142 -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/portals-api.service.mjs +76 -0
- package/esm2020/src/lib/services/promotions-api.service.mjs +68 -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/sandbox-manager-api.service.mjs +94 -0
- package/esm2020/src/lib/services/stateful-configuration-api.mjs +51 -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/offers-dto.types.mjs +2 -0
- package/esm2020/src/lib/types/index.mjs +6 -0
- package/esm2020/src/lib/types/org-info.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 +64 -0
- package/esm2020/v2/index.mjs +4 -0
- package/esm2020/v2/services/cache-api.service.mjs +22 -0
- package/esm2020/v2/services/configuration-processors-api.service.mjs +38 -0
- package/esm2020/v2/services/configuration-settings-api.service.mjs +89 -0
- package/esm2020/v2/services/context-definition-admin-api.service.mjs +65 -0
- package/esm2020/v2/services/endpoints-admin-api.service.mjs +79 -0
- package/esm2020/v2/services/flows-api.service.mjs +29 -0
- package/esm2020/v2/services/function-groups-admin-api.service.mjs +62 -0
- package/esm2020/v2/services/functions-admin-api.service.mjs +97 -0
- package/esm2020/v2/services/index.mjs +21 -0
- package/esm2020/v2/services/orchestrations-admin-api.service.mjs +87 -0
- package/esm2020/v2/services/orchestrations-api.service.mjs +23 -0
- package/esm2020/v2/services/pcm-api.service.mjs +29 -0
- package/esm2020/v2/services/picklists-admin-api.service.mjs +41 -0
- package/esm2020/v2/services/products-admin-api.service.mjs +90 -0
- package/esm2020/v2/services/sales-transactions-api.service.mjs +52 -0
- package/esm2020/v2/services/salesforce-api.service.mjs +83 -0
- package/esm2020/v2/services/scripts-admin-api.service.mjs +83 -0
- package/esm2020/v2/services/shopping-cart-settings-api.service.mjs +28 -0
- package/esm2020/v2/services/ui-definitions-admin-api.service.mjs +68 -0
- package/esm2020/v2/services/ui-templates-admin-api.service.mjs +286 -0
- package/esm2020/v2/services/veloce-objects-api.service.mjs +90 -0
- package/esm2020/v2/types/clone-request.types.mjs +2 -0
- package/esm2020/v2/types/dto/configuration-settings-dto.types.mjs +22 -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 +5 -0
- package/esm2020/v2/types/pcm.types.mjs +2 -0
- package/esm2020/v2/types/procedure.types.mjs +2 -0
- package/esm2020/v2/types/sales-transaction.types.mjs +2 -0
- package/esm2020/v2/types/search-request.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 +1403 -0
- package/fesm2015/veloceapps-api-v2.mjs.map +1 -0
- package/fesm2015/veloceapps-api.mjs +114 -1959
- package/fesm2015/veloceapps-api.mjs.map +1 -1
- package/fesm2020/veloceapps-api-v2.mjs +1475 -0
- package/fesm2020/veloceapps-api-v2.mjs.map +1 -0
- package/fesm2020/veloceapps-api.mjs +179 -2122
- package/fesm2020/veloceapps-api.mjs.map +1 -1
- package/index.d.ts +1 -44
- package/package.json +9 -1
- package/src/index.d.ts +20 -0
- package/{lib → src/lib}/api.module.d.ts +2 -1
- package/{lib → src/lib}/services/catalog-api.service.d.ts +5 -5
- package/{lib → src/lib}/types/index.d.ts +0 -2
- 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/v2/services/cache-api.service.d.ts +11 -0
- package/{lib → v2}/services/configuration-settings-api.service.d.ts +1 -2
- package/{lib/services/rlm-api.service.d.ts → v2/services/context-definition-admin-api.service.d.ts} +3 -3
- package/{lib/services/endpoints-api.service.d.ts → v2/services/endpoints-admin-api.service.d.ts} +3 -4
- package/v2/services/function-groups-admin-api.service.d.ts +18 -0
- package/v2/services/functions-admin-api.service.d.ts +22 -0
- package/v2/services/index.d.ts +20 -0
- package/v2/services/orchestrations-admin-api.service.d.ts +21 -0
- package/v2/services/orchestrations-api.service.d.ts +12 -0
- package/v2/services/pcm-api.service.d.ts +11 -0
- package/{lib/services/picklists-api.service.d.ts → v2/services/picklists-admin-api.service.d.ts} +3 -3
- package/v2/services/products-admin-api.service.d.ts +21 -0
- package/v2/services/sales-transactions-api.service.d.ts +20 -0
- package/{lib → v2}/services/salesforce-api.service.d.ts +1 -0
- package/{lib/services/scripts-api.service.d.ts → v2/services/scripts-admin-api.service.d.ts} +3 -3
- package/v2/services/ui-definitions-admin-api.service.d.ts +18 -0
- package/{lib/services/ui-templates-api.service.d.ts → v2/services/ui-templates-admin-api.service.d.ts} +3 -3
- package/{lib → v2}/services/veloce-objects-api.service.d.ts +3 -3
- 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 +4 -0
- package/v2/types/pcm.types.d.ts +10 -0
- package/v2/types/procedure.types.d.ts +10 -0
- package/v2/types/sales-transaction.types.d.ts +14 -0
- package/v2/types/search-request.types.d.ts +8 -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 -64
- 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/ui-templates-api.service.mjs +0 -286
- 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/delta-api.service.d.ts +0 -12
- package/lib/services/price-api.service.d.ts +0 -16
- package/lib/services/procedures-api.service.d.ts +0 -30
- package/lib/services/product-api.service.d.ts +0 -31
- package/lib/services/product-model-api.service.d.ts +0 -29
- package/lib/services/quote-api.service.d.ts +0 -22
- package/lib/services/ramp-api.service.d.ts +0 -13
- package/lib/services/rlm-quote-api.service.d.ts +0 -11
- package/lib/services/rule-groups-api.service.d.ts +0 -18
- package/lib/services/rules-api.service.d.ts +0 -22
- package/lib/services/ui-definitions-api.service.d.ts +0 -15
- package/lib/types/price.types.d.ts +0 -5
- package/lib/types/quote.types.d.ts +0 -8
- package/lib/types/ramp-request.types.d.ts +0 -13
- 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/contracted-price-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/document-attachment-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/flow-state-api.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/portals-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/promotions-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/sandbox-manager-api.service.d.ts +0 -0
- /package/{lib → src/lib}/services/stateful-configuration-api.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/offers-dto.types.d.ts +0 -0
- /package/{lib → src/lib}/types/org-info.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/flows-api.service.d.ts +0 -0
- /package/{lib → v2}/services/shopping-cart-settings-api.service.d.ts +0 -0
- /package/{lib → v2}/types/dto/configuration-settings-dto.types.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
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as i1$1 from '@angular/common/http';
|
|
2
|
-
import { HttpParams, HttpHeaders,
|
|
2
|
+
import { HttpParams, HttpHeaders, 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,
|
|
8
|
-
import {
|
|
7
|
+
import { Expression, Operator, isApexError, isCanvasError, BaseHttpService, XrayService } from '@veloceapps/core';
|
|
8
|
+
import { noop, map as map$1, from, catchError, of } from 'rxjs';
|
|
9
|
+
import { tap, map } from 'rxjs/operators';
|
|
10
|
+
import { isArray } from 'lodash';
|
|
9
11
|
import * as i1$2 from 'primeng/api';
|
|
10
|
-
import { isArray, omit } from 'lodash';
|
|
11
|
-
import { __rest } from 'tslib';
|
|
12
12
|
|
|
13
13
|
class AccountApiService {
|
|
14
14
|
constructor(httpService) {
|
|
@@ -350,229 +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
|
-
class ConfigurationSettingsDTO {
|
|
480
|
-
static fromDTO(dto, key) {
|
|
481
|
-
return {
|
|
482
|
-
id: dto === null || dto === void 0 ? void 0 : dto.id,
|
|
483
|
-
key: (dto === null || dto === void 0 ? void 0 : dto.key) || key || '',
|
|
484
|
-
value: dto === null || dto === void 0 ? void 0 : dto.value,
|
|
485
|
-
};
|
|
486
|
-
}
|
|
487
|
-
static toDTO(data) {
|
|
488
|
-
return {
|
|
489
|
-
id: data.id,
|
|
490
|
-
key: data.key,
|
|
491
|
-
value: data.value,
|
|
492
|
-
};
|
|
493
|
-
}
|
|
494
|
-
constructor(id, key, value) {
|
|
495
|
-
this.id = id;
|
|
496
|
-
this.key = key;
|
|
497
|
-
this.value = value;
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
class ConfigurationSettingsApiService {
|
|
502
|
-
constructor(httpService, messageService) {
|
|
503
|
-
this.httpService = httpService;
|
|
504
|
-
this.messageService = messageService;
|
|
505
|
-
this.SERVICE_URL = '/configuration-settings';
|
|
506
|
-
}
|
|
507
|
-
fetchSettings(options) {
|
|
508
|
-
return this.httpService
|
|
509
|
-
.api(Object.assign({ url: `${this.SERVICE_URL}`, method: 'get' }, options))
|
|
510
|
-
.pipe(map((settings) => settings.map(setting => ConfigurationSettingsDTO.fromDTO(setting))));
|
|
511
|
-
}
|
|
512
|
-
fetchSetting(settingsKey, options) {
|
|
513
|
-
return this.httpService
|
|
514
|
-
.api(Object.assign(Object.assign({ url: `${this.SERVICE_URL}/byKey/${settingsKey}`, method: 'get' }, options), { skipErrorHandler: true }))
|
|
515
|
-
.pipe(map((setting) => ConfigurationSettingsDTO.fromDTO(setting, settingsKey)), catchError(err => {
|
|
516
|
-
if (err instanceof HttpErrorResponse && err.status === 404) {
|
|
517
|
-
if (!(options === null || options === void 0 ? void 0 : options.skipErrorHandler)) {
|
|
518
|
-
this.messageService.add({
|
|
519
|
-
severity: 'error',
|
|
520
|
-
summary: `Configuration Setting "${settingsKey}" is not found`,
|
|
521
|
-
sticky: true,
|
|
522
|
-
});
|
|
523
|
-
}
|
|
524
|
-
return of(null);
|
|
525
|
-
}
|
|
526
|
-
throw err;
|
|
527
|
-
}));
|
|
528
|
-
}
|
|
529
|
-
createSetting(setting, options) {
|
|
530
|
-
const request = ConfigurationSettingsDTO.toDTO(setting);
|
|
531
|
-
return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}`, method: 'post', body: Object.assign({}, request) }, options));
|
|
532
|
-
}
|
|
533
|
-
updateSetting(setting, options) {
|
|
534
|
-
const request = ConfigurationSettingsDTO.toDTO(setting);
|
|
535
|
-
return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/${request.id}`, method: 'put', body: Object.assign({}, request) }, options));
|
|
536
|
-
}
|
|
537
|
-
removeSetting(setting, options) {
|
|
538
|
-
const request = ConfigurationSettingsDTO.toDTO(setting);
|
|
539
|
-
return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/${request.id}`, method: 'delete' }, options));
|
|
540
|
-
}
|
|
541
|
-
restoreSetting(settingId, options) {
|
|
542
|
-
return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/${settingId}/restore`, method: 'patch' }, options));
|
|
543
|
-
}
|
|
544
|
-
clear(name, options) {
|
|
545
|
-
return this.httpService.api(Object.assign({ method: 'get', url: '/cache/evict/' + name }, options));
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
ConfigurationSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService, deps: [{ token: i1.BaseHttpService }, { token: i1$2.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
549
|
-
ConfigurationSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService });
|
|
550
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService, decorators: [{
|
|
551
|
-
type: Injectable
|
|
552
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i1$2.MessageService }]; } });
|
|
553
|
-
|
|
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
353
|
class ContractedPriceApiService {
|
|
577
354
|
constructor(baseHttpService) {
|
|
578
355
|
this.baseHttpService = baseHttpService;
|
|
@@ -614,26 +391,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
614
391
|
type: Injectable
|
|
615
392
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
616
393
|
|
|
617
|
-
class DeltaApiService {
|
|
618
|
-
constructor(httpService) {
|
|
619
|
-
this.httpService = httpService;
|
|
620
|
-
this.SERVICE_URL = '/delta';
|
|
621
|
-
}
|
|
622
|
-
calculate$(request) {
|
|
623
|
-
return this.httpService.api({
|
|
624
|
-
method: 'post',
|
|
625
|
-
url: `${this.SERVICE_URL}/calculate`,
|
|
626
|
-
body: request,
|
|
627
|
-
skipErrorHandler: true,
|
|
628
|
-
});
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
DeltaApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeltaApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
632
|
-
DeltaApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeltaApiService });
|
|
633
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeltaApiService, decorators: [{
|
|
634
|
-
type: Injectable
|
|
635
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
636
|
-
|
|
637
394
|
class DocumentAttachmentApiService {
|
|
638
395
|
constructor(httpService, fileDownloadService) {
|
|
639
396
|
this.httpService = httpService;
|
|
@@ -696,81 +453,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
696
453
|
type: Injectable
|
|
697
454
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i1.FileDownloadService }]; } });
|
|
698
455
|
|
|
699
|
-
class EndpointsApiService {
|
|
700
|
-
constructor(baseHttpService) {
|
|
701
|
-
this.baseHttpService = baseHttpService;
|
|
702
|
-
this.adminServiceUrl = '/admin/api-endpoints';
|
|
703
|
-
this.serviceUrl = '/api-endpoints';
|
|
704
|
-
}
|
|
705
|
-
fetchEndpoints$() {
|
|
706
|
-
return this.searchEndpoints$(new Expression(), 0, -1);
|
|
707
|
-
}
|
|
708
|
-
searchEndpoints$(expression, skip, count) {
|
|
709
|
-
let params = new HttpParams();
|
|
710
|
-
params = params.set('skip', '' + skip);
|
|
711
|
-
params = params.set('count', '' + count);
|
|
712
|
-
return this.baseHttpService.api({
|
|
713
|
-
method: 'post',
|
|
714
|
-
url: `${this.adminServiceUrl}/search`,
|
|
715
|
-
params,
|
|
716
|
-
body: expression,
|
|
717
|
-
});
|
|
718
|
-
}
|
|
719
|
-
removeEndpoint$(id) {
|
|
720
|
-
return this.baseHttpService.api({
|
|
721
|
-
url: `${this.adminServiceUrl}/${id}`,
|
|
722
|
-
method: 'delete',
|
|
723
|
-
});
|
|
724
|
-
}
|
|
725
|
-
restoreEndpoint$(id) {
|
|
726
|
-
return this.baseHttpService.api({
|
|
727
|
-
url: `${this.adminServiceUrl}/${id}/restore`,
|
|
728
|
-
method: 'patch',
|
|
729
|
-
});
|
|
730
|
-
}
|
|
731
|
-
fetchEndpoint$(id) {
|
|
732
|
-
return this.baseHttpService.api({
|
|
733
|
-
url: `${this.adminServiceUrl}/${id}`,
|
|
734
|
-
method: 'get',
|
|
735
|
-
});
|
|
736
|
-
}
|
|
737
|
-
createEndpoint$(body) {
|
|
738
|
-
return this.baseHttpService.api({
|
|
739
|
-
url: `${this.adminServiceUrl}`,
|
|
740
|
-
method: 'post',
|
|
741
|
-
body,
|
|
742
|
-
});
|
|
743
|
-
}
|
|
744
|
-
updateEndpoint$(body) {
|
|
745
|
-
return this.baseHttpService.api({
|
|
746
|
-
url: `${this.adminServiceUrl}/${body.id}`,
|
|
747
|
-
method: 'put',
|
|
748
|
-
body,
|
|
749
|
-
});
|
|
750
|
-
}
|
|
751
|
-
duplicateEndpoint$(cloneRequest) {
|
|
752
|
-
return this.baseHttpService.api({
|
|
753
|
-
url: `${this.adminServiceUrl}/${cloneRequest.id}/clone`,
|
|
754
|
-
method: 'post',
|
|
755
|
-
body: cloneRequest,
|
|
756
|
-
});
|
|
757
|
-
}
|
|
758
|
-
executeEndpoint$(body) {
|
|
759
|
-
return this.baseHttpService.api({
|
|
760
|
-
url: `${this.serviceUrl}/execute`,
|
|
761
|
-
method: 'post',
|
|
762
|
-
body,
|
|
763
|
-
responseType: 'text',
|
|
764
|
-
skipErrorHandler: true,
|
|
765
|
-
});
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
EndpointsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
769
|
-
EndpointsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsApiService });
|
|
770
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsApiService, decorators: [{
|
|
771
|
-
type: Injectable
|
|
772
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
773
|
-
|
|
774
456
|
class FlowStateApiService {
|
|
775
457
|
constructor(httpService) {
|
|
776
458
|
this.httpService = httpService;
|
|
@@ -910,31 +592,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
910
592
|
type: Injectable
|
|
911
593
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
912
594
|
|
|
913
|
-
class FlowsApiService {
|
|
914
|
-
constructor(configurationSettingsApiService) {
|
|
915
|
-
this.configurationSettingsApiService = configurationSettingsApiService;
|
|
916
|
-
this.flowsKey = 'flows';
|
|
917
|
-
}
|
|
918
|
-
getFlow(id) {
|
|
919
|
-
return this.fetchFlows().pipe(map(flows => flows.find(flow => flow.id == id)), map(flow => {
|
|
920
|
-
if (!flow) {
|
|
921
|
-
throw new Error(`Flow with flowId=${id} is not defined`);
|
|
922
|
-
}
|
|
923
|
-
return flow;
|
|
924
|
-
}));
|
|
925
|
-
}
|
|
926
|
-
fetchFlows() {
|
|
927
|
-
return this.configurationSettingsApiService
|
|
928
|
-
.fetchSetting(this.flowsKey)
|
|
929
|
-
.pipe(map((setting) => ((setting === null || setting === void 0 ? void 0 : setting.value) ? JSON.parse(setting.value) : [])));
|
|
930
|
-
}
|
|
931
|
-
}
|
|
932
|
-
FlowsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
933
|
-
FlowsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService });
|
|
934
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, decorators: [{
|
|
935
|
-
type: Injectable
|
|
936
|
-
}], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
|
|
937
|
-
|
|
938
595
|
class GuidedSellingsAdminApiService {
|
|
939
596
|
constructor(baseHttpService) {
|
|
940
597
|
this.baseHttpService = baseHttpService;
|
|
@@ -1145,7 +802,7 @@ class OrgInfoApiService {
|
|
|
1145
802
|
getOrgInfo$() {
|
|
1146
803
|
try {
|
|
1147
804
|
return window.doCanvasCall && window.ORGANIZATION_ID
|
|
1148
|
-
? from(window.doCanvasCall(`org-info/${window.ORGANIZATION_ID}`, null)).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError
|
|
805
|
+
? from(window.doCanvasCall(`org-info/${window.ORGANIZATION_ID}`, null)).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError(() => of(undefined)))
|
|
1149
806
|
: of(undefined);
|
|
1150
807
|
}
|
|
1151
808
|
catch (_a) {
|
|
@@ -1155,7 +812,7 @@ class OrgInfoApiService {
|
|
|
1155
812
|
getAvailableVersionsInfo$() {
|
|
1156
813
|
try {
|
|
1157
814
|
return window.doCanvasCall && window.ORGANIZATION_ID
|
|
1158
|
-
? from(window.doCanvasCall('versions/available', 'include_all=true')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError
|
|
815
|
+
? from(window.doCanvasCall('versions/available', 'include_all=true')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError(() => of(undefined)))
|
|
1159
816
|
: of(undefined);
|
|
1160
817
|
}
|
|
1161
818
|
catch (_a) {
|
|
@@ -1165,7 +822,7 @@ class OrgInfoApiService {
|
|
|
1165
822
|
upgradeVersion$(targetVersion) {
|
|
1166
823
|
try {
|
|
1167
824
|
return window.doCanvasCall && window.ORGANIZATION_ID
|
|
1168
|
-
? from(window.doCanvasCall('versions/upgrade', `target_version=${targetVersion}`)).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError
|
|
825
|
+
? from(window.doCanvasCall('versions/upgrade', `target_version=${targetVersion}`)).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError(() => of(undefined)))
|
|
1169
826
|
: of(undefined);
|
|
1170
827
|
}
|
|
1171
828
|
catch (_a) {
|
|
@@ -1179,41 +836,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1179
836
|
type: Injectable
|
|
1180
837
|
}], ctorParameters: function () { return [{ type: i1$2.MessageService }]; } });
|
|
1181
838
|
|
|
1182
|
-
class PicklistsApiService {
|
|
1183
|
-
constructor(baseHttpService) {
|
|
1184
|
-
this.baseHttpService = baseHttpService;
|
|
1185
|
-
this.serviceUrl = '/admin';
|
|
1186
|
-
this.fetchAllPicklists$ = () => this.baseHttpService.api({ url: `${this.serviceUrl}/picklists` });
|
|
1187
|
-
this.fetchPicklist$ = (code) => this.baseHttpService.api({ url: `${this.serviceUrl}/picklists/${code}` });
|
|
1188
|
-
this.createPicklist$ = (picklist) => {
|
|
1189
|
-
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/picklists`, body: picklist });
|
|
1190
|
-
};
|
|
1191
|
-
this.updatePicklist$ = (picklist) => {
|
|
1192
|
-
return this.baseHttpService.api({
|
|
1193
|
-
method: 'put',
|
|
1194
|
-
url: `${this.serviceUrl}/picklists/${picklist.id}`,
|
|
1195
|
-
body: picklist,
|
|
1196
|
-
});
|
|
1197
|
-
};
|
|
1198
|
-
this.removePicklist$ = (id) => this.baseHttpService.api({ method: 'delete', url: `${this.serviceUrl}/picklists/${id}` });
|
|
1199
|
-
this.restorePicklist$ = (id) => {
|
|
1200
|
-
return this.baseHttpService.api({
|
|
1201
|
-
url: `${this.serviceUrl}/picklists/${id}/restore`,
|
|
1202
|
-
method: 'patch',
|
|
1203
|
-
});
|
|
1204
|
-
};
|
|
1205
|
-
this.addPicklistValue$ = (picklist, value) => {
|
|
1206
|
-
const data = Object.assign(Object.assign({}, picklist), { values: [...picklist.values, value] });
|
|
1207
|
-
return this.baseHttpService.api({ method: 'put', url: `${this.serviceUrl}/picklists/${picklist.id}`, body: data });
|
|
1208
|
-
};
|
|
1209
|
-
}
|
|
1210
|
-
}
|
|
1211
|
-
PicklistsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1212
|
-
PicklistsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService });
|
|
1213
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService, decorators: [{
|
|
1214
|
-
type: Injectable
|
|
1215
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
1216
|
-
|
|
1217
839
|
class PortalsApiService {
|
|
1218
840
|
constructor(baseHttpService) {
|
|
1219
841
|
this.baseHttpService = baseHttpService;
|
|
@@ -1283,543 +905,136 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
1283
905
|
type: Injectable
|
|
1284
906
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
1285
907
|
|
|
1286
|
-
class
|
|
1287
|
-
constructor(httpService) {
|
|
1288
|
-
this.httpService = httpService;
|
|
1289
|
-
this.SERVICE_URL = '/price';
|
|
1290
|
-
}
|
|
1291
|
-
calculate(request) {
|
|
1292
|
-
return this.httpService.api({
|
|
1293
|
-
method: 'post',
|
|
1294
|
-
url: `${this.SERVICE_URL}/calculate`,
|
|
1295
|
-
body: request,
|
|
1296
|
-
skipErrorHandler: true,
|
|
1297
|
-
});
|
|
1298
|
-
}
|
|
1299
|
-
getPriceLists() {
|
|
1300
|
-
return this.httpService.api({
|
|
1301
|
-
method: 'get',
|
|
1302
|
-
url: '/price-lists',
|
|
1303
|
-
});
|
|
1304
|
-
}
|
|
1305
|
-
getPriceList(id) {
|
|
1306
|
-
return this.httpService.api({
|
|
1307
|
-
method: 'get',
|
|
1308
|
-
url: `/price-lists/${id}`,
|
|
1309
|
-
});
|
|
1310
|
-
}
|
|
1311
|
-
getSellingTermByEndDate(planId, offeringId, startDate, endDate, frequencyUnit, frequencyDuration) {
|
|
1312
|
-
return this.httpService.api({
|
|
1313
|
-
method: 'post',
|
|
1314
|
-
url: `${this.SERVICE_URL}/selling-term-by-end-date`,
|
|
1315
|
-
body: {
|
|
1316
|
-
planId: planId,
|
|
1317
|
-
offeringId: offeringId,
|
|
1318
|
-
startDate: startDate,
|
|
1319
|
-
endDate: endDate,
|
|
1320
|
-
frequencyUnit: frequencyUnit,
|
|
1321
|
-
frequencyDuration: frequencyDuration,
|
|
1322
|
-
},
|
|
1323
|
-
});
|
|
1324
|
-
}
|
|
1325
|
-
getSellingTermByTerm(planId, offeringId, startDate, term, frequencyUnit, frequencyDuration) {
|
|
1326
|
-
return this.httpService.api({
|
|
1327
|
-
method: 'post',
|
|
1328
|
-
url: `${this.SERVICE_URL}/selling-term-by-term`,
|
|
1329
|
-
body: {
|
|
1330
|
-
planId: planId,
|
|
1331
|
-
offeringId: offeringId,
|
|
1332
|
-
startDate: startDate,
|
|
1333
|
-
term: term,
|
|
1334
|
-
frequencyUnit: frequencyUnit,
|
|
1335
|
-
frequencyDuration: frequencyDuration,
|
|
1336
|
-
},
|
|
1337
|
-
});
|
|
1338
|
-
}
|
|
1339
|
-
}
|
|
1340
|
-
PriceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PriceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1341
|
-
PriceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PriceApiService });
|
|
1342
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PriceApiService, decorators: [{
|
|
1343
|
-
type: Injectable
|
|
1344
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
1345
|
-
|
|
1346
|
-
class ProceduresApiService {
|
|
908
|
+
class PromotionsApiService {
|
|
1347
909
|
constructor(baseHttpService) {
|
|
1348
910
|
this.baseHttpService = baseHttpService;
|
|
1349
|
-
this.
|
|
1350
|
-
this.
|
|
1351
|
-
|
|
1352
|
-
return this.searchProcedures$(new Expression(), 0, 100);
|
|
911
|
+
this.serviceUrl = '/admin/promotion';
|
|
912
|
+
this.fetchAll$ = () => {
|
|
913
|
+
return this.baseHttpService.api({ url: this.serviceUrl });
|
|
1353
914
|
};
|
|
1354
|
-
this.
|
|
1355
|
-
|
|
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
|
-
});
|
|
915
|
+
this.fetchOne$ = (id) => {
|
|
916
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
|
1364
917
|
};
|
|
1365
|
-
this.
|
|
918
|
+
this.remove$ = (id) => {
|
|
1366
919
|
return this.baseHttpService.api({
|
|
1367
|
-
url: `${this.
|
|
1368
|
-
method: '
|
|
1369
|
-
body: newProcedure,
|
|
920
|
+
url: `${this.serviceUrl}/${id}`,
|
|
921
|
+
method: 'delete',
|
|
1370
922
|
});
|
|
1371
923
|
};
|
|
1372
|
-
this.
|
|
924
|
+
this.restore$ = (id) => {
|
|
1373
925
|
return this.baseHttpService.api({
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
body: procedure,
|
|
926
|
+
method: 'patch',
|
|
927
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
|
1377
928
|
});
|
|
1378
929
|
};
|
|
1379
|
-
this.
|
|
930
|
+
this.duplicate$ = (body) => {
|
|
1380
931
|
return this.baseHttpService
|
|
1381
932
|
.api({
|
|
1382
|
-
url: `${this.
|
|
933
|
+
url: `${this.serviceUrl}/${body.id}/clone`,
|
|
1383
934
|
method: 'post',
|
|
1384
935
|
body,
|
|
1385
936
|
})
|
|
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
|
-
});
|
|
937
|
+
.pipe(map$1(response => response.clonedRecordId));
|
|
1399
938
|
};
|
|
1400
939
|
}
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
}
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
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
|
-
});
|
|
940
|
+
search$(expression, skip, count) {
|
|
941
|
+
let params = new HttpParams();
|
|
942
|
+
if (typeof skip === 'number') {
|
|
943
|
+
params = params.set('skip', '' + skip);
|
|
944
|
+
}
|
|
945
|
+
if (typeof count === 'number') {
|
|
946
|
+
params = params.set('count', '' + count);
|
|
947
|
+
}
|
|
948
|
+
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
|
1420
949
|
}
|
|
1421
|
-
|
|
950
|
+
create$(body) {
|
|
1422
951
|
return this.baseHttpService.api({
|
|
1423
|
-
url: `${this.
|
|
952
|
+
url: `${this.serviceUrl}`,
|
|
1424
953
|
method: 'post',
|
|
1425
954
|
body,
|
|
1426
955
|
});
|
|
1427
956
|
}
|
|
1428
|
-
|
|
1429
|
-
* Run active procedure against QuoteDraft
|
|
1430
|
-
* @param body
|
|
1431
|
-
* @returns
|
|
1432
|
-
*/
|
|
1433
|
-
apply$(body) {
|
|
957
|
+
update$(body) {
|
|
1434
958
|
return this.baseHttpService.api({
|
|
1435
|
-
url: `${this.
|
|
1436
|
-
method: '
|
|
959
|
+
url: `${this.serviceUrl}/${body.id}`,
|
|
960
|
+
method: 'put',
|
|
1437
961
|
body,
|
|
1438
962
|
});
|
|
1439
963
|
}
|
|
1440
|
-
fetchDefaultPricingSteps$() {
|
|
1441
|
-
return this.baseHttpService.api({
|
|
1442
|
-
url: `${this.ADMIN_SERVICE_URL}/pricing-steps`,
|
|
1443
|
-
method: 'get',
|
|
1444
|
-
});
|
|
1445
|
-
}
|
|
1446
964
|
}
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type:
|
|
965
|
+
PromotionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
966
|
+
PromotionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService });
|
|
967
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService, decorators: [{
|
|
1450
968
|
type: Injectable
|
|
1451
969
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
1452
970
|
|
|
1453
|
-
class
|
|
971
|
+
class RebateProgramApiService {
|
|
1454
972
|
constructor(baseHttpService) {
|
|
1455
973
|
this.baseHttpService = baseHttpService;
|
|
1456
|
-
this.serviceUrl = '/
|
|
1457
|
-
this.
|
|
1458
|
-
|
|
1459
|
-
params = params.append('count', payload.count);
|
|
1460
|
-
params = params.append('skip', payload.skip);
|
|
1461
|
-
if (payload.name) {
|
|
1462
|
-
params = params.append('name', payload.name);
|
|
1463
|
-
}
|
|
1464
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}`, params });
|
|
1465
|
-
};
|
|
1466
|
-
this.searchProducts$ = (expression, skip, count) => {
|
|
1467
|
-
let params = new HttpParams();
|
|
1468
|
-
params = params.set('skip', '' + skip);
|
|
1469
|
-
params = params.set('count', '' + count);
|
|
1470
|
-
return this.baseHttpService.api({
|
|
1471
|
-
method: 'post',
|
|
1472
|
-
url: `${this.serviceUrl}/search`,
|
|
1473
|
-
params: params,
|
|
1474
|
-
body: expression,
|
|
1475
|
-
});
|
|
1476
|
-
};
|
|
1477
|
-
this.fetchProduct$ = (id) => this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
|
1478
|
-
this.fetchAttributes$ = () => {
|
|
1479
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/attributes/definition` });
|
|
1480
|
-
};
|
|
1481
|
-
this.searchAttributes$ = (expression, skip, count) => {
|
|
1482
|
-
let params = new HttpParams();
|
|
1483
|
-
params = params.set('skip', '' + skip);
|
|
1484
|
-
params = params.set('count', '' + count);
|
|
1485
|
-
return this.baseHttpService.api({
|
|
1486
|
-
method: 'post',
|
|
1487
|
-
url: `${this.serviceUrl}/attributes/definition/search`,
|
|
1488
|
-
params: params,
|
|
1489
|
-
body: expression,
|
|
1490
|
-
});
|
|
1491
|
-
};
|
|
1492
|
-
this.fetchAttributesByModel = (modelId) => {
|
|
1493
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/attributes/definition/forModel/${modelId}` });
|
|
1494
|
-
};
|
|
1495
|
-
this.createNewProduct$ = (productData) => {
|
|
1496
|
-
return this.baseHttpService.api({
|
|
1497
|
-
url: `${this.serviceUrl}`,
|
|
1498
|
-
method: 'post',
|
|
1499
|
-
body: productData,
|
|
1500
|
-
});
|
|
974
|
+
this.serviceUrl = '/admin/rebate-program';
|
|
975
|
+
this.fetchAll$ = () => {
|
|
976
|
+
return this.baseHttpService.api({ url: this.serviceUrl });
|
|
1501
977
|
};
|
|
1502
|
-
this.
|
|
1503
|
-
return this.baseHttpService.api({
|
|
1504
|
-
url: `${this.serviceUrl}/${body.id}`,
|
|
1505
|
-
method: 'put',
|
|
1506
|
-
body,
|
|
1507
|
-
});
|
|
978
|
+
this.fetchOne$ = (id) => {
|
|
979
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
|
1508
980
|
};
|
|
1509
|
-
this.
|
|
981
|
+
this.remove$ = (id) => {
|
|
1510
982
|
return this.baseHttpService.api({
|
|
1511
983
|
url: `${this.serviceUrl}/${id}`,
|
|
1512
984
|
method: 'delete',
|
|
1513
985
|
});
|
|
1514
986
|
};
|
|
1515
|
-
this.
|
|
987
|
+
this.restore$ = (id) => {
|
|
1516
988
|
return this.baseHttpService.api({
|
|
1517
|
-
url: `${this.serviceUrl}/${id}/restore`,
|
|
1518
989
|
method: 'patch',
|
|
990
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
|
1519
991
|
});
|
|
1520
992
|
};
|
|
1521
|
-
this.
|
|
1522
|
-
return this.baseHttpService
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
body: attributeData,
|
|
1526
|
-
});
|
|
1527
|
-
};
|
|
1528
|
-
this.updateProductAttribute$ = (attributeData) => {
|
|
1529
|
-
return this.baseHttpService.api({
|
|
1530
|
-
url: `${this.serviceUrl}/attributes/${attributeData.id}`,
|
|
1531
|
-
method: 'put',
|
|
1532
|
-
body: attributeData,
|
|
1533
|
-
});
|
|
1534
|
-
};
|
|
1535
|
-
this.removeProductAttribute$ = (id) => {
|
|
1536
|
-
return this.baseHttpService.api({
|
|
1537
|
-
url: `${this.serviceUrl}/attributes/${id}`,
|
|
1538
|
-
method: 'delete',
|
|
1539
|
-
});
|
|
1540
|
-
};
|
|
1541
|
-
this.createNewAttribute$ = (attributeData) => {
|
|
1542
|
-
return this.baseHttpService.api({
|
|
1543
|
-
url: `${this.serviceUrl}/attributes/definition`,
|
|
993
|
+
this.duplicate$ = (body) => {
|
|
994
|
+
return this.baseHttpService
|
|
995
|
+
.api({
|
|
996
|
+
url: `${this.serviceUrl}/${body.id}/clone`,
|
|
1544
997
|
method: 'post',
|
|
1545
|
-
body: attributeData,
|
|
1546
|
-
});
|
|
1547
|
-
};
|
|
1548
|
-
this.updateAttribute$ = (body) => {
|
|
1549
|
-
return this.baseHttpService.api({
|
|
1550
|
-
url: `${this.serviceUrl}/attributes/definition/${body.id}`,
|
|
1551
|
-
method: 'put',
|
|
1552
998
|
body,
|
|
1553
|
-
})
|
|
1554
|
-
|
|
1555
|
-
this.removeAttribute$ = (id) => {
|
|
1556
|
-
return this.baseHttpService.api({
|
|
1557
|
-
url: `${this.serviceUrl}/attributes/definition/${id}`,
|
|
1558
|
-
method: 'delete',
|
|
1559
|
-
});
|
|
1560
|
-
};
|
|
1561
|
-
this.restoreAttribute$ = (id) => {
|
|
1562
|
-
return this.baseHttpService.api({
|
|
1563
|
-
url: `${this.serviceUrl}/attributes/definition/${id}/restore`,
|
|
1564
|
-
method: 'patch',
|
|
1565
|
-
});
|
|
999
|
+
})
|
|
1000
|
+
.pipe(map$1(response => response.clonedRecordId));
|
|
1566
1001
|
};
|
|
1567
1002
|
}
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
method: 'post',
|
|
1573
|
-
url: `${this.serviceUrl}/${productId}/image`,
|
|
1574
|
-
body: data,
|
|
1575
|
-
});
|
|
1576
|
-
}
|
|
1577
|
-
removeImage$(productId) {
|
|
1578
|
-
return this.baseHttpService.api({
|
|
1579
|
-
method: 'delete',
|
|
1580
|
-
url: `${this.serviceUrl}/${productId}/image`,
|
|
1581
|
-
});
|
|
1582
|
-
}
|
|
1583
|
-
fetchImage$(productId) {
|
|
1584
|
-
return this.baseHttpService.api({
|
|
1585
|
-
url: this.getImageUrl(productId),
|
|
1586
|
-
method: 'get',
|
|
1587
|
-
responseType: 'blob',
|
|
1588
|
-
errorHandler: noop,
|
|
1589
|
-
});
|
|
1590
|
-
}
|
|
1591
|
-
getImageUrl(productId) {
|
|
1592
|
-
return `${this.serviceUrl}/${productId}/image`;
|
|
1593
|
-
}
|
|
1594
|
-
}
|
|
1595
|
-
ProductApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1596
|
-
ProductApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService });
|
|
1597
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService, decorators: [{
|
|
1598
|
-
type: Injectable
|
|
1599
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
1600
|
-
|
|
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}`;
|
|
1003
|
+
search$(expression, skip, count) {
|
|
1004
|
+
let params = new HttpParams();
|
|
1005
|
+
if (typeof skip === 'number') {
|
|
1006
|
+
params = params.set('skip', '' + skip);
|
|
1693
1007
|
}
|
|
1694
|
-
|
|
1695
|
-
|
|
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}`;
|
|
1008
|
+
if (typeof count === 'number') {
|
|
1009
|
+
params = params.set('count', '' + count);
|
|
1706
1010
|
}
|
|
1707
|
-
return this.
|
|
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
|
-
});
|
|
1011
|
+
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
|
1792
1012
|
}
|
|
1793
|
-
|
|
1794
|
-
return this.
|
|
1013
|
+
create$(body) {
|
|
1014
|
+
return this.baseHttpService.api({
|
|
1015
|
+
url: `${this.serviceUrl}`,
|
|
1795
1016
|
method: 'post',
|
|
1796
|
-
|
|
1797
|
-
body: {
|
|
1798
|
-
pml,
|
|
1799
|
-
rootType,
|
|
1800
|
-
configurationMode,
|
|
1801
|
-
},
|
|
1802
|
-
responseType: 'text',
|
|
1017
|
+
body,
|
|
1803
1018
|
});
|
|
1804
1019
|
}
|
|
1805
|
-
|
|
1806
|
-
return this.
|
|
1807
|
-
|
|
1808
|
-
|
|
1020
|
+
update$(body) {
|
|
1021
|
+
return this.baseHttpService.api({
|
|
1022
|
+
url: `${this.serviceUrl}/${body.id}`,
|
|
1023
|
+
method: 'put',
|
|
1024
|
+
body,
|
|
1809
1025
|
});
|
|
1810
1026
|
}
|
|
1811
1027
|
}
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModelApiService, decorators: [{
|
|
1028
|
+
RebateProgramApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1029
|
+
RebateProgramApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService });
|
|
1030
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, decorators: [{
|
|
1816
1031
|
type: Injectable
|
|
1817
1032
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
1818
1033
|
|
|
1819
|
-
class
|
|
1034
|
+
class RebateTypeApiService {
|
|
1820
1035
|
constructor(baseHttpService) {
|
|
1821
1036
|
this.baseHttpService = baseHttpService;
|
|
1822
|
-
this.serviceUrl = '/admin/
|
|
1037
|
+
this.serviceUrl = '/admin/rebate-type';
|
|
1823
1038
|
this.fetchAll$ = () => {
|
|
1824
1039
|
return this.baseHttpService.api({ url: this.serviceUrl });
|
|
1825
1040
|
};
|
|
@@ -1873,495 +1088,28 @@ class PromotionsApiService {
|
|
|
1873
1088
|
});
|
|
1874
1089
|
}
|
|
1875
1090
|
}
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type:
|
|
1091
|
+
RebateTypeApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1092
|
+
RebateTypeApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService });
|
|
1093
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, decorators: [{
|
|
1879
1094
|
type: Injectable
|
|
1880
1095
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
1881
1096
|
|
|
1882
|
-
class
|
|
1883
|
-
constructor(
|
|
1884
|
-
this.
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
getQuoteState(objectId, params, options) {
|
|
1894
|
-
return this.httpService.api(Object.assign({ method: 'get', url: `/v2${this.SERVICE_URL}/${objectId}`, params }, options));
|
|
1895
|
-
}
|
|
1896
|
-
upsertQuote(request, options) {
|
|
1897
|
-
return this.httpService.api(Object.assign({ method: 'post', url: `${this.SERVICE_URL}`, body: request }, options));
|
|
1898
|
-
}
|
|
1899
|
-
submitQuote(request, options) {
|
|
1900
|
-
return this.httpService.api(Object.assign({ method: 'post', url: `${this.SERVICE_URL}/submit`, body: request }, options));
|
|
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));
|
|
1930
|
-
}
|
|
1931
|
-
}
|
|
1932
|
-
RampApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RampApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1933
|
-
RampApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RampApiService });
|
|
1934
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RampApiService, decorators: [{
|
|
1935
|
-
type: Injectable
|
|
1936
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
1937
|
-
|
|
1938
|
-
class RebateProgramApiService {
|
|
1939
|
-
constructor(baseHttpService) {
|
|
1940
|
-
this.baseHttpService = baseHttpService;
|
|
1941
|
-
this.serviceUrl = '/admin/rebate-program';
|
|
1942
|
-
this.fetchAll$ = () => {
|
|
1943
|
-
return this.baseHttpService.api({ url: this.serviceUrl });
|
|
1944
|
-
};
|
|
1945
|
-
this.fetchOne$ = (id) => {
|
|
1946
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
|
1947
|
-
};
|
|
1948
|
-
this.remove$ = (id) => {
|
|
1949
|
-
return this.baseHttpService.api({
|
|
1950
|
-
url: `${this.serviceUrl}/${id}`,
|
|
1951
|
-
method: 'delete',
|
|
1952
|
-
});
|
|
1953
|
-
};
|
|
1954
|
-
this.restore$ = (id) => {
|
|
1955
|
-
return this.baseHttpService.api({
|
|
1956
|
-
method: 'patch',
|
|
1957
|
-
url: `${this.serviceUrl}/${id}/restore`,
|
|
1958
|
-
});
|
|
1959
|
-
};
|
|
1960
|
-
this.duplicate$ = (body) => {
|
|
1961
|
-
return this.baseHttpService
|
|
1962
|
-
.api({
|
|
1963
|
-
url: `${this.serviceUrl}/${body.id}/clone`,
|
|
1964
|
-
method: 'post',
|
|
1965
|
-
body,
|
|
1966
|
-
})
|
|
1967
|
-
.pipe(map$1(response => response.clonedRecordId));
|
|
1968
|
-
};
|
|
1969
|
-
}
|
|
1970
|
-
search$(expression, skip, count) {
|
|
1971
|
-
let params = new HttpParams();
|
|
1972
|
-
if (typeof skip === 'number') {
|
|
1973
|
-
params = params.set('skip', '' + skip);
|
|
1974
|
-
}
|
|
1975
|
-
if (typeof count === 'number') {
|
|
1976
|
-
params = params.set('count', '' + count);
|
|
1977
|
-
}
|
|
1978
|
-
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
|
1979
|
-
}
|
|
1980
|
-
create$(body) {
|
|
1981
|
-
return this.baseHttpService.api({
|
|
1982
|
-
url: `${this.serviceUrl}`,
|
|
1983
|
-
method: 'post',
|
|
1984
|
-
body,
|
|
1985
|
-
});
|
|
1986
|
-
}
|
|
1987
|
-
update$(body) {
|
|
1988
|
-
return this.baseHttpService.api({
|
|
1989
|
-
url: `${this.serviceUrl}/${body.id}`,
|
|
1990
|
-
method: 'put',
|
|
1991
|
-
body,
|
|
1992
|
-
});
|
|
1993
|
-
}
|
|
1994
|
-
}
|
|
1995
|
-
RebateProgramApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1996
|
-
RebateProgramApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService });
|
|
1997
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, decorators: [{
|
|
1998
|
-
type: Injectable
|
|
1999
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
2000
|
-
|
|
2001
|
-
class RebateTypeApiService {
|
|
2002
|
-
constructor(baseHttpService) {
|
|
2003
|
-
this.baseHttpService = baseHttpService;
|
|
2004
|
-
this.serviceUrl = '/admin/rebate-type';
|
|
2005
|
-
this.fetchAll$ = () => {
|
|
2006
|
-
return this.baseHttpService.api({ url: this.serviceUrl });
|
|
2007
|
-
};
|
|
2008
|
-
this.fetchOne$ = (id) => {
|
|
2009
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
|
2010
|
-
};
|
|
2011
|
-
this.remove$ = (id) => {
|
|
2012
|
-
return this.baseHttpService.api({
|
|
2013
|
-
url: `${this.serviceUrl}/${id}`,
|
|
2014
|
-
method: 'delete',
|
|
2015
|
-
});
|
|
2016
|
-
};
|
|
2017
|
-
this.restore$ = (id) => {
|
|
2018
|
-
return this.baseHttpService.api({
|
|
2019
|
-
method: 'patch',
|
|
2020
|
-
url: `${this.serviceUrl}/${id}/restore`,
|
|
2021
|
-
});
|
|
2022
|
-
};
|
|
2023
|
-
this.duplicate$ = (body) => {
|
|
2024
|
-
return this.baseHttpService
|
|
2025
|
-
.api({
|
|
2026
|
-
url: `${this.serviceUrl}/${body.id}/clone`,
|
|
2027
|
-
method: 'post',
|
|
2028
|
-
body,
|
|
2029
|
-
})
|
|
2030
|
-
.pipe(map$1(response => response.clonedRecordId));
|
|
2031
|
-
};
|
|
2032
|
-
}
|
|
2033
|
-
search$(expression, skip, count) {
|
|
2034
|
-
let params = new HttpParams();
|
|
2035
|
-
if (typeof skip === 'number') {
|
|
2036
|
-
params = params.set('skip', '' + skip);
|
|
2037
|
-
}
|
|
2038
|
-
if (typeof count === 'number') {
|
|
2039
|
-
params = params.set('count', '' + count);
|
|
2040
|
-
}
|
|
2041
|
-
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
|
2042
|
-
}
|
|
2043
|
-
create$(body) {
|
|
2044
|
-
return this.baseHttpService.api({
|
|
2045
|
-
url: `${this.serviceUrl}`,
|
|
2046
|
-
method: 'post',
|
|
2047
|
-
body,
|
|
2048
|
-
});
|
|
2049
|
-
}
|
|
2050
|
-
update$(body) {
|
|
2051
|
-
return this.baseHttpService.api({
|
|
2052
|
-
url: `${this.serviceUrl}/${body.id}`,
|
|
2053
|
-
method: 'put',
|
|
2054
|
-
body,
|
|
2055
|
-
});
|
|
2056
|
-
}
|
|
2057
|
-
}
|
|
2058
|
-
RebateTypeApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2059
|
-
RebateTypeApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService });
|
|
2060
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, decorators: [{
|
|
2061
|
-
type: Injectable
|
|
2062
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
2063
|
-
|
|
2064
|
-
class RlmApiService {
|
|
2065
|
-
constructor(baseHttpService) {
|
|
2066
|
-
this.baseHttpService = baseHttpService;
|
|
2067
|
-
this.serviceUrl = '/rlm';
|
|
2068
|
-
}
|
|
2069
|
-
fetchContextDefinitions$() {
|
|
2070
|
-
return this.baseHttpService
|
|
2071
|
-
.api({ url: `${this.serviceUrl}/context`, skipErrorHandler: true })
|
|
2072
|
-
.pipe(catchError(() => {
|
|
2073
|
-
return of([]);
|
|
2074
|
-
}));
|
|
2075
|
-
}
|
|
2076
|
-
fetchContextMappings$(id) {
|
|
2077
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/context/${id}/mappings` });
|
|
2078
|
-
}
|
|
2079
|
-
fetchContextDefinitionStructure$(id) {
|
|
2080
|
-
return this.baseHttpService
|
|
2081
|
-
.api({
|
|
2082
|
-
url: `${this.serviceUrl}/context/${id}/structure/details`,
|
|
2083
|
-
skipErrorHandler: true,
|
|
2084
|
-
})
|
|
2085
|
-
.pipe(catchError(() => {
|
|
2086
|
-
return of([]);
|
|
2087
|
-
}), map(objects => {
|
|
2088
|
-
return objects.map(object => {
|
|
2089
|
-
var _a, _b;
|
|
2090
|
-
const tag = (_b = (_a = object.tags) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.title;
|
|
2091
|
-
const objectAttributes = object.attributes || [];
|
|
2092
|
-
return {
|
|
2093
|
-
id: object.id,
|
|
2094
|
-
title: tag || object.title,
|
|
2095
|
-
attributes: objectAttributes.map(attribute => {
|
|
2096
|
-
var _a, _b;
|
|
2097
|
-
const tag = (_b = (_a = attribute.tags) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.title;
|
|
2098
|
-
return {
|
|
2099
|
-
title: tag || attribute.title,
|
|
2100
|
-
fieldType: attribute.fieldType,
|
|
2101
|
-
dataType: attribute.dataType,
|
|
2102
|
-
};
|
|
2103
|
-
}),
|
|
2104
|
-
};
|
|
2105
|
-
});
|
|
2106
|
-
}));
|
|
2107
|
-
}
|
|
2108
|
-
fetchRlmProcedures(contextDefinitionId) {
|
|
2109
|
-
const params = {};
|
|
2110
|
-
if (contextDefinitionId) {
|
|
2111
|
-
params['contextDefinitionId'] = contextDefinitionId;
|
|
2112
|
-
}
|
|
2113
|
-
return this.baseHttpService.api({
|
|
2114
|
-
url: `${this.serviceUrl}/procedures`,
|
|
2115
|
-
params,
|
|
2116
|
-
});
|
|
2117
|
-
}
|
|
2118
|
-
}
|
|
2119
|
-
RlmApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2120
|
-
RlmApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmApiService });
|
|
2121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmApiService, decorators: [{
|
|
2122
|
-
type: Injectable
|
|
2123
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
2124
|
-
|
|
2125
|
-
class RlmQuoteApiService {
|
|
2126
|
-
constructor(httpService) {
|
|
2127
|
-
this.httpService = httpService;
|
|
2128
|
-
this.SERVICE_URL = '/quotes/rlm';
|
|
2129
|
-
}
|
|
2130
|
-
getQuote(mappingType, objectId, contextMappingId, options) {
|
|
2131
|
-
const params = { mappingType };
|
|
2132
|
-
if (contextMappingId) {
|
|
2133
|
-
params['contextMappingId'] = contextMappingId;
|
|
2134
|
-
}
|
|
2135
|
-
return this.httpService.api(Object.assign({ method: 'get', url: `${this.SERVICE_URL}/${objectId}`, params }, options));
|
|
2136
|
-
}
|
|
2137
|
-
}
|
|
2138
|
-
RlmQuoteApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmQuoteApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2139
|
-
RlmQuoteApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmQuoteApiService });
|
|
2140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmQuoteApiService, decorators: [{
|
|
2141
|
-
type: Injectable
|
|
2142
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
2143
|
-
|
|
2144
|
-
class RuleGroupsApiService {
|
|
2145
|
-
constructor(baseHttpService) {
|
|
2146
|
-
this.baseHttpService = baseHttpService;
|
|
2147
|
-
this.serviceUrl = '/admin/rule-groups';
|
|
2148
|
-
this.fetchRuleGroups$ = () => {
|
|
2149
|
-
return this.searchRuleGroups$(new Expression(), 0, 100);
|
|
2150
|
-
};
|
|
2151
|
-
this.searchRuleGroups$ = (expression, skip, count) => {
|
|
2152
|
-
let params = new HttpParams();
|
|
2153
|
-
params = params.set('skip', '' + skip);
|
|
2154
|
-
params = params.set('count', '' + count);
|
|
2155
|
-
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
|
2156
|
-
};
|
|
2157
|
-
this.createRuleGroup$ = (ruleGroup) => {
|
|
2158
|
-
return this.baseHttpService.api({
|
|
2159
|
-
url: `${this.serviceUrl}`,
|
|
2160
|
-
method: 'post',
|
|
2161
|
-
body: ruleGroup,
|
|
2162
|
-
});
|
|
2163
|
-
};
|
|
2164
|
-
this.updateRuleGroup$ = (ruleGroup) => {
|
|
2165
|
-
return this.baseHttpService.api({
|
|
2166
|
-
url: `${this.serviceUrl}/${ruleGroup.id}`,
|
|
2167
|
-
method: 'post',
|
|
2168
|
-
body: ruleGroup,
|
|
2169
|
-
});
|
|
2170
|
-
};
|
|
2171
|
-
this.duplicateRuleGroup$ = (body) => {
|
|
2172
|
-
return this.baseHttpService
|
|
2173
|
-
.api({
|
|
2174
|
-
url: `${this.serviceUrl}/${body.id}/clone`,
|
|
2175
|
-
method: 'post',
|
|
2176
|
-
body,
|
|
2177
|
-
})
|
|
2178
|
-
.pipe(map$1(response => response.clonedRecordId));
|
|
2179
|
-
};
|
|
2180
|
-
this.removeRuleGroup$ = (id) => {
|
|
2181
|
-
return this.baseHttpService.api({
|
|
2182
|
-
url: `${this.serviceUrl}/${id}`,
|
|
2183
|
-
method: 'delete',
|
|
2184
|
-
});
|
|
2185
|
-
};
|
|
2186
|
-
this.restoreRuleGroup$ = (id) => {
|
|
2187
|
-
return this.baseHttpService.api({
|
|
2188
|
-
url: `${this.serviceUrl}/${id}/restore`,
|
|
2189
|
-
method: 'patch',
|
|
2190
|
-
});
|
|
2191
|
-
};
|
|
2192
|
-
}
|
|
2193
|
-
}
|
|
2194
|
-
RuleGroupsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2195
|
-
RuleGroupsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService });
|
|
2196
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService, decorators: [{
|
|
2197
|
-
type: Injectable
|
|
2198
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
2199
|
-
|
|
2200
|
-
class RulesApiService {
|
|
2201
|
-
constructor(baseHttpService) {
|
|
2202
|
-
this.baseHttpService = baseHttpService;
|
|
2203
|
-
this.serviceUrl = '/admin/rules';
|
|
2204
|
-
this.fetchRules$ = () => {
|
|
2205
|
-
return this.searchRules$(new Expression(), 0, 100);
|
|
2206
|
-
};
|
|
2207
|
-
this.searchRules$ = (expression, skip, count) => {
|
|
2208
|
-
let params = new HttpParams();
|
|
2209
|
-
if (typeof skip === 'number') {
|
|
2210
|
-
params = params.set('skip', '' + skip);
|
|
2211
|
-
}
|
|
2212
|
-
if (typeof count === 'number') {
|
|
2213
|
-
params = params.set('count', '' + count);
|
|
2214
|
-
}
|
|
2215
|
-
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
|
2216
|
-
};
|
|
2217
|
-
this.createRule$ = (rule) => {
|
|
2218
|
-
return this.baseHttpService.api({
|
|
2219
|
-
url: `${this.serviceUrl}`,
|
|
2220
|
-
method: 'post',
|
|
2221
|
-
body: rule,
|
|
2222
|
-
});
|
|
2223
|
-
};
|
|
2224
|
-
this.updateRule$ = (rule) => {
|
|
2225
|
-
return this.baseHttpService.api({
|
|
2226
|
-
url: `${this.serviceUrl}/${rule.id}`,
|
|
2227
|
-
method: 'put',
|
|
2228
|
-
body: rule,
|
|
2229
|
-
});
|
|
2230
|
-
};
|
|
2231
|
-
this.duplicateRule$ = (body) => {
|
|
2232
|
-
return this.baseHttpService
|
|
2233
|
-
.api({
|
|
2234
|
-
url: `${this.serviceUrl}/${body.id}/clone`,
|
|
2235
|
-
method: 'post',
|
|
2236
|
-
body,
|
|
2237
|
-
})
|
|
2238
|
-
.pipe(map(response => response.clonedRecordId));
|
|
2239
|
-
};
|
|
2240
|
-
this.removeRule$ = (id) => {
|
|
2241
|
-
return this.baseHttpService.api({
|
|
2242
|
-
url: `${this.serviceUrl}/${id}`,
|
|
2243
|
-
method: 'delete',
|
|
2244
|
-
});
|
|
2245
|
-
};
|
|
2246
|
-
this.restoreRule$ = (id) => {
|
|
2247
|
-
return this.baseHttpService.api({
|
|
2248
|
-
url: `${this.serviceUrl}/${id}/restore`,
|
|
2249
|
-
method: 'patch',
|
|
2250
|
-
});
|
|
2251
|
-
};
|
|
2252
|
-
}
|
|
2253
|
-
fetchRule$(id) {
|
|
2254
|
-
return this.baseHttpService.api({
|
|
2255
|
-
url: `${this.serviceUrl}/${id}`,
|
|
2256
|
-
method: 'get',
|
|
2257
|
-
});
|
|
2258
|
-
}
|
|
2259
|
-
fetchHeaderFields$() {
|
|
2260
|
-
return this.baseHttpService.api({
|
|
2261
|
-
url: `${this.serviceUrl}/describe/Header`,
|
|
2262
|
-
method: 'get',
|
|
2263
|
-
});
|
|
2264
|
-
}
|
|
2265
|
-
execute$(body) {
|
|
2266
|
-
const url = this.getExecuteRuleUrl(body.rule.ruleGroupType);
|
|
2267
|
-
return this.baseHttpService.api({
|
|
2268
|
-
url,
|
|
2269
|
-
method: 'post',
|
|
2270
|
-
body,
|
|
2271
|
-
});
|
|
2272
|
-
}
|
|
2273
|
-
getExecuteRuleUrl(ruleGroupType) {
|
|
2274
|
-
if (ruleGroupType === RuleGroupTypes.eligibility) {
|
|
2275
|
-
return '/rules/eligibility/execute';
|
|
2276
|
-
}
|
|
2277
|
-
if (ruleGroupType === RuleGroupTypes.catalog) {
|
|
2278
|
-
return '/rules/catalog/execute';
|
|
2279
|
-
}
|
|
2280
|
-
if (ruleGroupType === RuleGroupTypes.rlmContextBased) {
|
|
2281
|
-
return '/rules/rlm/execute';
|
|
2282
|
-
}
|
|
2283
|
-
return '/rules/execute';
|
|
2284
|
-
}
|
|
2285
|
-
}
|
|
2286
|
-
RulesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2287
|
-
RulesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService });
|
|
2288
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService, decorators: [{
|
|
2289
|
-
type: Injectable
|
|
2290
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
2291
|
-
|
|
2292
|
-
class SalesforceApiService {
|
|
2293
|
-
constructor(httpService) {
|
|
2294
|
-
this.httpService = httpService;
|
|
2295
|
-
this.SERVICE_URL = '/proxy';
|
|
2296
|
-
}
|
|
2297
|
-
query(searchRequest, objectName, options) {
|
|
2298
|
-
return this.httpService.api(Object.assign({ method: 'post', body: Object.assign(Object.assign({}, searchRequest), { count: searchRequest.count || 100 }), url: `${this.SERVICE_URL}/query/${objectName}` }, options));
|
|
2299
|
-
}
|
|
2300
|
-
queryObjects(search, options) {
|
|
2301
|
-
let params = new HttpParams();
|
|
2302
|
-
if (search) {
|
|
2303
|
-
params = params.append('search', search);
|
|
2304
|
-
}
|
|
2305
|
-
return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/query`, params }, options));
|
|
2306
|
-
}
|
|
2307
|
-
search(req, options) {
|
|
2308
|
-
return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/rest/search`, params: { q: req.searchString } }, options));
|
|
2309
|
-
}
|
|
2310
|
-
describeObject(objectName, options) {
|
|
2311
|
-
const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields`;
|
|
2312
|
-
return this.httpService.api(Object.assign({ url: methodUrl }, options));
|
|
2313
|
-
}
|
|
2314
|
-
describeField(objectName, fieldName, options) {
|
|
2315
|
-
const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields/${fieldName}`;
|
|
2316
|
-
return this.httpService.api(Object.assign({ url: methodUrl }, options));
|
|
2317
|
-
}
|
|
2318
|
-
describe2(objectName, fields, options) {
|
|
2319
|
-
const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields`;
|
|
2320
|
-
return this.httpService.api(Object.assign({ method: 'post', url: methodUrl, body: fields }, options));
|
|
2321
|
-
}
|
|
2322
|
-
apexGetRequest(path, params, options) {
|
|
2323
|
-
// this line is needed because HttpParams instance from Integration behaves wrong in studio instance of Angular
|
|
2324
|
-
const httpParams = new HttpParams({ fromString: params.toString() });
|
|
2325
|
-
return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/apex${path}`, params: httpParams }, options));
|
|
2326
|
-
}
|
|
2327
|
-
apexPostRequest(path, body, options) {
|
|
2328
|
-
return this.httpService.api(Object.assign({ method: 'post', body, url: `${this.SERVICE_URL}/apex${path}` }, options));
|
|
2329
|
-
}
|
|
2330
|
-
getGlobalPicklists() {
|
|
2331
|
-
return this.httpService.api({
|
|
2332
|
-
method: 'get',
|
|
2333
|
-
url: `${this.SERVICE_URL}/globalvalueset`,
|
|
2334
|
-
});
|
|
2335
|
-
}
|
|
2336
|
-
getGlobalPicklistValues(id) {
|
|
2337
|
-
return this.httpService.api({
|
|
2338
|
-
method: 'get',
|
|
2339
|
-
url: `${this.SERVICE_URL}/globalvalueset/${id}/values`,
|
|
2340
|
-
});
|
|
2341
|
-
}
|
|
2342
|
-
}
|
|
2343
|
-
SalesforceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2344
|
-
SalesforceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService });
|
|
2345
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, decorators: [{
|
|
2346
|
-
type: Injectable
|
|
2347
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
2348
|
-
|
|
2349
|
-
class SandboxManagerApiService {
|
|
2350
|
-
constructor(messageService) {
|
|
2351
|
-
this.messageService = messageService;
|
|
2352
|
-
/**
|
|
2353
|
-
* Shows an error message using the message service.
|
|
2354
|
-
*
|
|
2355
|
-
* @param {string} message - the error message to be published.
|
|
2356
|
-
*/
|
|
2357
|
-
this.publishErrorMessage = (message) => {
|
|
2358
|
-
this.messageService.add({ severity: 'error', summary: message, sticky: true });
|
|
2359
|
-
};
|
|
1097
|
+
class SandboxManagerApiService {
|
|
1098
|
+
constructor(messageService) {
|
|
1099
|
+
this.messageService = messageService;
|
|
1100
|
+
/**
|
|
1101
|
+
* Shows an error message using the message service.
|
|
1102
|
+
*
|
|
1103
|
+
* @param {string} message - the error message to be published.
|
|
1104
|
+
*/
|
|
1105
|
+
this.publishErrorMessage = (message) => {
|
|
1106
|
+
this.messageService.add({ severity: 'error', summary: message, sticky: true });
|
|
1107
|
+
};
|
|
2360
1108
|
}
|
|
2361
1109
|
getSalesforceOrganizations$() {
|
|
2362
1110
|
try {
|
|
2363
1111
|
return window.doSandboxCall
|
|
2364
|
-
? from(window.doSandboxCall('orgs', '', 'GET')).pipe(map$1(response => handleCanvasResponse(response, [], this.publishErrorMessage)), catchError
|
|
1112
|
+
? from(window.doSandboxCall('orgs', '', 'GET')).pipe(map$1(response => handleCanvasResponse(response, [], this.publishErrorMessage)), catchError(() => of([])))
|
|
2365
1113
|
: of([]);
|
|
2366
1114
|
}
|
|
2367
1115
|
catch (_a) {
|
|
@@ -2371,7 +1119,7 @@ class SandboxManagerApiService {
|
|
|
2371
1119
|
getAvailableSalesforceOrganizationSizes$() {
|
|
2372
1120
|
try {
|
|
2373
1121
|
return window.doSandboxCall
|
|
2374
|
-
? from(window.doSandboxCall('available-sizes', '', 'GET')).pipe(map$1(response => handleCanvasResponse(response, {}, this.publishErrorMessage)), catchError
|
|
1122
|
+
? from(window.doSandboxCall('available-sizes', '', 'GET')).pipe(map$1(response => handleCanvasResponse(response, {}, this.publishErrorMessage)), catchError(() => of({})))
|
|
2375
1123
|
: of({});
|
|
2376
1124
|
}
|
|
2377
1125
|
catch (_a) {
|
|
@@ -2381,7 +1129,7 @@ class SandboxManagerApiService {
|
|
|
2381
1129
|
createSalesforceOrganization$(payload) {
|
|
2382
1130
|
try {
|
|
2383
1131
|
return window.doSandboxCall
|
|
2384
|
-
? from(window.doSandboxCall('orgs', JSON.stringify(payload), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError
|
|
1132
|
+
? from(window.doSandboxCall('orgs', JSON.stringify(payload), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError(() => of(undefined)))
|
|
2385
1133
|
: of(undefined);
|
|
2386
1134
|
}
|
|
2387
1135
|
catch (err) {
|
|
@@ -2391,7 +1139,7 @@ class SandboxManagerApiService {
|
|
|
2391
1139
|
updateSalesforceOrganization$(payload) {
|
|
2392
1140
|
try {
|
|
2393
1141
|
return window.doSandboxCall
|
|
2394
|
-
? from(window.doSandboxCall(`orgs/${payload.orgId}`, JSON.stringify(payload), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError
|
|
1142
|
+
? from(window.doSandboxCall(`orgs/${payload.orgId}`, JSON.stringify(payload), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError(() => of(undefined)))
|
|
2395
1143
|
: of(undefined);
|
|
2396
1144
|
}
|
|
2397
1145
|
catch (_a) {
|
|
@@ -2401,7 +1149,7 @@ class SandboxManagerApiService {
|
|
|
2401
1149
|
deleteSalesforceOrganization$(payload) {
|
|
2402
1150
|
try {
|
|
2403
1151
|
return window.doSandboxCall
|
|
2404
|
-
? from(window.doSandboxCall(`orgs/${payload.orgId}`, '', 'DELETE')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError
|
|
1152
|
+
? from(window.doSandboxCall(`orgs/${payload.orgId}`, '', 'DELETE')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError(() => of(undefined)))
|
|
2405
1153
|
: of(undefined);
|
|
2406
1154
|
}
|
|
2407
1155
|
catch (_a) {
|
|
@@ -2411,130 +1159,29 @@ class SandboxManagerApiService {
|
|
|
2411
1159
|
activateSalesforceOrganization$(payload) {
|
|
2412
1160
|
try {
|
|
2413
1161
|
return window.doSandboxCall
|
|
2414
|
-
? from(window.doSandboxCall(`orgs/${payload.orgId}/activate`, JSON.stringify({}), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError
|
|
2415
|
-
: of(undefined);
|
|
2416
|
-
}
|
|
2417
|
-
catch (_a) {
|
|
2418
|
-
return of(undefined);
|
|
2419
|
-
}
|
|
2420
|
-
}
|
|
2421
|
-
deactivateSalesforceOrganization$(payload) {
|
|
2422
|
-
try {
|
|
2423
|
-
return window.doSandboxCall
|
|
2424
|
-
? from(window.doSandboxCall(`orgs/${payload.orgId}/deactivate`, JSON.stringify({}), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
|
|
1162
|
+
? from(window.doSandboxCall(`orgs/${payload.orgId}/activate`, JSON.stringify({}), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError(() => of(undefined)))
|
|
2425
1163
|
: of(undefined);
|
|
2426
1164
|
}
|
|
2427
1165
|
catch (_a) {
|
|
2428
1166
|
return of(undefined);
|
|
2429
1167
|
}
|
|
2430
1168
|
}
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
}
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
this.baseHttpService = baseHttpService;
|
|
2441
|
-
this.serviceUrl = '/admin/scripts';
|
|
2442
|
-
this.fetchScripts$ = () => {
|
|
2443
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}` });
|
|
2444
|
-
};
|
|
2445
|
-
this.searchScripts$ = (expression, skip, count) => {
|
|
2446
|
-
let params = new HttpParams();
|
|
2447
|
-
if (typeof skip === 'number') {
|
|
2448
|
-
params = params.set('skip', '' + skip);
|
|
2449
|
-
}
|
|
2450
|
-
if (typeof count === 'number') {
|
|
2451
|
-
params = params.set('count', '' + count);
|
|
2452
|
-
}
|
|
2453
|
-
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
|
2454
|
-
};
|
|
2455
|
-
this.fetchScript$ = (id) => {
|
|
2456
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
|
2457
|
-
};
|
|
2458
|
-
this.createScript$ = (script) => {
|
|
2459
|
-
return this.baseHttpService.api({
|
|
2460
|
-
url: `${this.serviceUrl}`,
|
|
2461
|
-
method: 'post',
|
|
2462
|
-
body: script,
|
|
2463
|
-
});
|
|
2464
|
-
};
|
|
2465
|
-
this.updateScriptMeta$ = (script) => {
|
|
2466
|
-
return this.baseHttpService.api({
|
|
2467
|
-
url: `${this.serviceUrl}/${script.id}`,
|
|
2468
|
-
method: 'put',
|
|
2469
|
-
body: script,
|
|
2470
|
-
});
|
|
2471
|
-
};
|
|
2472
|
-
this.updateScriptDetails$ = (script) => {
|
|
2473
|
-
return this.baseHttpService.api({
|
|
2474
|
-
url: `${this.serviceUrl}/${script.id}`,
|
|
2475
|
-
method: 'put',
|
|
2476
|
-
body: script,
|
|
2477
|
-
});
|
|
2478
|
-
};
|
|
2479
|
-
this.cloneScript$ = (cloneRequest) => {
|
|
2480
|
-
return this.baseHttpService
|
|
2481
|
-
.api({
|
|
2482
|
-
url: `${this.serviceUrl}/${cloneRequest.id}/clone`,
|
|
2483
|
-
method: 'post',
|
|
2484
|
-
body: cloneRequest,
|
|
2485
|
-
})
|
|
2486
|
-
.pipe(map(response => response.clonedRecordId));
|
|
2487
|
-
};
|
|
2488
|
-
this.removeScript$ = (id) => {
|
|
2489
|
-
return this.baseHttpService.api({
|
|
2490
|
-
url: `${this.serviceUrl}/${id}`,
|
|
2491
|
-
method: 'delete',
|
|
2492
|
-
});
|
|
2493
|
-
};
|
|
2494
|
-
this.restoreScript$ = (id) => {
|
|
2495
|
-
return this.baseHttpService.api({
|
|
2496
|
-
url: `${this.serviceUrl}/${id}/restore`,
|
|
2497
|
-
method: 'patch',
|
|
2498
|
-
});
|
|
2499
|
-
};
|
|
2500
|
-
this.execute$ = (body) => {
|
|
2501
|
-
return this.baseHttpService.api({
|
|
2502
|
-
url: `/scripts/execute`,
|
|
2503
|
-
method: 'post',
|
|
2504
|
-
body,
|
|
2505
|
-
errorHandler: () => null,
|
|
2506
|
-
});
|
|
2507
|
-
};
|
|
2508
|
-
}
|
|
2509
|
-
}
|
|
2510
|
-
ScriptsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2511
|
-
ScriptsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService });
|
|
2512
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService, decorators: [{
|
|
2513
|
-
type: Injectable
|
|
2514
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
2515
|
-
|
|
2516
|
-
class ShoppingCartSettingsApiService {
|
|
2517
|
-
constructor(configurationSettingsApiService) {
|
|
2518
|
-
this.configurationSettingsApiService = configurationSettingsApiService;
|
|
2519
|
-
this.shoppingCartSettingsKey = 'shopping-cart';
|
|
2520
|
-
}
|
|
2521
|
-
getSetting(id) {
|
|
2522
|
-
return this.fetchSettings().pipe(map((settings) => parseJsonSafely(settings === null || settings === void 0 ? void 0 : settings.value, [])), map(settings => settings.find(setting => setting.id == id)));
|
|
2523
|
-
}
|
|
2524
|
-
fetchSettings() {
|
|
2525
|
-
return this.configurationSettingsApiService.fetchSetting(this.shoppingCartSettingsKey, { skipErrorHandler: true });
|
|
2526
|
-
}
|
|
2527
|
-
getSettingsMap() {
|
|
2528
|
-
return this.fetchSettings().pipe(map((settings) => parseJsonSafely(settings === null || settings === void 0 ? void 0 : settings.value, [])), map((settings) => settings.reduce((acc, setting) => {
|
|
2529
|
-
return Object.assign(Object.assign({}, acc), { [setting.id]: setting.properties });
|
|
2530
|
-
}, {})));
|
|
1169
|
+
deactivateSalesforceOrganization$(payload) {
|
|
1170
|
+
try {
|
|
1171
|
+
return window.doSandboxCall
|
|
1172
|
+
? from(window.doSandboxCall(`orgs/${payload.orgId}/deactivate`, JSON.stringify({}), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError(() => of(undefined)))
|
|
1173
|
+
: of(undefined);
|
|
1174
|
+
}
|
|
1175
|
+
catch (_a) {
|
|
1176
|
+
return of(undefined);
|
|
1177
|
+
}
|
|
2531
1178
|
}
|
|
2532
1179
|
}
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type:
|
|
1180
|
+
SandboxManagerApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SandboxManagerApiService, deps: [{ token: i1$2.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1181
|
+
SandboxManagerApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SandboxManagerApiService });
|
|
1182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SandboxManagerApiService, decorators: [{
|
|
2536
1183
|
type: Injectable
|
|
2537
|
-
}], ctorParameters: function () { return [{ type:
|
|
1184
|
+
}], ctorParameters: function () { return [{ type: i1$2.MessageService }]; } });
|
|
2538
1185
|
|
|
2539
1186
|
class StatefulConfigurationApiService {
|
|
2540
1187
|
constructor(httpService) {
|
|
@@ -2584,486 +1231,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
2584
1231
|
type: Injectable
|
|
2585
1232
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
2586
1233
|
|
|
2587
|
-
class UIDefinitionsApiService {
|
|
2588
|
-
constructor(baseHttpService) {
|
|
2589
|
-
this.baseHttpService = baseHttpService;
|
|
2590
|
-
}
|
|
2591
|
-
fetch$(modelId, version) {
|
|
2592
|
-
const serviceUrl = this.getServiceUrl(modelId);
|
|
2593
|
-
let params = new HttpParams();
|
|
2594
|
-
if (version != null) {
|
|
2595
|
-
params = params.set('modelVersion', version);
|
|
2596
|
-
}
|
|
2597
|
-
return this.baseHttpService
|
|
2598
|
-
.api({
|
|
2599
|
-
method: 'get',
|
|
2600
|
-
url: serviceUrl,
|
|
2601
|
-
params: params,
|
|
2602
|
-
})
|
|
2603
|
-
.pipe(map$1(containers => containers.map(uiDefinitionFromDTO)));
|
|
2604
|
-
}
|
|
2605
|
-
create$(modelId, uiDefinitionContainer) {
|
|
2606
|
-
const serviceUrl = this.getServiceUrl(modelId);
|
|
2607
|
-
const dto = Object.assign(Object.assign({}, omit(uiDefinitionContainer, 'source')), { sourceBlob: JSON.stringify(uiDefinitionContainer.source) });
|
|
2608
|
-
return this.baseHttpService
|
|
2609
|
-
.api({
|
|
2610
|
-
method: 'post',
|
|
2611
|
-
url: serviceUrl,
|
|
2612
|
-
body: dto,
|
|
2613
|
-
})
|
|
2614
|
-
.pipe(map$1(container => uiDefinitionFromDTO(container)));
|
|
2615
|
-
}
|
|
2616
|
-
get$(modelId, uiDefinitionId) {
|
|
2617
|
-
const serviceUrl = this.getServiceUrl(modelId);
|
|
2618
|
-
return this.baseHttpService
|
|
2619
|
-
.api({
|
|
2620
|
-
method: 'get',
|
|
2621
|
-
url: `${serviceUrl}/${uiDefinitionId}`,
|
|
2622
|
-
})
|
|
2623
|
-
.pipe(map$1(container => uiDefinitionFromDTO(Object.assign(Object.assign({}, container), { id: uiDefinitionId }))));
|
|
2624
|
-
}
|
|
2625
|
-
update$(uiDefinitionContainer) {
|
|
2626
|
-
const serviceUrl = this.getServiceUrl(uiDefinitionContainer.modelId);
|
|
2627
|
-
const dto = uiDefinitionToDTO(uiDefinitionContainer);
|
|
2628
|
-
return this.baseHttpService
|
|
2629
|
-
.api({
|
|
2630
|
-
method: 'put',
|
|
2631
|
-
url: `${serviceUrl}/${uiDefinitionContainer.id}`,
|
|
2632
|
-
body: dto,
|
|
2633
|
-
})
|
|
2634
|
-
.pipe(map$1(container => uiDefinitionFromDTO(container)));
|
|
2635
|
-
}
|
|
2636
|
-
delete$(uiDefinitionContainer) {
|
|
2637
|
-
const serviceUrl = this.getServiceUrl(uiDefinitionContainer.modelId);
|
|
2638
|
-
return this.baseHttpService.api({
|
|
2639
|
-
method: 'delete',
|
|
2640
|
-
url: `${serviceUrl}/${uiDefinitionContainer.id}`,
|
|
2641
|
-
});
|
|
2642
|
-
}
|
|
2643
|
-
getServiceUrl(modelId) {
|
|
2644
|
-
return `/models/${modelId}/uidefinitions`;
|
|
2645
|
-
}
|
|
2646
|
-
}
|
|
2647
|
-
UIDefinitionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2648
|
-
UIDefinitionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService });
|
|
2649
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService, decorators: [{
|
|
2650
|
-
type: Injectable
|
|
2651
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
2652
|
-
|
|
2653
|
-
const fromUIComponentStoryDTO = (dto, attachments) => {
|
|
2654
|
-
return {
|
|
2655
|
-
id: dto.id,
|
|
2656
|
-
name: dto.name,
|
|
2657
|
-
uiComponentId: dto.uiComponentId,
|
|
2658
|
-
description: dto.description,
|
|
2659
|
-
section: attachments.json,
|
|
2660
|
-
template: attachments.html,
|
|
2661
|
-
script: attachments.js,
|
|
2662
|
-
styles: attachments.css,
|
|
2663
|
-
};
|
|
2664
|
-
};
|
|
2665
|
-
|
|
2666
|
-
class UITemplatesApiService {
|
|
2667
|
-
constructor(baseHttpService) {
|
|
2668
|
-
this.baseHttpService = baseHttpService;
|
|
2669
|
-
this.serviceUrl = '/uitemplates';
|
|
2670
|
-
this.fetchTemplates$ = (name) => {
|
|
2671
|
-
let params = new HttpParams();
|
|
2672
|
-
if (name) {
|
|
2673
|
-
params = params.append('name', name);
|
|
2674
|
-
}
|
|
2675
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}`, params });
|
|
2676
|
-
};
|
|
2677
|
-
this.createTemplate$ = (template) => {
|
|
2678
|
-
return this.baseHttpService.api({
|
|
2679
|
-
method: 'post',
|
|
2680
|
-
url: `${this.serviceUrl}`,
|
|
2681
|
-
body: template,
|
|
2682
|
-
});
|
|
2683
|
-
};
|
|
2684
|
-
this.updateTemplate$ = (template) => {
|
|
2685
|
-
return this.baseHttpService.api({
|
|
2686
|
-
method: 'put',
|
|
2687
|
-
url: `${this.serviceUrl}/${template.id}`,
|
|
2688
|
-
body: template,
|
|
2689
|
-
});
|
|
2690
|
-
};
|
|
2691
|
-
this.duplicateTemplate$ = (template, cloneRequest) => {
|
|
2692
|
-
return this.baseHttpService
|
|
2693
|
-
.api({
|
|
2694
|
-
url: `${this.serviceUrl}/${template.id}/clone`,
|
|
2695
|
-
method: 'post',
|
|
2696
|
-
body: cloneRequest,
|
|
2697
|
-
})
|
|
2698
|
-
.pipe(map$1(response => response.clonedRecordId));
|
|
2699
|
-
};
|
|
2700
|
-
this.removeTemplate$ = (id) => {
|
|
2701
|
-
return this.baseHttpService.api({
|
|
2702
|
-
method: 'delete',
|
|
2703
|
-
url: `${this.serviceUrl}/${id}`,
|
|
2704
|
-
});
|
|
2705
|
-
};
|
|
2706
|
-
this.restoreTemplate$ = (id) => {
|
|
2707
|
-
return this.baseHttpService.api({
|
|
2708
|
-
method: 'patch',
|
|
2709
|
-
url: `${this.serviceUrl}/${id}`,
|
|
2710
|
-
});
|
|
2711
|
-
};
|
|
2712
|
-
this.searchTemplates$ = (data) => {
|
|
2713
|
-
return this.baseHttpService.api({
|
|
2714
|
-
method: 'post',
|
|
2715
|
-
url: `${this.serviceUrl}/search`,
|
|
2716
|
-
params: data.params,
|
|
2717
|
-
body: data.expression,
|
|
2718
|
-
});
|
|
2719
|
-
};
|
|
2720
|
-
this.fetchComponents$ = (templateId, name) => {
|
|
2721
|
-
let params = new HttpParams();
|
|
2722
|
-
if (name) {
|
|
2723
|
-
params = params.append('name', name);
|
|
2724
|
-
}
|
|
2725
|
-
return this.baseHttpService.api({
|
|
2726
|
-
url: `${this.serviceUrl}/${templateId}/components`,
|
|
2727
|
-
params,
|
|
2728
|
-
});
|
|
2729
|
-
};
|
|
2730
|
-
this.fetchComponent$ = (templateId, componentId) => {
|
|
2731
|
-
return this.baseHttpService.api({
|
|
2732
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}`,
|
|
2733
|
-
});
|
|
2734
|
-
};
|
|
2735
|
-
this.createComponent$ = (component) => {
|
|
2736
|
-
return this.baseHttpService.api({
|
|
2737
|
-
method: 'post',
|
|
2738
|
-
url: `${this.serviceUrl}/${component.uiTemplateId}/components`,
|
|
2739
|
-
body: component,
|
|
2740
|
-
});
|
|
2741
|
-
};
|
|
2742
|
-
this.updateComponent$ = (component) => {
|
|
2743
|
-
return this.baseHttpService.api({
|
|
2744
|
-
method: 'put',
|
|
2745
|
-
url: `${this.serviceUrl}/${component.uiTemplateId}/components/${component.id}`,
|
|
2746
|
-
body: component,
|
|
2747
|
-
});
|
|
2748
|
-
};
|
|
2749
|
-
this.duplicateComponent$ = (component, cloneRequest) => {
|
|
2750
|
-
return this.baseHttpService
|
|
2751
|
-
.api({
|
|
2752
|
-
url: `${this.serviceUrl}/${component.uiTemplateId}/components/${component.id}/clone`,
|
|
2753
|
-
method: 'post',
|
|
2754
|
-
body: cloneRequest,
|
|
2755
|
-
})
|
|
2756
|
-
.pipe(map$1(response => response.clonedRecordId));
|
|
2757
|
-
};
|
|
2758
|
-
this.removeComponent$ = (templateId, componentId) => {
|
|
2759
|
-
return this.baseHttpService.api({
|
|
2760
|
-
method: 'delete',
|
|
2761
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}`,
|
|
2762
|
-
});
|
|
2763
|
-
};
|
|
2764
|
-
this.restoreComponent$ = (templateId, componentId) => {
|
|
2765
|
-
return this.baseHttpService.api({
|
|
2766
|
-
method: 'patch',
|
|
2767
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}`,
|
|
2768
|
-
});
|
|
2769
|
-
};
|
|
2770
|
-
this.searchComponents$ = (templateId, data) => {
|
|
2771
|
-
return this.baseHttpService.api({
|
|
2772
|
-
method: 'post',
|
|
2773
|
-
url: `${this.serviceUrl}/${templateId}/components/search`,
|
|
2774
|
-
params: data.params,
|
|
2775
|
-
body: data.expression,
|
|
2776
|
-
});
|
|
2777
|
-
};
|
|
2778
|
-
this.fetchStoryAttachment = (templateId, componentId, storyId, type) => {
|
|
2779
|
-
return this.baseHttpService
|
|
2780
|
-
.api({
|
|
2781
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories/${storyId}/attachments/${type}/file`,
|
|
2782
|
-
responseType: 'text',
|
|
2783
|
-
errorHandler: noop,
|
|
2784
|
-
})
|
|
2785
|
-
.pipe(catchError$1(() => of('')));
|
|
2786
|
-
};
|
|
2787
|
-
this.convertToComponentStory$ = (templateId, componentId, storyDto) => {
|
|
2788
|
-
return forkJoin([
|
|
2789
|
-
this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'html'),
|
|
2790
|
-
this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'js'),
|
|
2791
|
-
this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'css'),
|
|
2792
|
-
this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'json'),
|
|
2793
|
-
]).pipe(map$1(([html, js, css, json]) => ({ html, js, css, json })), map$1(attachments => fromUIComponentStoryDTO(storyDto, attachments)));
|
|
2794
|
-
};
|
|
2795
|
-
this.fetchStories$ = (templateId, componentId, name) => {
|
|
2796
|
-
let params = new HttpParams();
|
|
2797
|
-
if (name) {
|
|
2798
|
-
params = params.append('name', name);
|
|
2799
|
-
}
|
|
2800
|
-
return this.baseHttpService
|
|
2801
|
-
.api({
|
|
2802
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories`,
|
|
2803
|
-
params,
|
|
2804
|
-
})
|
|
2805
|
-
.pipe(switchMap(dtos => {
|
|
2806
|
-
if (!dtos.length) {
|
|
2807
|
-
return of([]);
|
|
2808
|
-
}
|
|
2809
|
-
return forkJoin(dtos.map(dto => this.convertToComponentStory$(templateId, componentId, dto)));
|
|
2810
|
-
}));
|
|
2811
|
-
};
|
|
2812
|
-
this.fetchStory$ = (templateId, componentId, storyId) => {
|
|
2813
|
-
return this.baseHttpService
|
|
2814
|
-
.api({
|
|
2815
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories/${storyId}`,
|
|
2816
|
-
})
|
|
2817
|
-
.pipe(switchMap(dto => this.convertToComponentStory$(templateId, componentId, dto)));
|
|
2818
|
-
};
|
|
2819
|
-
this.createComponentStory$ = (templateId, story) => {
|
|
2820
|
-
return this.baseHttpService.api({
|
|
2821
|
-
method: 'post',
|
|
2822
|
-
url: `${this.serviceUrl}/${templateId}/components/${story.uiComponentId}/stories`,
|
|
2823
|
-
body: story,
|
|
2824
|
-
});
|
|
2825
|
-
};
|
|
2826
|
-
this.updateComponentStory$ = (templateId, story) => {
|
|
2827
|
-
const { script, template, styles, section } = story, rest = __rest(story, ["script", "template", "styles", "section"]);
|
|
2828
|
-
return this.baseHttpService
|
|
2829
|
-
.api({
|
|
2830
|
-
method: 'put',
|
|
2831
|
-
url: `${this.serviceUrl}/${templateId}/components/${story.uiComponentId}/stories/${story.id}`,
|
|
2832
|
-
body: rest,
|
|
2833
|
-
})
|
|
2834
|
-
.pipe(map$1(dto => fromUIComponentStoryDTO(dto, { html: template, js: script, css: styles, json: section })));
|
|
2835
|
-
};
|
|
2836
|
-
this.duplicateComponentStory$ = (story, cloneRequest) => {
|
|
2837
|
-
return this.baseHttpService
|
|
2838
|
-
.api({
|
|
2839
|
-
url: `${this.serviceUrl}/${story.template}/components/${story.uiComponentId}/stories/${story.id}/clone`,
|
|
2840
|
-
method: 'post',
|
|
2841
|
-
body: cloneRequest,
|
|
2842
|
-
})
|
|
2843
|
-
.pipe(map$1(response => response.clonedRecordId));
|
|
2844
|
-
};
|
|
2845
|
-
this.deleteComponentStory$ = (templateId, componentId, storyId) => {
|
|
2846
|
-
return this.baseHttpService.api({
|
|
2847
|
-
method: 'delete',
|
|
2848
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories/${storyId}`,
|
|
2849
|
-
});
|
|
2850
|
-
};
|
|
2851
|
-
this.restoreComponentStory$ = (templateId, componentId, storyId) => {
|
|
2852
|
-
return this.baseHttpService.api({
|
|
2853
|
-
method: 'patch',
|
|
2854
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories/${storyId}`,
|
|
2855
|
-
});
|
|
2856
|
-
};
|
|
2857
|
-
this.uploadStoryAttachments$ = (templateId, componentId, storyId, attachments) => {
|
|
2858
|
-
const formData = new FormData();
|
|
2859
|
-
if (attachments.html != null) {
|
|
2860
|
-
formData.append('html', new Blob([attachments.html]), 'story-template.html');
|
|
2861
|
-
}
|
|
2862
|
-
if (attachments.css != null) {
|
|
2863
|
-
formData.append('css', new Blob([attachments.css]), 'story-styles.css');
|
|
2864
|
-
}
|
|
2865
|
-
if (attachments.js != null) {
|
|
2866
|
-
formData.append('js', new Blob([attachments.js]), 'story-script.js');
|
|
2867
|
-
}
|
|
2868
|
-
if (attachments.json != null) {
|
|
2869
|
-
formData.append('json', new Blob([attachments.json]), 'story-section.json');
|
|
2870
|
-
}
|
|
2871
|
-
return this.baseHttpService.upload({
|
|
2872
|
-
method: 'post',
|
|
2873
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories/${storyId}/attachments`,
|
|
2874
|
-
body: formData,
|
|
2875
|
-
});
|
|
2876
|
-
};
|
|
2877
|
-
this.fetchComponentAttachments$ = (templateId, component) => {
|
|
2878
|
-
return forkJoin([
|
|
2879
|
-
this.fetchComponentAttachmentFile$(templateId, component.id, 'html'),
|
|
2880
|
-
this.fetchComponentAttachmentFile$(templateId, component.id, 'js'),
|
|
2881
|
-
this.fetchComponentAttachmentFile$(templateId, component.id, 'css'),
|
|
2882
|
-
this.fetchComponentAttachmentFile$(templateId, component.id, 'json'),
|
|
2883
|
-
]).pipe(map$1(([html, js, css, json]) => ({ html, js, css, json })));
|
|
2884
|
-
};
|
|
2885
|
-
this.fetchComponentsAttachments$ = (templateId) => {
|
|
2886
|
-
return this.fetchComponents$(templateId).pipe(switchMap(components => {
|
|
2887
|
-
return forkJoin(components.map(component => this.fetchComponentAttachments$(templateId, component)));
|
|
2888
|
-
}));
|
|
2889
|
-
};
|
|
2890
|
-
this.fetchComponentAttachmentFile$ = (templateId, componentId, attachmentType) => {
|
|
2891
|
-
return this.baseHttpService
|
|
2892
|
-
.api({
|
|
2893
|
-
method: 'get',
|
|
2894
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}/attachments/${attachmentType}/file`,
|
|
2895
|
-
responseType: 'text',
|
|
2896
|
-
errorHandler: noop,
|
|
2897
|
-
})
|
|
2898
|
-
.pipe(catchError$1(() => of('')));
|
|
2899
|
-
};
|
|
2900
|
-
this.uploadComponentAttachments$ = (templateId, componentId, attachments) => {
|
|
2901
|
-
const formData = new FormData();
|
|
2902
|
-
if (attachments.html != null) {
|
|
2903
|
-
formData.append('html', new Blob([attachments.html]), 'template.html');
|
|
2904
|
-
}
|
|
2905
|
-
if (attachments.css != null) {
|
|
2906
|
-
formData.append('css', new Blob([attachments.css]), 'styles.css');
|
|
2907
|
-
}
|
|
2908
|
-
if (attachments.js != null) {
|
|
2909
|
-
formData.append('js', new Blob([attachments.js]), 'script.js');
|
|
2910
|
-
}
|
|
2911
|
-
if (attachments.json != null) {
|
|
2912
|
-
formData.append('json', new Blob([attachments.json]), 'section.json');
|
|
2913
|
-
}
|
|
2914
|
-
return this.baseHttpService.upload({
|
|
2915
|
-
method: 'post',
|
|
2916
|
-
url: `${this.serviceUrl}/${templateId}/components/${componentId}/attachments`,
|
|
2917
|
-
body: formData,
|
|
2918
|
-
});
|
|
2919
|
-
};
|
|
2920
|
-
}
|
|
2921
|
-
getTemplateThumbnailUrl(templateId) {
|
|
2922
|
-
return `${this.serviceUrl}/${templateId}/thumbnail/file`;
|
|
2923
|
-
}
|
|
2924
|
-
attachTemplateThumbnail$(templateId, file) {
|
|
2925
|
-
const data = new FormData();
|
|
2926
|
-
data.append('thumb', file);
|
|
2927
|
-
return this.baseHttpService.upload({
|
|
2928
|
-
method: 'post',
|
|
2929
|
-
url: `${this.serviceUrl}/${templateId}/thumbnail`,
|
|
2930
|
-
body: data,
|
|
2931
|
-
});
|
|
2932
|
-
}
|
|
2933
|
-
removeTemplateThumbnail$(templateId) {
|
|
2934
|
-
return this.baseHttpService.api({
|
|
2935
|
-
method: 'delete',
|
|
2936
|
-
url: `${this.serviceUrl}/${templateId}/thumbnail`,
|
|
2937
|
-
});
|
|
2938
|
-
}
|
|
2939
|
-
}
|
|
2940
|
-
UITemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2941
|
-
UITemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService });
|
|
2942
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService, decorators: [{
|
|
2943
|
-
type: Injectable
|
|
2944
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
2945
|
-
|
|
2946
|
-
class VeloceObjectsApiService {
|
|
2947
|
-
constructor(baseHttpService) {
|
|
2948
|
-
this.baseHttpService = baseHttpService;
|
|
2949
|
-
this.serviceUrl = '/veloceobjects';
|
|
2950
|
-
this.updateCategory$ = (category) => {
|
|
2951
|
-
return this.baseHttpService.api({
|
|
2952
|
-
method: 'put',
|
|
2953
|
-
url: `${this.serviceUrl}/categories/${category.id}`,
|
|
2954
|
-
body: category,
|
|
2955
|
-
});
|
|
2956
|
-
};
|
|
2957
|
-
this.deleteCategory$ = (id) => {
|
|
2958
|
-
return this.baseHttpService.api({
|
|
2959
|
-
method: 'delete',
|
|
2960
|
-
url: `${this.serviceUrl}/categories/${id}`,
|
|
2961
|
-
});
|
|
2962
|
-
};
|
|
2963
|
-
this.searchObjects$ = (searchParams, expression) => {
|
|
2964
|
-
const params = new HttpParams({ fromObject: Object.assign({}, searchParams) });
|
|
2965
|
-
return this.baseHttpService.api({
|
|
2966
|
-
method: 'post',
|
|
2967
|
-
url: `${this.serviceUrl}/search`,
|
|
2968
|
-
params,
|
|
2969
|
-
body: expression || {},
|
|
2970
|
-
});
|
|
2971
|
-
};
|
|
2972
|
-
this.deleteObject$ = (id) => {
|
|
2973
|
-
return this.baseHttpService.api({
|
|
2974
|
-
method: 'delete',
|
|
2975
|
-
url: `${this.serviceUrl}/${id}`,
|
|
2976
|
-
});
|
|
2977
|
-
};
|
|
2978
|
-
this.duplicateObject$ = (body) => {
|
|
2979
|
-
return this.baseHttpService
|
|
2980
|
-
.api({
|
|
2981
|
-
method: 'post',
|
|
2982
|
-
url: `${this.serviceUrl}/${body.id}/clone`,
|
|
2983
|
-
body,
|
|
2984
|
-
})
|
|
2985
|
-
.pipe(map(response => response.clonedRecordId));
|
|
2986
|
-
};
|
|
2987
|
-
this.restoreObject$ = (id) => {
|
|
2988
|
-
return this.baseHttpService.api({
|
|
2989
|
-
method: 'patch',
|
|
2990
|
-
url: `${this.serviceUrl}/${id}/restore`,
|
|
2991
|
-
});
|
|
2992
|
-
};
|
|
2993
|
-
}
|
|
2994
|
-
fetchCategories$() {
|
|
2995
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/categories` });
|
|
2996
|
-
}
|
|
2997
|
-
createCategory$(category) {
|
|
2998
|
-
return this.baseHttpService.api({
|
|
2999
|
-
method: 'post',
|
|
3000
|
-
url: `${this.serviceUrl}/categories`,
|
|
3001
|
-
body: category,
|
|
3002
|
-
});
|
|
3003
|
-
}
|
|
3004
|
-
fetchObjects$() {
|
|
3005
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}` });
|
|
3006
|
-
}
|
|
3007
|
-
fetchObject$(id) {
|
|
3008
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
|
3009
|
-
}
|
|
3010
|
-
createObject$(object) {
|
|
3011
|
-
return this.baseHttpService.api({
|
|
3012
|
-
method: 'post',
|
|
3013
|
-
url: `${this.serviceUrl}`,
|
|
3014
|
-
body: object,
|
|
3015
|
-
});
|
|
3016
|
-
}
|
|
3017
|
-
updateObject$(object) {
|
|
3018
|
-
return this.baseHttpService.api({
|
|
3019
|
-
method: 'put',
|
|
3020
|
-
url: `${this.serviceUrl}/${object.id}`,
|
|
3021
|
-
body: object,
|
|
3022
|
-
});
|
|
3023
|
-
}
|
|
3024
|
-
}
|
|
3025
|
-
VeloceObjectsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3026
|
-
VeloceObjectsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService });
|
|
3027
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService, decorators: [{
|
|
3028
|
-
type: Injectable
|
|
3029
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
3030
|
-
|
|
3031
1234
|
class ApiModule {
|
|
3032
1235
|
}
|
|
3033
1236
|
ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3034
|
-
ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, imports: [HttpClientModule] });
|
|
1237
|
+
ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, imports: [HttpClientModule, ApiV2Module] });
|
|
3035
1238
|
ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, providers: [
|
|
3036
1239
|
BaseHttpService,
|
|
3037
1240
|
XrayService,
|
|
3038
|
-
ConfigurationApiService,
|
|
3039
|
-
ConfigurationSettingsApiService,
|
|
3040
|
-
ContextApiService,
|
|
3041
1241
|
DocumentAttachmentApiService,
|
|
3042
|
-
PriceApiService,
|
|
3043
|
-
ProductModelApiService,
|
|
3044
|
-
ProceduresApiService,
|
|
3045
|
-
QuoteApiService,
|
|
3046
|
-
RampApiService,
|
|
3047
|
-
SalesforceApiService,
|
|
3048
|
-
UITemplatesApiService,
|
|
3049
|
-
ScriptsApiService,
|
|
3050
|
-
RulesApiService,
|
|
3051
|
-
RuleGroupsApiService,
|
|
3052
|
-
FlowsApiService,
|
|
3053
1242
|
GuidedSellingsAdminApiService,
|
|
3054
|
-
ShoppingCartSettingsApiService,
|
|
3055
|
-
ProductApiService,
|
|
3056
1243
|
CatalogAdminApiService,
|
|
3057
1244
|
GuidedSellingApiService,
|
|
3058
1245
|
CatalogApiService,
|
|
3059
|
-
DeltaApiService,
|
|
3060
1246
|
AccountApiService,
|
|
3061
|
-
PicklistsApiService,
|
|
3062
|
-
EndpointsApiService,
|
|
3063
1247
|
OrgInfoApiService,
|
|
3064
1248
|
OffersApiService,
|
|
3065
|
-
UIDefinitionsApiService,
|
|
3066
|
-
VeloceObjectsApiService,
|
|
3067
1249
|
StatefulConfigurationApiService,
|
|
3068
1250
|
RebateProgramApiService,
|
|
3069
1251
|
RebateTypeApiService,
|
|
@@ -3071,48 +1253,24 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
|
|
3071
1253
|
VeloceAuthService,
|
|
3072
1254
|
ContractedPriceApiService,
|
|
3073
1255
|
PortalsApiService,
|
|
3074
|
-
ConfigurationProcessorsApiService,
|
|
3075
1256
|
FlowStateApiService,
|
|
3076
1257
|
SandboxManagerApiService,
|
|
3077
|
-
|
|
3078
|
-
RlmQuoteApiService,
|
|
3079
|
-
], imports: [HttpClientModule] });
|
|
1258
|
+
], imports: [HttpClientModule, ApiV2Module] });
|
|
3080
1259
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, decorators: [{
|
|
3081
1260
|
type: NgModule,
|
|
3082
1261
|
args: [{
|
|
3083
|
-
imports: [HttpClientModule],
|
|
1262
|
+
imports: [HttpClientModule, ApiV2Module],
|
|
3084
1263
|
providers: [
|
|
3085
1264
|
BaseHttpService,
|
|
3086
1265
|
XrayService,
|
|
3087
|
-
ConfigurationApiService,
|
|
3088
|
-
ConfigurationSettingsApiService,
|
|
3089
|
-
ContextApiService,
|
|
3090
1266
|
DocumentAttachmentApiService,
|
|
3091
|
-
PriceApiService,
|
|
3092
|
-
ProductModelApiService,
|
|
3093
|
-
ProceduresApiService,
|
|
3094
|
-
QuoteApiService,
|
|
3095
|
-
RampApiService,
|
|
3096
|
-
SalesforceApiService,
|
|
3097
|
-
UITemplatesApiService,
|
|
3098
|
-
ScriptsApiService,
|
|
3099
|
-
RulesApiService,
|
|
3100
|
-
RuleGroupsApiService,
|
|
3101
|
-
FlowsApiService,
|
|
3102
1267
|
GuidedSellingsAdminApiService,
|
|
3103
|
-
ShoppingCartSettingsApiService,
|
|
3104
|
-
ProductApiService,
|
|
3105
1268
|
CatalogAdminApiService,
|
|
3106
1269
|
GuidedSellingApiService,
|
|
3107
1270
|
CatalogApiService,
|
|
3108
|
-
DeltaApiService,
|
|
3109
1271
|
AccountApiService,
|
|
3110
|
-
PicklistsApiService,
|
|
3111
|
-
EndpointsApiService,
|
|
3112
1272
|
OrgInfoApiService,
|
|
3113
1273
|
OffersApiService,
|
|
3114
|
-
UIDefinitionsApiService,
|
|
3115
|
-
VeloceObjectsApiService,
|
|
3116
1274
|
StatefulConfigurationApiService,
|
|
3117
1275
|
RebateProgramApiService,
|
|
3118
1276
|
RebateTypeApiService,
|
|
@@ -3120,11 +1278,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3120
1278
|
VeloceAuthService,
|
|
3121
1279
|
ContractedPriceApiService,
|
|
3122
1280
|
PortalsApiService,
|
|
3123
|
-
ConfigurationProcessorsApiService,
|
|
3124
1281
|
FlowStateApiService,
|
|
3125
1282
|
SandboxManagerApiService,
|
|
3126
|
-
RlmApiService,
|
|
3127
|
-
RlmQuoteApiService,
|
|
3128
1283
|
],
|
|
3129
1284
|
}]
|
|
3130
1285
|
}] });
|
|
@@ -3133,5 +1288,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3133
1288
|
* Generated bundle index. Do not edit.
|
|
3134
1289
|
*/
|
|
3135
1290
|
|
|
3136
|
-
export { AccountApiService, ApiModule, CatalogAdminApiService, CatalogApiService,
|
|
1291
|
+
export { AccountApiService, ApiModule, CatalogAdminApiService, CatalogApiService, ContractedPriceApiService, DocumentAttachmentApiService, FlowStateApiService, GuidedSellingApiService, GuidedSellingsAdminApiService, OffersApiService, OrgInfoApiService, PortalsApiService, PromotionsApiService, RebateProgramApiService, RebateTypeApiService, SandboxManagerApiService, StatefulConfigurationApiService, VeloceAuthService, handleCanvasResponse };
|
|
3137
1292
|
//# sourceMappingURL=veloceapps-api.mjs.map
|