@veloceapps/api 10.0.0-2 → 10.0.0-21
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 +3 -1
- package/esm2020/lib/api.module.mjs +7 -1
- package/esm2020/lib/services/procedures-api.service.mjs +8 -1
- package/esm2020/lib/services/rlm-api.service.mjs +60 -0
- package/esm2020/lib/services/rlm-quote-api.service.mjs +23 -0
- package/esm2020/lib/services/rules-api.service.mjs +4 -1
- package/esm2020/lib/types/quote.types.mjs +1 -1
- package/fesm2015/veloceapps-api.mjs +87 -1
- package/fesm2015/veloceapps-api.mjs.map +1 -1
- package/fesm2020/veloceapps-api.mjs +90 -1
- package/fesm2020/veloceapps-api.mjs.map +1 -1
- package/index.d.ts +2 -0
- package/lib/services/procedures-api.service.d.ts +1 -0
- package/lib/services/rlm-api.service.d.ts +14 -0
- package/lib/services/rlm-quote-api.service.d.ts +11 -0
- package/lib/types/quote.types.d.ts +2 -2
- package/package.json +1 -1
@@ -1898,6 +1898,13 @@ class ProceduresApiService {
|
|
1898
1898
|
body,
|
1899
1899
|
});
|
1900
1900
|
}
|
1901
|
+
rlmExecute$(body) {
|
1902
|
+
return this.baseHttpService.api({
|
1903
|
+
url: `${this.SERVICE_URL}/rlm/execute`,
|
1904
|
+
method: 'post',
|
1905
|
+
body,
|
1906
|
+
});
|
1907
|
+
}
|
1901
1908
|
/**
|
1902
1909
|
* Run active procedure against QuoteDraft
|
1903
1910
|
* @param body
|
@@ -2719,6 +2726,9 @@ class RulesApiService {
|
|
2719
2726
|
if (ruleGroupType === RuleGroupTypes.catalog) {
|
2720
2727
|
return '/rules/catalog/execute';
|
2721
2728
|
}
|
2729
|
+
if (ruleGroupType === RuleGroupTypes.rlmContextBased) {
|
2730
|
+
return '/rules/rlm/execute';
|
2731
|
+
}
|
2722
2732
|
return '/rules/execute';
|
2723
2733
|
}
|
2724
2734
|
}
|
@@ -3413,6 +3423,81 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
3413
3423
|
type: Injectable
|
3414
3424
|
}], ctorParameters: function () { return [{ type: i1$2.MessageService }]; } });
|
3415
3425
|
|
3426
|
+
class RlmApiService {
|
3427
|
+
constructor(baseHttpService) {
|
3428
|
+
this.baseHttpService = baseHttpService;
|
3429
|
+
this.serviceUrl = '/rlm';
|
3430
|
+
}
|
3431
|
+
// TODO: request RLM data only when RLM is installed. Otherwise skip rlm requests. Discuss solution|approach with BE
|
3432
|
+
fetchContextDefinitions$() {
|
3433
|
+
return this.baseHttpService
|
3434
|
+
.api({ url: `${this.serviceUrl}/context`, skipErrorHandler: true })
|
3435
|
+
.pipe(catchError(() => {
|
3436
|
+
return of([]);
|
3437
|
+
}));
|
3438
|
+
}
|
3439
|
+
fetchContextMappings$(id) {
|
3440
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/context/${id}/mappings` });
|
3441
|
+
}
|
3442
|
+
fetchContextDefinitionStructure$(id) {
|
3443
|
+
return this.baseHttpService
|
3444
|
+
.api({
|
3445
|
+
url: `${this.serviceUrl}/context/${id}/structure/details`,
|
3446
|
+
skipErrorHandler: true,
|
3447
|
+
})
|
3448
|
+
.pipe(catchError(() => {
|
3449
|
+
return of([]);
|
3450
|
+
}), map(objects => {
|
3451
|
+
return objects.map(object => {
|
3452
|
+
const tag = object.tags?.[0]?.title;
|
3453
|
+
return {
|
3454
|
+
id: object.id,
|
3455
|
+
title: tag || object.title,
|
3456
|
+
attributes: object.attributes.map(attribute => {
|
3457
|
+
const tag = attribute.tags?.[0]?.title;
|
3458
|
+
return {
|
3459
|
+
title: tag || attribute.title,
|
3460
|
+
fieldType: attribute.fieldType,
|
3461
|
+
dataType: attribute.dataType,
|
3462
|
+
};
|
3463
|
+
}),
|
3464
|
+
};
|
3465
|
+
});
|
3466
|
+
}));
|
3467
|
+
}
|
3468
|
+
fetchRlmProcedures(contextDefinitionId) {
|
3469
|
+
return this.baseHttpService.api({
|
3470
|
+
url: `${this.serviceUrl}/procedures`,
|
3471
|
+
params: { contextDefinitionId },
|
3472
|
+
});
|
3473
|
+
}
|
3474
|
+
}
|
3475
|
+
RlmApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
3476
|
+
RlmApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmApiService });
|
3477
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmApiService, decorators: [{
|
3478
|
+
type: Injectable
|
3479
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
3480
|
+
|
3481
|
+
class RlmQuoteApiService {
|
3482
|
+
constructor(httpService) {
|
3483
|
+
this.httpService = httpService;
|
3484
|
+
this.SERVICE_URL = '/quotes/rlm';
|
3485
|
+
}
|
3486
|
+
getQuote(mappingType, objectId, contextMappingId, options) {
|
3487
|
+
return this.httpService.api({
|
3488
|
+
method: 'get',
|
3489
|
+
url: `${this.SERVICE_URL}/${objectId}`,
|
3490
|
+
params: { mappingType, contextMappingId },
|
3491
|
+
...options,
|
3492
|
+
});
|
3493
|
+
}
|
3494
|
+
}
|
3495
|
+
RlmQuoteApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmQuoteApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
3496
|
+
RlmQuoteApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmQuoteApiService });
|
3497
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmQuoteApiService, decorators: [{
|
3498
|
+
type: Injectable
|
3499
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
3500
|
+
|
3416
3501
|
class ApiModule {
|
3417
3502
|
}
|
3418
3503
|
ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
@@ -3460,6 +3545,8 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
|
3460
3545
|
ConfigurationProcessorsApiService,
|
3461
3546
|
FlowStateApiService,
|
3462
3547
|
SandboxManagerApiService,
|
3548
|
+
RlmApiService,
|
3549
|
+
RlmQuoteApiService,
|
3463
3550
|
], imports: [HttpClientModule] });
|
3464
3551
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, decorators: [{
|
3465
3552
|
type: NgModule,
|
@@ -3508,6 +3595,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
3508
3595
|
ConfigurationProcessorsApiService,
|
3509
3596
|
FlowStateApiService,
|
3510
3597
|
SandboxManagerApiService,
|
3598
|
+
RlmApiService,
|
3599
|
+
RlmQuoteApiService,
|
3511
3600
|
],
|
3512
3601
|
}]
|
3513
3602
|
}] });
|
@@ -3516,5 +3605,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
3516
3605
|
* Generated bundle index. Do not edit.
|
3517
3606
|
*/
|
3518
3607
|
|
3519
|
-
export { AccountApiService, ApiModule, CatalogAdminApiService, CatalogApiService, ConfigurationApiService, ConfigurationProcessorsApiService, ConfigurationSettingsApiService, ContextApiService, ContractedPriceApiService, DeltaApiService, DocumentAttachmentApiService, DocumentTemplatesApiService, EndpointsApiService, FlowStateApiService, FlowsApiService, GuidedSellingApiService, GuidedSellingsAdminApiService, OffersApiService, OrgInfoApiService, PicklistsApiService, PortalsApiService, PriceApiService, ProceduresApiService, ProductApiService, ProductModelApiService, PromotionsApiService, QuoteApiService, RampApiService, RebateProgramApiService, RebateTypeApiService, RuleGroupsApiService, RulesApiService, SalesforceApiService, SandboxManagerApiService, ScriptsApiService, ShoppingCartSettingsApiService, StatefulConfigurationApiService, UIDefinitionsApiService, UITemplatesApiService, VeloceAuthService, VeloceObjectsApiService };
|
3608
|
+
export { AccountApiService, ApiModule, CatalogAdminApiService, CatalogApiService, ConfigurationApiService, ConfigurationProcessorsApiService, ConfigurationSettingsApiService, ContextApiService, ContractedPriceApiService, DeltaApiService, DocumentAttachmentApiService, DocumentTemplatesApiService, EndpointsApiService, FlowStateApiService, FlowsApiService, GuidedSellingApiService, GuidedSellingsAdminApiService, OffersApiService, OrgInfoApiService, PicklistsApiService, PortalsApiService, PriceApiService, ProceduresApiService, ProductApiService, ProductModelApiService, PromotionsApiService, QuoteApiService, RampApiService, RebateProgramApiService, RebateTypeApiService, RlmApiService, RlmQuoteApiService, RuleGroupsApiService, RulesApiService, SalesforceApiService, SandboxManagerApiService, ScriptsApiService, ShoppingCartSettingsApiService, StatefulConfigurationApiService, UIDefinitionsApiService, UITemplatesApiService, VeloceAuthService, VeloceObjectsApiService };
|
3520
3609
|
//# sourceMappingURL=veloceapps-api.mjs.map
|