@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
|
@@ -1781,6 +1781,13 @@ class ProceduresApiService {
|
|
|
1781
1781
|
body,
|
|
1782
1782
|
});
|
|
1783
1783
|
}
|
|
1784
|
+
rlmExecute$(body) {
|
|
1785
|
+
return this.baseHttpService.api({
|
|
1786
|
+
url: `${this.SERVICE_URL}/rlm/execute`,
|
|
1787
|
+
method: 'post',
|
|
1788
|
+
body,
|
|
1789
|
+
});
|
|
1790
|
+
}
|
|
1784
1791
|
/**
|
|
1785
1792
|
* Run active procedure against QuoteDraft
|
|
1786
1793
|
* @param body
|
|
@@ -2577,6 +2584,9 @@ class RulesApiService {
|
|
|
2577
2584
|
if (ruleGroupType === RuleGroupTypes.catalog) {
|
|
2578
2585
|
return '/rules/catalog/execute';
|
|
2579
2586
|
}
|
|
2587
|
+
if (ruleGroupType === RuleGroupTypes.rlmContextBased) {
|
|
2588
|
+
return '/rules/rlm/execute';
|
|
2589
|
+
}
|
|
2580
2590
|
return '/rules/execute';
|
|
2581
2591
|
}
|
|
2582
2592
|
}
|
|
@@ -2801,9 +2811,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
2801
2811
|
type: Injectable
|
|
2802
2812
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
2803
2813
|
|
|
2804
|
-
const fromUIComponentStoryDTO = (dto, attachments) => {
|
|
2814
|
+
const fromUIComponentStoryDTO = (dto, templateId, attachments) => {
|
|
2805
2815
|
return {
|
|
2806
2816
|
id: dto.id,
|
|
2817
|
+
templateId,
|
|
2807
2818
|
name: dto.name,
|
|
2808
2819
|
uiComponentId: dto.uiComponentId,
|
|
2809
2820
|
description: dto.description,
|
|
@@ -2941,7 +2952,7 @@ class UITemplatesApiService {
|
|
|
2941
2952
|
this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'js'),
|
|
2942
2953
|
this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'css'),
|
|
2943
2954
|
this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'json'),
|
|
2944
|
-
]).pipe(map$1(([html, js, css, json]) => ({ html, js, css, json })), map$1(attachments => fromUIComponentStoryDTO(storyDto, attachments)));
|
|
2955
|
+
]).pipe(map$1(([html, js, css, json]) => ({ html, js, css, json })), map$1(attachments => fromUIComponentStoryDTO(storyDto, templateId, attachments)));
|
|
2945
2956
|
};
|
|
2946
2957
|
this.fetchStories$ = (templateId, componentId, name) => {
|
|
2947
2958
|
let params = new HttpParams();
|
|
@@ -2982,12 +2993,12 @@ class UITemplatesApiService {
|
|
|
2982
2993
|
url: `${this.serviceUrl}/${templateId}/components/${story.uiComponentId}/stories/${story.id}`,
|
|
2983
2994
|
body: rest,
|
|
2984
2995
|
})
|
|
2985
|
-
.pipe(map$1(dto => fromUIComponentStoryDTO(dto, { html: template, js: script, css: styles, json: section })));
|
|
2996
|
+
.pipe(map$1(dto => fromUIComponentStoryDTO(dto, templateId, { html: template, js: script, css: styles, json: section })));
|
|
2986
2997
|
};
|
|
2987
2998
|
this.duplicateComponentStory$ = (story, cloneRequest) => {
|
|
2988
2999
|
return this.baseHttpService
|
|
2989
3000
|
.api({
|
|
2990
|
-
url: `${this.serviceUrl}/${story.
|
|
3001
|
+
url: `${this.serviceUrl}/${story.templateId}/components/${story.uiComponentId}/stories/${story.id}/clone`,
|
|
2991
3002
|
method: 'post',
|
|
2992
3003
|
body: cloneRequest,
|
|
2993
3004
|
})
|
|
@@ -3268,6 +3279,87 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3268
3279
|
type: Injectable
|
|
3269
3280
|
}], ctorParameters: function () { return [{ type: i1$2.MessageService }]; } });
|
|
3270
3281
|
|
|
3282
|
+
class RlmApiService {
|
|
3283
|
+
constructor(baseHttpService) {
|
|
3284
|
+
this.baseHttpService = baseHttpService;
|
|
3285
|
+
this.serviceUrl = '/rlm';
|
|
3286
|
+
}
|
|
3287
|
+
// TODO: request RLM data only when RLM is installed. Otherwise skip rlm requests. Discuss solution|approach with BE
|
|
3288
|
+
fetchContextDefinitions$() {
|
|
3289
|
+
return this.baseHttpService
|
|
3290
|
+
.api({ url: `${this.serviceUrl}/context`, skipErrorHandler: true })
|
|
3291
|
+
.pipe(catchError(() => {
|
|
3292
|
+
return of([]);
|
|
3293
|
+
}));
|
|
3294
|
+
}
|
|
3295
|
+
fetchContextMappings$(id) {
|
|
3296
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/context/${id}/mappings` });
|
|
3297
|
+
}
|
|
3298
|
+
fetchContextDefinitionStructure$(id) {
|
|
3299
|
+
return this.baseHttpService
|
|
3300
|
+
.api({
|
|
3301
|
+
url: `${this.serviceUrl}/context/${id}/structure/details`,
|
|
3302
|
+
skipErrorHandler: true,
|
|
3303
|
+
})
|
|
3304
|
+
.pipe(catchError(() => {
|
|
3305
|
+
return of([]);
|
|
3306
|
+
}), map(objects => {
|
|
3307
|
+
return objects.map(object => {
|
|
3308
|
+
var _a, _b;
|
|
3309
|
+
const tag = (_b = (_a = object.tags) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.title;
|
|
3310
|
+
const objectAttributes = object.attributes || [];
|
|
3311
|
+
return {
|
|
3312
|
+
id: object.id,
|
|
3313
|
+
title: tag || object.title,
|
|
3314
|
+
attributes: objectAttributes.map(attribute => {
|
|
3315
|
+
var _a, _b;
|
|
3316
|
+
const tag = (_b = (_a = attribute.tags) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.title;
|
|
3317
|
+
return {
|
|
3318
|
+
title: tag || attribute.title,
|
|
3319
|
+
fieldType: attribute.fieldType,
|
|
3320
|
+
dataType: attribute.dataType,
|
|
3321
|
+
};
|
|
3322
|
+
}),
|
|
3323
|
+
};
|
|
3324
|
+
});
|
|
3325
|
+
}));
|
|
3326
|
+
}
|
|
3327
|
+
fetchRlmProcedures(contextDefinitionId) {
|
|
3328
|
+
const params = {};
|
|
3329
|
+
if (contextDefinitionId) {
|
|
3330
|
+
params['contextDefinitionId'] = contextDefinitionId;
|
|
3331
|
+
}
|
|
3332
|
+
return this.baseHttpService.api({
|
|
3333
|
+
url: `${this.serviceUrl}/procedures`,
|
|
3334
|
+
params,
|
|
3335
|
+
});
|
|
3336
|
+
}
|
|
3337
|
+
}
|
|
3338
|
+
RlmApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3339
|
+
RlmApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmApiService });
|
|
3340
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmApiService, decorators: [{
|
|
3341
|
+
type: Injectable
|
|
3342
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
3343
|
+
|
|
3344
|
+
class RlmQuoteApiService {
|
|
3345
|
+
constructor(httpService) {
|
|
3346
|
+
this.httpService = httpService;
|
|
3347
|
+
this.SERVICE_URL = '/quotes/rlm';
|
|
3348
|
+
}
|
|
3349
|
+
getQuote(mappingType, objectId, contextMappingId, options) {
|
|
3350
|
+
const params = { mappingType };
|
|
3351
|
+
if (contextMappingId) {
|
|
3352
|
+
params['contextMappingId'] = contextMappingId;
|
|
3353
|
+
}
|
|
3354
|
+
return this.httpService.api(Object.assign({ method: 'get', url: `${this.SERVICE_URL}/${objectId}`, params }, options));
|
|
3355
|
+
}
|
|
3356
|
+
}
|
|
3357
|
+
RlmQuoteApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmQuoteApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3358
|
+
RlmQuoteApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmQuoteApiService });
|
|
3359
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmQuoteApiService, decorators: [{
|
|
3360
|
+
type: Injectable
|
|
3361
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
|
3362
|
+
|
|
3271
3363
|
class ApiModule {
|
|
3272
3364
|
}
|
|
3273
3365
|
ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -3315,6 +3407,8 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
|
|
3315
3407
|
ConfigurationProcessorsApiService,
|
|
3316
3408
|
FlowStateApiService,
|
|
3317
3409
|
SandboxManagerApiService,
|
|
3410
|
+
RlmApiService,
|
|
3411
|
+
RlmQuoteApiService,
|
|
3318
3412
|
], imports: [HttpClientModule] });
|
|
3319
3413
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, decorators: [{
|
|
3320
3414
|
type: NgModule,
|
|
@@ -3363,6 +3457,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3363
3457
|
ConfigurationProcessorsApiService,
|
|
3364
3458
|
FlowStateApiService,
|
|
3365
3459
|
SandboxManagerApiService,
|
|
3460
|
+
RlmApiService,
|
|
3461
|
+
RlmQuoteApiService,
|
|
3366
3462
|
],
|
|
3367
3463
|
}]
|
|
3368
3464
|
}] });
|
|
@@ -3371,5 +3467,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
3371
3467
|
* Generated bundle index. Do not edit.
|
|
3372
3468
|
*/
|
|
3373
3469
|
|
|
3374
|
-
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 };
|
|
3470
|
+
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 };
|
|
3375
3471
|
//# sourceMappingURL=veloceapps-api.mjs.map
|