@veloceapps/api 1.0.2 → 2.0.1
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/bundles/veloce-api.umd.js +149 -60
- package/bundles/veloce-api.umd.js.map +1 -1
- package/esm2015/index.js +3 -1
- package/esm2015/lib/api.module.js +11 -5
- package/esm2015/lib/services/configuration-api.service.js +3 -3
- package/esm2015/lib/services/configuration-settings-api.service.js +3 -3
- package/esm2015/lib/services/context-api.service.js +3 -3
- package/esm2015/lib/services/document-attachment-api.service.js +3 -3
- package/esm2015/lib/services/document-templates-api.service.js +3 -3
- package/esm2015/lib/services/price-api.service.js +3 -3
- package/esm2015/lib/services/product-model-api.service.js +3 -3
- package/esm2015/lib/services/quote-api.service.js +3 -3
- package/esm2015/lib/services/ramp-api.service.js +3 -3
- package/esm2015/lib/services/rule-groups-api.service.js +33 -0
- package/esm2015/lib/services/rules-api.service.js +45 -0
- package/esm2015/lib/services/salesforce-api.service.js +3 -3
- package/esm2015/lib/services/scripts-api.service.js +3 -3
- package/esm2015/lib/services/ui-templates-api.service.js +36 -21
- package/esm2015/lib/types/ui-template-dto.types.js +1 -1
- package/esm2015/lib/utils/ui-template.utils.js +1 -5
- package/fesm2015/veloce-api.js +146 -63
- package/fesm2015/veloce-api.js.map +1 -1
- package/index.d.ts +2 -0
- package/lib/services/rule-groups-api.service.d.ts +13 -0
- package/lib/services/rules-api.service.d.ts +15 -0
- package/lib/services/ui-templates-api.service.d.ts +3 -2
- package/lib/types/ui-template-dto.types.d.ts +0 -4
- package/package.json +2 -2
package/fesm2015/veloce-api.js
CHANGED
@@ -3,8 +3,8 @@ import { HttpParams, HttpClientModule } from '@angular/common/http';
|
|
3
3
|
import * as i0 from '@angular/core';
|
4
4
|
import { Injectable, NgModule } from '@angular/core';
|
5
5
|
import * as i1 from '@veloce/core';
|
6
|
-
import { ModelTranslatorUtils, ConfigurationContextMode, QuoteDraft, DocxTemplater, StringUtils, ProductModelsContainer, ModelUtils, EntityUtil, BaseHttpService, XrayService } from '@veloce/core';
|
7
|
-
import { throwError, forkJoin, zip, of,
|
6
|
+
import { ModelTranslatorUtils, ConfigurationContextMode, QuoteDraft, DocxTemplater, StringUtils, ProductModelsContainer, ModelUtils, EntityUtil, Expression, BaseHttpService, XrayService } from '@veloce/core';
|
7
|
+
import { throwError, forkJoin, zip, of, map as map$1, noop, catchError as catchError$1, switchMap as switchMap$1 } from 'rxjs';
|
8
8
|
import { map, tap, defaultIfEmpty, switchMap, catchError } from 'rxjs/operators';
|
9
9
|
import * as _ from 'lodash';
|
10
10
|
import { transform } from 'lodash';
|
@@ -424,9 +424,9 @@ class ConfigurationApiService {
|
|
424
424
|
return Object.assign(Object.assign({}, lineItem), { lineItems: (_c = lineItem.lineItems) === null || _c === void 0 ? void 0 : _c.map(i => this.updatePortDomains(i, runtimeModel)), portDomains });
|
425
425
|
}
|
426
426
|
}
|
427
|
-
ConfigurationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
428
|
-
ConfigurationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
429
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
427
|
+
ConfigurationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ConfigurationApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
428
|
+
ConfigurationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ConfigurationApiService });
|
429
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ConfigurationApiService, decorators: [{
|
430
430
|
type: Injectable
|
431
431
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
432
432
|
|
@@ -510,9 +510,9 @@ class ConfigurationSettingsApiService {
|
|
510
510
|
});
|
511
511
|
}
|
512
512
|
}
|
513
|
-
ConfigurationSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
514
|
-
ConfigurationSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
515
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
513
|
+
ConfigurationSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ConfigurationSettingsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
514
|
+
ConfigurationSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ConfigurationSettingsApiService });
|
515
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ConfigurationSettingsApiService, decorators: [{
|
516
516
|
type: Injectable
|
517
517
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
518
518
|
|
@@ -532,9 +532,9 @@ class ContextApiService {
|
|
532
532
|
});
|
533
533
|
}
|
534
534
|
}
|
535
|
-
ContextApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
536
|
-
ContextApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
537
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
535
|
+
ContextApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
536
|
+
ContextApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextApiService });
|
537
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextApiService, decorators: [{
|
538
538
|
type: Injectable
|
539
539
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
540
540
|
|
@@ -593,9 +593,9 @@ class DocumentAttachmentApiService {
|
|
593
593
|
});
|
594
594
|
}
|
595
595
|
}
|
596
|
-
DocumentAttachmentApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
597
|
-
DocumentAttachmentApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
598
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
596
|
+
DocumentAttachmentApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DocumentAttachmentApiService, deps: [{ token: i1.BaseHttpService }, { token: i1.FileDownloadService }], target: i0.ɵɵFactoryTarget.Injectable });
|
597
|
+
DocumentAttachmentApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DocumentAttachmentApiService });
|
598
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DocumentAttachmentApiService, decorators: [{
|
599
599
|
type: Injectable
|
600
600
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i1.FileDownloadService }]; } });
|
601
601
|
|
@@ -640,9 +640,9 @@ class SalesforceApiService {
|
|
640
640
|
});
|
641
641
|
}
|
642
642
|
}
|
643
|
-
SalesforceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
644
|
-
SalesforceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
645
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
643
|
+
SalesforceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SalesforceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
644
|
+
SalesforceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SalesforceApiService });
|
645
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SalesforceApiService, decorators: [{
|
646
646
|
type: Injectable
|
647
647
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
648
648
|
|
@@ -906,9 +906,9 @@ class DocumentTemplatesApiService {
|
|
906
906
|
return this.sfRepo.query(searchRequest, objectName).pipe(mapSfQueryResult(limit), map(value => ({ [resultObjectName]: value })));
|
907
907
|
}
|
908
908
|
}
|
909
|
-
DocumentTemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
910
|
-
DocumentTemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
911
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
909
|
+
DocumentTemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DocumentTemplatesApiService, deps: [{ token: i1.BaseHttpService }, { token: SalesforceApiService }, { token: i1.FileDownloadService }, { token: DocumentAttachmentApiService }, { token: i4.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
910
|
+
DocumentTemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DocumentTemplatesApiService });
|
911
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DocumentTemplatesApiService, decorators: [{
|
912
912
|
type: Injectable
|
913
913
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: SalesforceApiService }, { type: i1.FileDownloadService }, { type: DocumentAttachmentApiService }, { type: i4.HttpClient }]; } });
|
914
914
|
|
@@ -989,9 +989,9 @@ class PriceApiService {
|
|
989
989
|
});
|
990
990
|
}
|
991
991
|
}
|
992
|
-
PriceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
993
|
-
PriceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
994
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
992
|
+
PriceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PriceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
993
|
+
PriceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PriceApiService });
|
994
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PriceApiService, decorators: [{
|
995
995
|
type: Injectable
|
996
996
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
997
997
|
|
@@ -1215,9 +1215,9 @@ class ProductModelApiService {
|
|
1215
1215
|
}
|
1216
1216
|
}
|
1217
1217
|
ProductModelApiService.MAX_RESULTS = 200;
|
1218
|
-
ProductModelApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
1219
|
-
ProductModelApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
1220
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
1218
|
+
ProductModelApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProductModelApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1219
|
+
ProductModelApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProductModelApiService });
|
1220
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProductModelApiService, decorators: [{
|
1221
1221
|
type: Injectable
|
1222
1222
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1223
1223
|
|
@@ -1248,9 +1248,9 @@ class QuoteApiService {
|
|
1248
1248
|
});
|
1249
1249
|
}
|
1250
1250
|
}
|
1251
|
-
QuoteApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
1252
|
-
QuoteApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
1253
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
1251
|
+
QuoteApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: QuoteApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1252
|
+
QuoteApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: QuoteApiService });
|
1253
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: QuoteApiService, decorators: [{
|
1254
1254
|
type: Injectable
|
1255
1255
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1256
1256
|
|
@@ -1287,9 +1287,9 @@ class RampApiService {
|
|
1287
1287
|
// );
|
1288
1288
|
}
|
1289
1289
|
}
|
1290
|
-
RampApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
1291
|
-
RampApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
1292
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
1290
|
+
RampApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RampApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1291
|
+
RampApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RampApiService });
|
1292
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RampApiService, decorators: [{
|
1293
1293
|
type: Injectable
|
1294
1294
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1295
1295
|
|
@@ -1299,10 +1299,6 @@ const fromUIComponentStoryDTO = (dto, attachments) => {
|
|
1299
1299
|
name: dto.name,
|
1300
1300
|
uiComponentId: dto.uiComponentId,
|
1301
1301
|
description: dto.description,
|
1302
|
-
templateHtmlId: dto.templateHtmlId,
|
1303
|
-
scriptJsId: dto.scriptJsId,
|
1304
|
-
styleCssId: dto.styleCssId,
|
1305
|
-
sectionJsonId: dto.sectionJsonId,
|
1306
1302
|
section: attachments.json,
|
1307
1303
|
template: attachments.html,
|
1308
1304
|
script: attachments.js,
|
@@ -1335,12 +1331,14 @@ class UITemplatesApiService {
|
|
1335
1331
|
body: template,
|
1336
1332
|
});
|
1337
1333
|
};
|
1338
|
-
this.duplicateTemplate$ = (cloneRequest) => {
|
1339
|
-
return this.baseHttpService
|
1334
|
+
this.duplicateTemplate$ = (template, cloneRequest) => {
|
1335
|
+
return this.baseHttpService
|
1336
|
+
.api({
|
1337
|
+
url: `${this.serviceUrl}/${template.id}/clone`,
|
1340
1338
|
method: 'post',
|
1341
|
-
url: `${this.serviceUrl}/${cloneRequest.id}/clone`,
|
1342
1339
|
body: cloneRequest,
|
1343
|
-
})
|
1340
|
+
})
|
1341
|
+
.pipe(map$1(response => response.clonedRecordId));
|
1344
1342
|
};
|
1345
1343
|
this.removeTemplate$ = (id) => {
|
1346
1344
|
return this.baseHttpService.api({
|
@@ -1391,12 +1389,14 @@ class UITemplatesApiService {
|
|
1391
1389
|
body: component,
|
1392
1390
|
});
|
1393
1391
|
};
|
1394
|
-
this.duplicateComponent$ = (
|
1395
|
-
return this.baseHttpService
|
1392
|
+
this.duplicateComponent$ = (component, cloneRequest) => {
|
1393
|
+
return this.baseHttpService
|
1394
|
+
.api({
|
1395
|
+
url: `${this.serviceUrl}/${component.uiTemplateId}/components/${component.id}/clone`,
|
1396
1396
|
method: 'post',
|
1397
|
-
url: `${this.serviceUrl}/${templateId}/components/${cloneRequest.id}/clone`,
|
1398
1397
|
body: cloneRequest,
|
1399
|
-
})
|
1398
|
+
})
|
1399
|
+
.pipe(map$1(response => response.clonedRecordId));
|
1400
1400
|
};
|
1401
1401
|
this.removeComponent$ = (templateId, componentId) => {
|
1402
1402
|
return this.baseHttpService.api({
|
@@ -1423,15 +1423,16 @@ class UITemplatesApiService {
|
|
1423
1423
|
.api({
|
1424
1424
|
url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories/${storyId}/attachments/${type}/file`,
|
1425
1425
|
responseType: 'text',
|
1426
|
+
errorHandler: noop,
|
1426
1427
|
})
|
1427
1428
|
.pipe(catchError$1(() => of('')));
|
1428
1429
|
};
|
1429
1430
|
this.convertToComponentStory$ = (templateId, componentId, storyDto) => {
|
1430
1431
|
return forkJoin([
|
1431
|
-
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1432
|
+
this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'html'),
|
1433
|
+
this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'js'),
|
1434
|
+
this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'css'),
|
1435
|
+
this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'json'),
|
1435
1436
|
]).pipe(map$1(([html, js, css, json]) => ({ html, js, css, json })), map$1(attachments => fromUIComponentStoryDTO(storyDto, attachments)));
|
1436
1437
|
};
|
1437
1438
|
this.fetchStories$ = (templateId, componentId, name) => {
|
@@ -1475,6 +1476,15 @@ class UITemplatesApiService {
|
|
1475
1476
|
})
|
1476
1477
|
.pipe(map$1(dto => fromUIComponentStoryDTO(dto, { html: template, js: script, css: styles, json: section })));
|
1477
1478
|
};
|
1479
|
+
this.duplicateComponentStory$ = (story, cloneRequest) => {
|
1480
|
+
return this.baseHttpService
|
1481
|
+
.api({
|
1482
|
+
url: `${this.serviceUrl}/${story.template}/components/${story.uiComponentId}/stories/${story.id}/clone`,
|
1483
|
+
method: 'post',
|
1484
|
+
body: cloneRequest,
|
1485
|
+
})
|
1486
|
+
.pipe(map$1(response => response.clonedRecordId));
|
1487
|
+
};
|
1478
1488
|
this.deleteComponentStory$ = (templateId, componentId, storyId) => {
|
1479
1489
|
return this.baseHttpService.api({
|
1480
1490
|
method: 'delete',
|
@@ -1509,10 +1519,10 @@ class UITemplatesApiService {
|
|
1509
1519
|
};
|
1510
1520
|
this.fetchComponentAttachments$ = (templateId, component) => {
|
1511
1521
|
return forkJoin([
|
1512
|
-
|
1513
|
-
|
1514
|
-
|
1515
|
-
|
1522
|
+
this.fetchComponentAttachmentFile$(templateId, component.id, 'html'),
|
1523
|
+
this.fetchComponentAttachmentFile$(templateId, component.id, 'js'),
|
1524
|
+
this.fetchComponentAttachmentFile$(templateId, component.id, 'css'),
|
1525
|
+
this.fetchComponentAttachmentFile$(templateId, component.id, 'json'),
|
1516
1526
|
]).pipe(map$1(([html, js, css, json]) => ({ html, js, css, json })));
|
1517
1527
|
};
|
1518
1528
|
this.fetchComponentAttachmentFile$ = (templateId, componentId, attachmentType) => {
|
@@ -1521,6 +1531,7 @@ class UITemplatesApiService {
|
|
1521
1531
|
method: 'get',
|
1522
1532
|
url: `${this.serviceUrl}/${templateId}/components/${componentId}/attachments/${attachmentType}/file`,
|
1523
1533
|
responseType: 'text',
|
1534
|
+
errorHandler: noop,
|
1524
1535
|
})
|
1525
1536
|
.pipe(catchError$1(() => of('')));
|
1526
1537
|
};
|
@@ -1564,9 +1575,9 @@ class UITemplatesApiService {
|
|
1564
1575
|
});
|
1565
1576
|
}
|
1566
1577
|
}
|
1567
|
-
UITemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
1568
|
-
UITemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
1569
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
1578
|
+
UITemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: UITemplatesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1579
|
+
UITemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: UITemplatesApiService });
|
1580
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: UITemplatesApiService, decorators: [{
|
1570
1581
|
type: Injectable
|
1571
1582
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1572
1583
|
|
@@ -1636,17 +1647,85 @@ class ScriptsApiService {
|
|
1636
1647
|
};
|
1637
1648
|
}
|
1638
1649
|
}
|
1639
|
-
ScriptsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
1640
|
-
ScriptsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
1641
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
1650
|
+
ScriptsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ScriptsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1651
|
+
ScriptsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ScriptsApiService });
|
1652
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ScriptsApiService, decorators: [{
|
1653
|
+
type: Injectable
|
1654
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1655
|
+
|
1656
|
+
class RulesApiService {
|
1657
|
+
constructor(baseHttpService) {
|
1658
|
+
this.baseHttpService = baseHttpService;
|
1659
|
+
this.serviceUrl = '/admin/rules';
|
1660
|
+
this.fetchRules$ = () => {
|
1661
|
+
return this.searchRules$(new Expression(), 0, 100);
|
1662
|
+
};
|
1663
|
+
this.searchRules$ = (expression, skip, count) => {
|
1664
|
+
let params = new HttpParams();
|
1665
|
+
params = params.set('skip', '' + skip);
|
1666
|
+
params = params.set('count', '' + count);
|
1667
|
+
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
1668
|
+
};
|
1669
|
+
this.createRule$ = (rule) => {
|
1670
|
+
return this.baseHttpService.api({
|
1671
|
+
url: `${this.serviceUrl}`,
|
1672
|
+
method: 'post',
|
1673
|
+
body: rule,
|
1674
|
+
});
|
1675
|
+
};
|
1676
|
+
this.removeRule$ = (id) => {
|
1677
|
+
return this.baseHttpService.api({
|
1678
|
+
url: `${this.serviceUrl}/${id}`,
|
1679
|
+
method: 'delete',
|
1680
|
+
});
|
1681
|
+
};
|
1682
|
+
this.restoreRule$ = (id) => {
|
1683
|
+
return this.baseHttpService.api({
|
1684
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
1685
|
+
method: 'patch',
|
1686
|
+
});
|
1687
|
+
};
|
1688
|
+
}
|
1689
|
+
}
|
1690
|
+
RulesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RulesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1691
|
+
RulesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RulesApiService });
|
1692
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RulesApiService, decorators: [{
|
1693
|
+
type: Injectable
|
1694
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1695
|
+
|
1696
|
+
class RuleGroupsApiService {
|
1697
|
+
constructor(baseHttpService) {
|
1698
|
+
this.baseHttpService = baseHttpService;
|
1699
|
+
this.serviceUrl = '/admin/rule-groups';
|
1700
|
+
this.fetchRuleGroups$ = () => {
|
1701
|
+
return this.searchRuleGroups$(new Expression(), 0, 100);
|
1702
|
+
};
|
1703
|
+
this.searchRuleGroups$ = (expression, skip, count) => {
|
1704
|
+
let params = new HttpParams();
|
1705
|
+
params = params.set('skip', '' + skip);
|
1706
|
+
params = params.set('count', '' + count);
|
1707
|
+
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
1708
|
+
};
|
1709
|
+
this.createRuleGroup$ = (ruleGroup) => {
|
1710
|
+
return this.baseHttpService.api({
|
1711
|
+
url: `${this.serviceUrl}`,
|
1712
|
+
method: 'post',
|
1713
|
+
body: ruleGroup,
|
1714
|
+
});
|
1715
|
+
};
|
1716
|
+
}
|
1717
|
+
}
|
1718
|
+
RuleGroupsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RuleGroupsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1719
|
+
RuleGroupsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RuleGroupsApiService });
|
1720
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RuleGroupsApiService, decorators: [{
|
1642
1721
|
type: Injectable
|
1643
1722
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1644
1723
|
|
1645
1724
|
class ApiModule {
|
1646
1725
|
}
|
1647
|
-
ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
1648
|
-
ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
1649
|
-
ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
1726
|
+
ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1727
|
+
ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ApiModule, imports: [HttpClientModule] });
|
1728
|
+
ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ApiModule, providers: [
|
1650
1729
|
BaseHttpService,
|
1651
1730
|
XrayService,
|
1652
1731
|
ConfigurationApiService,
|
@@ -1661,8 +1740,10 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.
|
|
1661
1740
|
SalesforceApiService,
|
1662
1741
|
UITemplatesApiService,
|
1663
1742
|
ScriptsApiService,
|
1743
|
+
RulesApiService,
|
1744
|
+
RuleGroupsApiService,
|
1664
1745
|
], imports: [[HttpClientModule]] });
|
1665
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
1746
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ApiModule, decorators: [{
|
1666
1747
|
type: NgModule,
|
1667
1748
|
args: [{
|
1668
1749
|
imports: [HttpClientModule],
|
@@ -1681,6 +1762,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
1681
1762
|
SalesforceApiService,
|
1682
1763
|
UITemplatesApiService,
|
1683
1764
|
ScriptsApiService,
|
1765
|
+
RulesApiService,
|
1766
|
+
RuleGroupsApiService,
|
1684
1767
|
],
|
1685
1768
|
}]
|
1686
1769
|
}] });
|
@@ -1689,5 +1772,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
|
|
1689
1772
|
* Generated bundle index. Do not edit.
|
1690
1773
|
*/
|
1691
1774
|
|
1692
|
-
export { ApiModule, ConfigurationApiService, ConfigurationSettingsApiService, ContextApiService, DocumentAttachmentApiService, DocumentTemplatesApiService, PriceApiService, ProductModelApiService, QuoteApiService, RampApiService, SalesforceApiService, ScriptsApiService, UITemplatesApiService };
|
1775
|
+
export { ApiModule, ConfigurationApiService, ConfigurationSettingsApiService, ContextApiService, DocumentAttachmentApiService, DocumentTemplatesApiService, PriceApiService, ProductModelApiService, QuoteApiService, RampApiService, RuleGroupsApiService, RulesApiService, SalesforceApiService, ScriptsApiService, UITemplatesApiService };
|
1693
1776
|
//# sourceMappingURL=veloce-api.js.map
|