@veloceapps/api 10.0.0-9 → 11.0.0-0
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 +5 -3
- package/esm2020/lib/api.module.mjs +4 -1
- package/esm2020/lib/services/auth.service.mjs +2 -2
- package/esm2020/lib/services/procedures-api.service.mjs +8 -1
- package/esm2020/lib/services/rlm-api.service.mjs +47 -11
- package/esm2020/lib/services/rlm-quote-api.service.mjs +27 -0
- package/esm2020/lib/services/rules-api.service.mjs +4 -1
- package/esm2020/lib/types/quote.types.mjs +1 -1
- package/esm2020/lib/utils/index.mjs +3 -0
- package/fesm2015/veloceapps-api.mjs +81 -13
- package/fesm2015/veloceapps-api.mjs.map +1 -1
- package/fesm2020/veloceapps-api.mjs +84 -13
- package/fesm2020/veloceapps-api.mjs.map +1 -1
- package/index.d.ts +4 -2
- package/lib/services/procedures-api.service.d.ts +1 -0
- package/lib/services/rlm-api.service.d.ts +5 -3
- package/lib/services/rlm-quote-api.service.d.ts +11 -0
- package/lib/types/quote.types.d.ts +2 -2
- package/lib/utils/index.d.ts +2 -0
- package/package.json +2 -2
@@ -104,7 +104,7 @@ class VeloceAuthService {
|
|
104
104
|
'Content-Type': 'application/json',
|
105
105
|
Authorization: `Bearer ${accessToken}`,
|
106
106
|
});
|
107
|
-
return this.http.get(`${instanceUrl}/services/apexrest/
|
107
|
+
return this.http.get(`${instanceUrl}/services/apexrest/VELOCE_PRISM/veloce-auth`, { headers });
|
108
108
|
}
|
109
109
|
}
|
110
110
|
VeloceAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceAuthService, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
@@ -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
|
}
|
@@ -3418,18 +3428,53 @@ class RlmApiService {
|
|
3418
3428
|
this.baseHttpService = baseHttpService;
|
3419
3429
|
this.serviceUrl = '/rlm';
|
3420
3430
|
}
|
3431
|
+
// TODO: request RLM data only when RLM is installed. Otherwise skip rlm requests. Discuss solution|approach with BE
|
3421
3432
|
fetchContextDefinitions$() {
|
3422
|
-
return
|
3423
|
-
{
|
3424
|
-
|
3425
|
-
|
3426
|
-
|
3427
|
-
}
|
3428
|
-
fetchContextMappings() {
|
3429
|
-
return
|
3430
|
-
|
3431
|
-
|
3432
|
-
|
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
|
+
const objectAttributes = object.attributes || [];
|
3454
|
+
return {
|
3455
|
+
id: object.id,
|
3456
|
+
title: tag || object.title,
|
3457
|
+
attributes: objectAttributes.map(attribute => {
|
3458
|
+
const tag = attribute.tags?.[0]?.title;
|
3459
|
+
return {
|
3460
|
+
title: tag || attribute.title,
|
3461
|
+
fieldType: attribute.fieldType,
|
3462
|
+
dataType: attribute.dataType,
|
3463
|
+
};
|
3464
|
+
}),
|
3465
|
+
};
|
3466
|
+
});
|
3467
|
+
}));
|
3468
|
+
}
|
3469
|
+
fetchRlmProcedures(contextDefinitionId) {
|
3470
|
+
const params = {};
|
3471
|
+
if (contextDefinitionId) {
|
3472
|
+
params['contextDefinitionId'] = contextDefinitionId;
|
3473
|
+
}
|
3474
|
+
return this.baseHttpService.api({
|
3475
|
+
url: `${this.serviceUrl}/procedures`,
|
3476
|
+
params,
|
3477
|
+
});
|
3433
3478
|
}
|
3434
3479
|
}
|
3435
3480
|
RlmApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
@@ -3438,6 +3483,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
3438
3483
|
type: Injectable
|
3439
3484
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
3440
3485
|
|
3486
|
+
class RlmQuoteApiService {
|
3487
|
+
constructor(httpService) {
|
3488
|
+
this.httpService = httpService;
|
3489
|
+
this.SERVICE_URL = '/quotes/rlm';
|
3490
|
+
}
|
3491
|
+
getQuote(mappingType, objectId, contextMappingId, options) {
|
3492
|
+
const params = { mappingType };
|
3493
|
+
if (contextMappingId) {
|
3494
|
+
params['contextMappingId'] = contextMappingId;
|
3495
|
+
}
|
3496
|
+
return this.httpService.api({
|
3497
|
+
method: 'get',
|
3498
|
+
url: `${this.SERVICE_URL}/${objectId}`,
|
3499
|
+
params,
|
3500
|
+
...options,
|
3501
|
+
});
|
3502
|
+
}
|
3503
|
+
}
|
3504
|
+
RlmQuoteApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmQuoteApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
3505
|
+
RlmQuoteApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmQuoteApiService });
|
3506
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmQuoteApiService, decorators: [{
|
3507
|
+
type: Injectable
|
3508
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
3509
|
+
|
3441
3510
|
class ApiModule {
|
3442
3511
|
}
|
3443
3512
|
ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
@@ -3486,6 +3555,7 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
|
3486
3555
|
FlowStateApiService,
|
3487
3556
|
SandboxManagerApiService,
|
3488
3557
|
RlmApiService,
|
3558
|
+
RlmQuoteApiService,
|
3489
3559
|
], imports: [HttpClientModule] });
|
3490
3560
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, decorators: [{
|
3491
3561
|
type: NgModule,
|
@@ -3535,6 +3605,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
3535
3605
|
FlowStateApiService,
|
3536
3606
|
SandboxManagerApiService,
|
3537
3607
|
RlmApiService,
|
3608
|
+
RlmQuoteApiService,
|
3538
3609
|
],
|
3539
3610
|
}]
|
3540
3611
|
}] });
|
@@ -3543,5 +3614,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
3543
3614
|
* Generated bundle index. Do not edit.
|
3544
3615
|
*/
|
3545
3616
|
|
3546
|
-
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, RuleGroupsApiService, RulesApiService, SalesforceApiService, SandboxManagerApiService, ScriptsApiService, ShoppingCartSettingsApiService, StatefulConfigurationApiService, UIDefinitionsApiService, UITemplatesApiService, VeloceAuthService, VeloceObjectsApiService };
|
3617
|
+
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, fromUIComponentStoryDTO, handleCanvasResponse };
|
3547
3618
|
//# sourceMappingURL=veloceapps-api.mjs.map
|