@veloceapps/api 10.0.0-5 → 10.0.0-51
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/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/services/ui-templates-api.service.mjs +4 -4
- package/esm2020/lib/types/quote.types.mjs +1 -1
- package/esm2020/lib/utils/index.mjs +3 -0
- package/esm2020/lib/utils/ui-template.utils.mjs +3 -2
- package/fesm2015/veloceapps-api.mjs +101 -5
- package/fesm2015/veloceapps-api.mjs.map +1 -1
- package/fesm2020/veloceapps-api.mjs +104 -5
- 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/lib/utils/ui-template.utils.d.ts +1 -1
- 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
|
}
|
|
@@ -2946,9 +2956,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
2946
2956
|
type: Injectable
|
|
2947
2957
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
2948
2958
|
|
|
2949
|
-
const fromUIComponentStoryDTO = (dto, attachments) => {
|
|
2959
|
+
const fromUIComponentStoryDTO = (dto, templateId, attachments) => {
|
|
2950
2960
|
return {
|
|
2951
2961
|
id: dto.id,
|
|
2962
|
+
templateId,
|
|
2952
2963
|
name: dto.name,
|
|
2953
2964
|
uiComponentId: dto.uiComponentId,
|
|
2954
2965
|
description: dto.description,
|
|
@@ -3086,7 +3097,7 @@ class UITemplatesApiService {
|
|
|
3086
3097
|
this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'js'),
|
|
3087
3098
|
this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'css'),
|
|
3088
3099
|
this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'json'),
|
|
3089
|
-
]).pipe(map$1(([html, js, css, json]) => ({ html, js, css, json })), map$1(attachments => fromUIComponentStoryDTO(storyDto, attachments)));
|
|
3100
|
+
]).pipe(map$1(([html, js, css, json]) => ({ html, js, css, json })), map$1(attachments => fromUIComponentStoryDTO(storyDto, templateId, attachments)));
|
|
3090
3101
|
};
|
|
3091
3102
|
this.fetchStories$ = (templateId, componentId, name) => {
|
|
3092
3103
|
let params = new HttpParams();
|
|
@@ -3127,12 +3138,12 @@ class UITemplatesApiService {
|
|
|
3127
3138
|
url: `${this.serviceUrl}/${templateId}/components/${story.uiComponentId}/stories/${story.id}`,
|
|
3128
3139
|
body: rest,
|
|
3129
3140
|
})
|
|
3130
|
-
.pipe(map$1(dto => fromUIComponentStoryDTO(dto, { html: template, js: script, css: styles, json: section })));
|
|
3141
|
+
.pipe(map$1(dto => fromUIComponentStoryDTO(dto, templateId, { html: template, js: script, css: styles, json: section })));
|
|
3131
3142
|
};
|
|
3132
3143
|
this.duplicateComponentStory$ = (story, cloneRequest) => {
|
|
3133
3144
|
return this.baseHttpService
|
|
3134
3145
|
.api({
|
|
3135
|
-
url: `${this.serviceUrl}/${story.
|
|
3146
|
+
url: `${this.serviceUrl}/${story.templateId}/components/${story.uiComponentId}/stories/${story.id}/clone`,
|
|
3136
3147
|
method: 'post',
|
|
3137
3148
|
body: cloneRequest,
|
|
3138
3149
|
})
|
|
@@ -3413,6 +3424,90 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3413
3424
|
type: Injectable
|
|
3414
3425
|
}], ctorParameters: function () { return [{ type: i1$2.MessageService }]; } });
|
|
3415
3426
|
|
|
3427
|
+
class RlmApiService {
|
|
3428
|
+
constructor(baseHttpService) {
|
|
3429
|
+
this.baseHttpService = baseHttpService;
|
|
3430
|
+
this.serviceUrl = '/rlm';
|
|
3431
|
+
}
|
|
3432
|
+
// TODO: request RLM data only when RLM is installed. Otherwise skip rlm requests. Discuss solution|approach with BE
|
|
3433
|
+
fetchContextDefinitions$() {
|
|
3434
|
+
return this.baseHttpService
|
|
3435
|
+
.api({ url: `${this.serviceUrl}/context`, skipErrorHandler: true })
|
|
3436
|
+
.pipe(catchError(() => {
|
|
3437
|
+
return of([]);
|
|
3438
|
+
}));
|
|
3439
|
+
}
|
|
3440
|
+
fetchContextMappings$(id) {
|
|
3441
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/context/${id}/mappings` });
|
|
3442
|
+
}
|
|
3443
|
+
fetchContextDefinitionStructure$(id) {
|
|
3444
|
+
return this.baseHttpService
|
|
3445
|
+
.api({
|
|
3446
|
+
url: `${this.serviceUrl}/context/${id}/structure/details`,
|
|
3447
|
+
skipErrorHandler: true,
|
|
3448
|
+
})
|
|
3449
|
+
.pipe(catchError(() => {
|
|
3450
|
+
return of([]);
|
|
3451
|
+
}), map(objects => {
|
|
3452
|
+
return objects.map(object => {
|
|
3453
|
+
const tag = object.tags?.[0]?.title;
|
|
3454
|
+
const objectAttributes = object.attributes || [];
|
|
3455
|
+
return {
|
|
3456
|
+
id: object.id,
|
|
3457
|
+
title: tag || object.title,
|
|
3458
|
+
attributes: objectAttributes.map(attribute => {
|
|
3459
|
+
const tag = attribute.tags?.[0]?.title;
|
|
3460
|
+
return {
|
|
3461
|
+
title: tag || attribute.title,
|
|
3462
|
+
fieldType: attribute.fieldType,
|
|
3463
|
+
dataType: attribute.dataType,
|
|
3464
|
+
};
|
|
3465
|
+
}),
|
|
3466
|
+
};
|
|
3467
|
+
});
|
|
3468
|
+
}));
|
|
3469
|
+
}
|
|
3470
|
+
fetchRlmProcedures(contextDefinitionId) {
|
|
3471
|
+
const params = {};
|
|
3472
|
+
if (contextDefinitionId) {
|
|
3473
|
+
params['contextDefinitionId'] = contextDefinitionId;
|
|
3474
|
+
}
|
|
3475
|
+
return this.baseHttpService.api({
|
|
3476
|
+
url: `${this.serviceUrl}/procedures`,
|
|
3477
|
+
params,
|
|
3478
|
+
});
|
|
3479
|
+
}
|
|
3480
|
+
}
|
|
3481
|
+
RlmApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3482
|
+
RlmApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmApiService });
|
|
3483
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmApiService, decorators: [{
|
|
3484
|
+
type: Injectable
|
|
3485
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
3486
|
+
|
|
3487
|
+
class RlmQuoteApiService {
|
|
3488
|
+
constructor(httpService) {
|
|
3489
|
+
this.httpService = httpService;
|
|
3490
|
+
this.SERVICE_URL = '/quotes/rlm';
|
|
3491
|
+
}
|
|
3492
|
+
getQuote(mappingType, objectId, contextMappingId, options) {
|
|
3493
|
+
const params = { mappingType };
|
|
3494
|
+
if (contextMappingId) {
|
|
3495
|
+
params['contextMappingId'] = contextMappingId;
|
|
3496
|
+
}
|
|
3497
|
+
return this.httpService.api({
|
|
3498
|
+
method: 'get',
|
|
3499
|
+
url: `${this.SERVICE_URL}/${objectId}`,
|
|
3500
|
+
params,
|
|
3501
|
+
...options,
|
|
3502
|
+
});
|
|
3503
|
+
}
|
|
3504
|
+
}
|
|
3505
|
+
RlmQuoteApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmQuoteApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3506
|
+
RlmQuoteApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmQuoteApiService });
|
|
3507
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmQuoteApiService, decorators: [{
|
|
3508
|
+
type: Injectable
|
|
3509
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
3510
|
+
|
|
3416
3511
|
class ApiModule {
|
|
3417
3512
|
}
|
|
3418
3513
|
ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -3460,6 +3555,8 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
|
|
3460
3555
|
ConfigurationProcessorsApiService,
|
|
3461
3556
|
FlowStateApiService,
|
|
3462
3557
|
SandboxManagerApiService,
|
|
3558
|
+
RlmApiService,
|
|
3559
|
+
RlmQuoteApiService,
|
|
3463
3560
|
], imports: [HttpClientModule] });
|
|
3464
3561
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, decorators: [{
|
|
3465
3562
|
type: NgModule,
|
|
@@ -3508,6 +3605,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3508
3605
|
ConfigurationProcessorsApiService,
|
|
3509
3606
|
FlowStateApiService,
|
|
3510
3607
|
SandboxManagerApiService,
|
|
3608
|
+
RlmApiService,
|
|
3609
|
+
RlmQuoteApiService,
|
|
3511
3610
|
],
|
|
3512
3611
|
}]
|
|
3513
3612
|
}] });
|
|
@@ -3516,5 +3615,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3516
3615
|
* Generated bundle index. Do not edit.
|
|
3517
3616
|
*/
|
|
3518
3617
|
|
|
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 };
|
|
3618
|
+
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
3619
|
//# sourceMappingURL=veloceapps-api.mjs.map
|