@veloceapps/api 10.0.0-17 → 10.0.0-19

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.
@@ -3421,8 +3421,13 @@ class RlmApiService {
3421
3421
  this.baseHttpService = baseHttpService;
3422
3422
  this.serviceUrl = '/rlm';
3423
3423
  }
3424
+ // TODO: request RLM data only when RLM is installed. Otherwise skip rlm requests. Discuss solution|approach with BE
3424
3425
  fetchContextDefinitions$() {
3425
- return this.baseHttpService.api({ url: `${this.serviceUrl}/context` });
3426
+ return this.baseHttpService
3427
+ .api({ url: `${this.serviceUrl}/context`, skipErrorHandler: true })
3428
+ .pipe(catchError(() => {
3429
+ return of([]);
3430
+ }));
3426
3431
  }
3427
3432
  fetchContextMappings$(id) {
3428
3433
  return this.baseHttpService.api({ url: `${this.serviceUrl}/context/${id}/mappings` });
@@ -3431,8 +3436,11 @@ class RlmApiService {
3431
3436
  return this.baseHttpService
3432
3437
  .api({
3433
3438
  url: `${this.serviceUrl}/context/${id}/structure/details`,
3439
+ skipErrorHandler: true,
3434
3440
  })
3435
- .pipe(map(objects => {
3441
+ .pipe(catchError(() => {
3442
+ return of([]);
3443
+ }), map(objects => {
3436
3444
  return objects.map(object => {
3437
3445
  const tag = object.tags?.[0]?.title;
3438
3446
  return {
@@ -3468,11 +3476,11 @@ class RlmQuoteApiService {
3468
3476
  this.httpService = httpService;
3469
3477
  this.SERVICE_URL = '/quotes/rlm';
3470
3478
  }
3471
- getQuote(objectId, contextMappingId, options) {
3479
+ getQuote(mappingType, objectId, contextMappingId, options) {
3472
3480
  return this.httpService.api({
3473
3481
  method: 'get',
3474
3482
  url: `${this.SERVICE_URL}/${objectId}`,
3475
- params: { contextMappingId },
3483
+ params: { mappingType, contextMappingId },
3476
3484
  ...options,
3477
3485
  });
3478
3486
  }