@veloceapps/api 10.0.0-8 → 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 -2
- package/esm2020/lib/api.module.mjs +7 -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 +65 -0
- 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 +97 -2
- package/fesm2015/veloceapps-api.mjs.map +1 -1
- package/fesm2020/veloceapps-api.mjs +100 -2
- package/fesm2020/veloceapps-api.mjs.map +1 -1
- package/index.d.ts +4 -1
- 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/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
|
}
|
@@ -3413,6 +3423,90 @@ 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
|
+
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
|
+
});
|
3478
|
+
}
|
3479
|
+
}
|
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 });
|
3481
|
+
RlmApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmApiService });
|
3482
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmApiService, decorators: [{
|
3483
|
+
type: Injectable
|
3484
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
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
|
+
|
3416
3510
|
class ApiModule {
|
3417
3511
|
}
|
3418
3512
|
ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
@@ -3460,6 +3554,8 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
|
3460
3554
|
ConfigurationProcessorsApiService,
|
3461
3555
|
FlowStateApiService,
|
3462
3556
|
SandboxManagerApiService,
|
3557
|
+
RlmApiService,
|
3558
|
+
RlmQuoteApiService,
|
3463
3559
|
], imports: [HttpClientModule] });
|
3464
3560
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, decorators: [{
|
3465
3561
|
type: NgModule,
|
@@ -3508,6 +3604,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
3508
3604
|
ConfigurationProcessorsApiService,
|
3509
3605
|
FlowStateApiService,
|
3510
3606
|
SandboxManagerApiService,
|
3607
|
+
RlmApiService,
|
3608
|
+
RlmQuoteApiService,
|
3511
3609
|
],
|
3512
3610
|
}]
|
3513
3611
|
}] });
|
@@ -3516,5 +3614,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
3516
3614
|
* Generated bundle index. Do not edit.
|
3517
3615
|
*/
|
3518
3616
|
|
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 };
|
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 };
|
3520
3618
|
//# sourceMappingURL=veloceapps-api.mjs.map
|