@veloceapps/api 11.0.0-0 → 11.0.0-1

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.
@@ -3,14 +3,11 @@ import { HttpParams, HttpHeaders, HttpErrorResponse, HttpClientModule } from '@a
3
3
  import * as i0 from '@angular/core';
4
4
  import { Injectable, NgModule } from '@angular/core';
5
5
  import * as i1 from '@veloceapps/core';
6
- import { uiDefinitionFromDTO, DomainComputation, ConfigurationContextMode, isLegacyDocumentTemplate, DocxTemplater, QuoteDraft, StringUtils, Expression, toLatestFlow, isDefined, Operator, isApexError, isCanvasError, ModelTranslatorUtils, ProductModelsContainer, ModelUtils, EntityUtil, RuleGroupTypes, parseJsonSafely, uiDefinitionToDTO, BaseHttpService, XrayService } from '@veloceapps/core';
7
- import { noop, throwError, of, zip, forkJoin, map as map$1, from, catchError as catchError$1, switchMap as switchMap$1 } from 'rxjs';
8
- import { map, catchError, tap, switchMap, defaultIfEmpty } from 'rxjs/operators';
6
+ import { uiDefinitionFromDTO, DomainComputation, ConfigurationContextMode, Expression, Operator, isApexError, isCanvasError, ModelTranslatorUtils, ProductModelsContainer, ModelUtils, EntityUtil, RuleGroupTypes, parseJsonSafely, uiDefinitionToDTO, BaseHttpService, XrayService } from '@veloceapps/core';
7
+ import { noop, throwError, of, map as map$1, from, catchError as catchError$1, forkJoin, switchMap } from 'rxjs';
8
+ import { map, catchError, tap } from 'rxjs/operators';
9
9
  import * as i1$2 from 'primeng/api';
10
- import { CurrencyPipe } from '@angular/common';
11
- import * as _ from 'lodash';
12
10
  import { isArray, omit } from 'lodash';
13
- import moment from 'moment';
14
11
 
15
12
  class AccountApiService {
16
13
  constructor(httpService) {
@@ -779,399 +776,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
779
776
  type: Injectable
780
777
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i1.FileDownloadService }]; } });
781
778
 
782
- class SalesforceApiService {
783
- constructor(httpService) {
784
- this.httpService = httpService;
785
- this.SERVICE_URL = '/proxy';
786
- }
787
- query(searchRequest, objectName, options) {
788
- return this.httpService.api({
789
- method: 'post',
790
- body: { ...searchRequest, count: searchRequest.count || 100 },
791
- url: `${this.SERVICE_URL}/query/${objectName}`,
792
- ...options,
793
- });
794
- }
795
- queryObjects(search, options) {
796
- let params = new HttpParams();
797
- if (search) {
798
- params = params.append('search', search);
799
- }
800
- return this.httpService.api({
801
- url: `${this.SERVICE_URL}/query`,
802
- params,
803
- ...options,
804
- });
805
- }
806
- search(req, options) {
807
- return this.httpService.api({
808
- url: `${this.SERVICE_URL}/rest/search`,
809
- params: { q: req.searchString },
810
- ...options,
811
- });
812
- }
813
- /**
814
- * @deprecated
815
- */
816
- describe(objectName, fieldName, options) {
817
- const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields` + (fieldName ? `/${fieldName}` : '');
818
- return this.httpService.api({ url: methodUrl, ...options });
819
- }
820
- describeObject(objectName, options) {
821
- const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields`;
822
- return this.httpService.api({ url: methodUrl, ...options });
823
- }
824
- describeField(objectName, fieldName, options) {
825
- const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields/${fieldName}`;
826
- return this.httpService.api({ url: methodUrl, ...options });
827
- }
828
- describe2(objectName, fields, options) {
829
- const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields`;
830
- return this.httpService.api({ method: 'post', url: methodUrl, body: fields, ...options });
831
- }
832
- apexGetRequest(path, params, options) {
833
- // this line is needed because HttpParams instance from Integration behaves wrong in studio instance of Angular
834
- const httpParams = new HttpParams({ fromString: params.toString() });
835
- return this.httpService.api({ url: `${this.SERVICE_URL}/apex${path}`, params: httpParams, ...options });
836
- }
837
- apexPostRequest(path, body, options) {
838
- return this.httpService.api({
839
- method: 'post',
840
- body,
841
- url: `${this.SERVICE_URL}/apex${path}`,
842
- ...options,
843
- });
844
- }
845
- getGlobalPicklists() {
846
- return this.httpService.api({
847
- method: 'get',
848
- url: `${this.SERVICE_URL}/globalvalueset`,
849
- });
850
- }
851
- getGlobalPicklistValues(id) {
852
- return this.httpService.api({
853
- method: 'get',
854
- url: `${this.SERVICE_URL}/globalvalueset/${id}/values`,
855
- });
856
- }
857
- }
858
- SalesforceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
859
- SalesforceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService });
860
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, decorators: [{
861
- type: Injectable
862
- }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
863
-
864
- class DocumentTemplatesApiService {
865
- constructor(service, salesforceApiService, fileDownloadService, documentAttachmentService, http) {
866
- this.service = service;
867
- this.salesforceApiService = salesforceApiService;
868
- this.fileDownloadService = fileDownloadService;
869
- this.documentAttachmentService = documentAttachmentService;
870
- this.http = http;
871
- this.SERVICE_URL = '/templates';
872
- this.DOCGEN_TAG = 'docgen';
873
- this.DOC_GEN_URL_FALLBACK = `${window.VELO_API}/docgen`;
874
- this.mapSfQueryResult = (limit) => map((records) => {
875
- if (!records.length) {
876
- return { _result: 'No Records Found' };
877
- }
878
- if (limit === 1) {
879
- return records[0];
880
- }
881
- return records;
882
- });
883
- this.mapBooleanIfAplicable = (value) => {
884
- if (value === 'true') {
885
- return true;
886
- }
887
- if (value === 'false') {
888
- return false;
889
- }
890
- return value;
891
- };
892
- if (window.VELO_DOCGEN_API) {
893
- this.DOC_GEN_URL = window.VELO_DOCGEN_API;
894
- }
895
- else {
896
- console.log(`window.VELO_DOCGEN_API not set, will use fallback "${this.DOC_GEN_URL_FALLBACK}"`);
897
- this.DOC_GEN_URL = this.DOC_GEN_URL_FALLBACK;
898
- }
899
- }
900
- getTemplates(tag) {
901
- return this.service.api({
902
- url: `${this.SERVICE_URL}`,
903
- method: 'get',
904
- params: {
905
- ...(tag && { tag }),
906
- },
907
- });
908
- }
909
- getTemplate(id) {
910
- return this.service.api({
911
- url: `${this.SERVICE_URL}/${id}`,
912
- method: 'get',
913
- });
914
- }
915
- upsertTemplate(template, file, reportProgress) {
916
- const formData = new FormData();
917
- if (file) {
918
- formData.append('file', file, file.name);
919
- }
920
- formData.append('template', new Blob([JSON.stringify(template)], {
921
- type: 'application/json',
922
- }));
923
- let url = `${this.SERVICE_URL}`;
924
- if (template.id) {
925
- url += `/${template.id}`;
926
- }
927
- return this.service.upload({
928
- url,
929
- body: formData,
930
- method: template.id ? 'put' : 'post',
931
- reportProgress,
932
- });
933
- }
934
- removeTemplate(id) {
935
- return this.service.api({
936
- url: `${this.SERVICE_URL}/${id}`,
937
- method: 'delete',
938
- });
939
- }
940
- restoreTemplate(id) {
941
- return this.service.api({
942
- url: `${this.SERVICE_URL}/${id}/restore`,
943
- method: 'patch',
944
- });
945
- }
946
- cloneTemplate(id, propertiesToOverride = {}) {
947
- return this.service.api({
948
- url: `${this.SERVICE_URL}/clone/${id}`,
949
- method: 'post',
950
- body: {
951
- id,
952
- propertiesToOverride,
953
- },
954
- });
955
- }
956
- getTemplateFile(id) {
957
- return this.service.api({
958
- method: 'get',
959
- url: `${this.SERVICE_URL}/${id}/file`,
960
- responseType: 'arraybuffer',
961
- });
962
- }
963
- downloadTemplateFile(id) {
964
- return this.service
965
- .api({
966
- url: `${this.SERVICE_URL}/${id}/file`,
967
- responseType: 'blob',
968
- observe: 'response',
969
- })
970
- .pipe(tap(response => {
971
- this.fileDownloadService.processDownload(response);
972
- }), map(response => response.body || response));
973
- }
974
- mergeDocuments(document, attachments) {
975
- const body = new FormData();
976
- attachments.forEach(attachment => {
977
- body.append('attachments', new Blob([attachment]));
978
- });
979
- body.append('orderform', document);
980
- return this.http.post(`${this.DOC_GEN_URL}/documents/merge`, body, {
981
- responseType: 'arraybuffer',
982
- });
983
- }
984
- generateDocumentV2(body, quoteId, isAsync) {
985
- body['docgenURL'] = window.VELO_DOCGEN_API ?? '';
986
- const params = {};
987
- if (isAsync) {
988
- params['async'] = 'true';
989
- }
990
- return this.service
991
- .api({
992
- method: 'post',
993
- url: `/docgen/${quoteId}/generate`,
994
- body,
995
- params,
996
- responseType: 'arraybuffer',
997
- })
998
- .pipe(map(pdf => {
999
- const blob = new Blob([pdf]);
1000
- const documentName = body.parameters['documentName'] ?? 'Veloce Proposal';
1001
- if (!isAsync) {
1002
- this.fileDownloadService.processDownload(blob, `${documentName}.${body.documentFormat.toLowerCase()}`);
1003
- }
1004
- return blob;
1005
- }));
1006
- }
1007
- getAttachments(searchRequest) {
1008
- return this.documentAttachmentService.getAttachments(searchRequest);
1009
- }
1010
- getAttachmentFile(id) {
1011
- return this.documentAttachmentService.getAttachmentFile(id);
1012
- }
1013
- createAttachment(attachment, file, reportProgress) {
1014
- return this.documentAttachmentService.createAttachment(attachment, file, reportProgress);
1015
- }
1016
- removeAttachment(id) {
1017
- return this.documentAttachmentService.removeAttachment(id);
1018
- }
1019
- generateDocumentData(template, object, params = {}) {
1020
- if (isLegacyDocumentTemplate(template)) {
1021
- return this.generateDocumentDataLegacy(template, object, params);
1022
- }
1023
- const templateProperties = template.properties?.reduce((acc, { name, value }) => ({ ...acc, [name]: this.mapBooleanIfAplicable(value) }), {});
1024
- /*
1025
- Resolve quote and template properties for now
1026
- When procedures are ready, whey will replace template scripts.
1027
-
1028
- TODO: run procedure to resolve document data
1029
- */
1030
- return of({
1031
- ...(typeof object === 'object' ? object : { object }),
1032
- ...templateProperties,
1033
- });
1034
- }
1035
- generateDocument(template, object, params = {}) {
1036
- const documentData$ = this.generateDocumentData(template, object, { ...params, shouldPreventDownload: true });
1037
- return zip(this.getTemplateFile(template.id), documentData$, this.resolveAttachments$(template)).pipe(switchMap(([templateFile, data, attachments]) => {
1038
- const document = DocxTemplater.generate(templateFile, data);
1039
- const properties = object?.context?.properties ?? object?.properties ?? {};
1040
- const documentName = template.properties?.find(({ name }) => name === 'documentName')?.value ||
1041
- properties['Name'] ||
1042
- template.name;
1043
- const documentFormat = params.documentFormat ?? template.properties?.find(p => p.name === 'documentFormat')?.value;
1044
- if (documentFormat === 'DOCX') {
1045
- this.fileDownloadService.processDownload(document, documentName);
1046
- return of(document);
1047
- }
1048
- return this.mergeDocuments(document, attachments).pipe(switchMap(pdf => {
1049
- if (params.attachToQuote && QuoteDraft.isQuote(object)) {
1050
- const file = new File([pdf], `${documentName}.pdf`);
1051
- return this.documentAttachmentService
1052
- .createAttachment({
1053
- linkedEntityId: object.quoteId,
1054
- fileName: documentName,
1055
- fileExtension: 'pdf',
1056
- tags: this.DOCGEN_TAG,
1057
- }, file)
1058
- .pipe(map(() => pdf));
1059
- }
1060
- return of(pdf);
1061
- }), map(pdf => {
1062
- const blob = new Blob([pdf]);
1063
- if (!params.shouldPreventDownload) {
1064
- this.fileDownloadService.processDownload(blob, `${documentName}.pdf`);
1065
- }
1066
- return blob;
1067
- }));
1068
- }));
1069
- }
1070
- generateDocumentDataLegacy(template, object, params = {}) {
1071
- const shouldPreventDownload = params.shouldPreventDownload;
1072
- const allQueries = [...(template?.queries ?? [])];
1073
- const properties = object?.context?.properties ?? object?.properties ?? {};
1074
- const accountId = properties?.['AccountId'];
1075
- const userId = properties?.['UserId'];
1076
- if (accountId) {
1077
- allQueries.push({
1078
- queryName: 'QuoteAccountQuery',
1079
- objectName: 'Account',
1080
- resultObjectName: 'account',
1081
- statement: `Id ='${accountId}'`,
1082
- fields: [],
1083
- });
1084
- }
1085
- if (userId) {
1086
- allQueries.push({
1087
- queryName: 'QuoteUserQuery',
1088
- objectName: 'User',
1089
- resultObjectName: 'agent',
1090
- statement: `Id ='${userId}'`,
1091
- fields: [],
1092
- });
1093
- }
1094
- const queries = allQueries.map(query => this.queryObject(query, { properties })) || [];
1095
- return forkJoin([...queries]).pipe(defaultIfEmpty([]), map(results => {
1096
- const queriesResult = _.chain(results)
1097
- .reduce((acc, r) => {
1098
- if (r) {
1099
- return { ...acc, ...r };
1100
- }
1101
- return acc;
1102
- }, {})
1103
- .value();
1104
- const templateProperties = (template?.properties || []).reduce((trunk, { name, value }) => {
1105
- return {
1106
- ...trunk,
1107
- [name]: this.mapBooleanIfAplicable(value),
1108
- };
1109
- }, {});
1110
- const data = {
1111
- ...(typeof object === 'object' ? object : { object }),
1112
- ...queriesResult,
1113
- ...templateProperties,
1114
- };
1115
- if (template.script && template.script.trim().length) {
1116
- const currencyFormat = template.properties?.find(({ name }) => name === 'currencyFormat')?.value || '1.2-2';
1117
- const dateFormat = template.properties?.find(({ name }) => name === 'dateFormat')?.value || 'D/MMM/YYYY';
1118
- const formatDate = (value) => {
1119
- return value ? moment(value).format(dateFormat) : value;
1120
- };
1121
- const transform = new Function(`return ${template.script}`)();
1122
- const transformedData = transform({
1123
- ...data,
1124
- utils: {
1125
- lodash: _,
1126
- currency: (value) => new CurrencyPipe('en-US').transform(value, 'USD', 'symbol', currencyFormat),
1127
- date: formatDate,
1128
- },
1129
- ToDay: formatDate(Date.now()),
1130
- });
1131
- if (!shouldPreventDownload) {
1132
- const blob = new Blob([JSON.stringify(transformedData)]);
1133
- this.fileDownloadService.processDownload(blob, 'data.json');
1134
- }
1135
- return transformedData;
1136
- }
1137
- return data;
1138
- }));
1139
- }
1140
- resolveAttachments$(template) {
1141
- const attachmentIds = template.attachments?.map(({ id }) => id).filter(Boolean) ?? [];
1142
- if (!attachmentIds.length) {
1143
- return of([]);
1144
- }
1145
- return forkJoin(attachmentIds.map(id => this.documentAttachmentService.getAttachmentFile(id, true)));
1146
- }
1147
- queryObject({ objectName, resultObjectName, fields, statement }, { properties }) {
1148
- const patternLimit = /(\s*limit\s\d*)/i;
1149
- let limit = 1;
1150
- if (statement && patternLimit.test(statement)) {
1151
- const limitStr = statement?.match(patternLimit)?.[1]?.trim().substring(5).trim();
1152
- if (limitStr) {
1153
- limit = Number.parseInt(limitStr, 10);
1154
- }
1155
- statement = statement.replace(patternLimit, '');
1156
- }
1157
- const resolvedStatement = statement
1158
- ? StringUtils.fillPlaceholders(statement, properties, /:\s*(\w[\w\d_.]+)/i)
1159
- : undefined;
1160
- const searchRequest = {
1161
- skip: 0,
1162
- count: limit,
1163
- rawCondition: resolvedStatement,
1164
- ...(fields?.length && !!fields[0] && { fields }),
1165
- };
1166
- return this.salesforceApiService.query(searchRequest, objectName).pipe(this.mapSfQueryResult(limit), map(value => ({ [resultObjectName]: value })));
1167
- }
1168
- }
1169
- DocumentTemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentTemplatesApiService, deps: [{ token: i1.BaseHttpService }, { token: SalesforceApiService }, { token: i1.FileDownloadService }, { token: DocumentAttachmentApiService }, { token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1170
- DocumentTemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentTemplatesApiService });
1171
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentTemplatesApiService, decorators: [{
1172
- type: Injectable
1173
- }], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: SalesforceApiService }, { type: i1.FileDownloadService }, { type: DocumentAttachmentApiService }, { type: i1$1.HttpClient }]; } });
1174
-
1175
779
  class EndpointsApiService {
1176
780
  constructor(baseHttpService) {
1177
781
  this.baseHttpService = baseHttpService;
@@ -1400,7 +1004,9 @@ class FlowsApiService {
1400
1004
  }));
1401
1005
  }
1402
1006
  fetchFlows() {
1403
- return this.configurationSettingsApiService.fetchSetting(this.flowsKey).pipe(map((setting) => (setting?.value ? JSON.parse(setting.value) : [])), map(anyFlows => anyFlows.map(toLatestFlow).filter(isDefined)));
1007
+ return this.configurationSettingsApiService
1008
+ .fetchSetting(this.flowsKey)
1009
+ .pipe(map((setting) => (setting?.value ? JSON.parse(setting.value) : [])));
1404
1010
  }
1405
1011
  }
1406
1012
  FlowsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
@@ -2590,67 +2196,151 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2590
2196
  type: Injectable
2591
2197
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2592
2198
 
2593
- class RuleGroupsApiService {
2199
+ class RlmApiService {
2594
2200
  constructor(baseHttpService) {
2595
2201
  this.baseHttpService = baseHttpService;
2596
- this.serviceUrl = '/admin/rule-groups';
2597
- this.fetchRuleGroups$ = () => {
2598
- return this.searchRuleGroups$(new Expression(), 0, 100);
2599
- };
2600
- this.searchRuleGroups$ = (expression, skip, count) => {
2601
- let params = new HttpParams();
2602
- params = params.set('skip', '' + skip);
2603
- params = params.set('count', '' + count);
2604
- return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
2605
- };
2606
- this.createRuleGroup$ = (ruleGroup) => {
2607
- return this.baseHttpService.api({
2608
- url: `${this.serviceUrl}`,
2609
- method: 'post',
2610
- body: ruleGroup,
2611
- });
2612
- };
2613
- this.updateRuleGroup$ = (ruleGroup) => {
2614
- return this.baseHttpService.api({
2615
- url: `${this.serviceUrl}/${ruleGroup.id}`,
2616
- method: 'post',
2617
- body: ruleGroup,
2618
- });
2619
- };
2620
- this.duplicateRuleGroup$ = (body) => {
2621
- return this.baseHttpService
2622
- .api({
2623
- url: `${this.serviceUrl}/${body.id}/clone`,
2624
- method: 'post',
2625
- body,
2626
- })
2627
- .pipe(map$1(response => response.clonedRecordId));
2628
- };
2629
- this.removeRuleGroup$ = (id) => {
2630
- return this.baseHttpService.api({
2631
- url: `${this.serviceUrl}/${id}`,
2632
- method: 'delete',
2633
- });
2634
- };
2635
- this.restoreRuleGroup$ = (id) => {
2636
- return this.baseHttpService.api({
2637
- url: `${this.serviceUrl}/${id}/restore`,
2638
- method: 'patch',
2639
- });
2640
- };
2202
+ this.serviceUrl = '/rlm';
2641
2203
  }
2642
- }
2643
- RuleGroupsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2644
- RuleGroupsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService });
2645
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService, decorators: [{
2646
- type: Injectable
2647
- }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2648
-
2649
- class RulesApiService {
2650
- constructor(baseHttpService) {
2651
- this.baseHttpService = baseHttpService;
2652
- this.serviceUrl = '/admin/rules';
2653
- this.fetchRules$ = () => {
2204
+ // TODO: request RLM data only when RLM is installed. Otherwise skip rlm requests. Discuss solution|approach with BE
2205
+ fetchContextDefinitions$() {
2206
+ return this.baseHttpService
2207
+ .api({ url: `${this.serviceUrl}/context`, skipErrorHandler: true })
2208
+ .pipe(catchError(() => {
2209
+ return of([]);
2210
+ }));
2211
+ }
2212
+ fetchContextMappings$(id) {
2213
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/context/${id}/mappings` });
2214
+ }
2215
+ fetchContextDefinitionStructure$(id) {
2216
+ return this.baseHttpService
2217
+ .api({
2218
+ url: `${this.serviceUrl}/context/${id}/structure/details`,
2219
+ skipErrorHandler: true,
2220
+ })
2221
+ .pipe(catchError(() => {
2222
+ return of([]);
2223
+ }), map(objects => {
2224
+ return objects.map(object => {
2225
+ const tag = object.tags?.[0]?.title;
2226
+ const objectAttributes = object.attributes || [];
2227
+ return {
2228
+ id: object.id,
2229
+ title: tag || object.title,
2230
+ attributes: objectAttributes.map(attribute => {
2231
+ const tag = attribute.tags?.[0]?.title;
2232
+ return {
2233
+ title: tag || attribute.title,
2234
+ fieldType: attribute.fieldType,
2235
+ dataType: attribute.dataType,
2236
+ };
2237
+ }),
2238
+ };
2239
+ });
2240
+ }));
2241
+ }
2242
+ fetchRlmProcedures(contextDefinitionId) {
2243
+ const params = {};
2244
+ if (contextDefinitionId) {
2245
+ params['contextDefinitionId'] = contextDefinitionId;
2246
+ }
2247
+ return this.baseHttpService.api({
2248
+ url: `${this.serviceUrl}/procedures`,
2249
+ params,
2250
+ });
2251
+ }
2252
+ }
2253
+ RlmApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2254
+ RlmApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmApiService });
2255
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmApiService, decorators: [{
2256
+ type: Injectable
2257
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2258
+
2259
+ class RlmQuoteApiService {
2260
+ constructor(httpService) {
2261
+ this.httpService = httpService;
2262
+ this.SERVICE_URL = '/quotes/rlm';
2263
+ }
2264
+ getQuote(mappingType, objectId, contextMappingId, options) {
2265
+ const params = { mappingType };
2266
+ if (contextMappingId) {
2267
+ params['contextMappingId'] = contextMappingId;
2268
+ }
2269
+ return this.httpService.api({
2270
+ method: 'get',
2271
+ url: `${this.SERVICE_URL}/${objectId}`,
2272
+ params,
2273
+ ...options,
2274
+ });
2275
+ }
2276
+ }
2277
+ RlmQuoteApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmQuoteApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2278
+ RlmQuoteApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmQuoteApiService });
2279
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RlmQuoteApiService, decorators: [{
2280
+ type: Injectable
2281
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2282
+
2283
+ class RuleGroupsApiService {
2284
+ constructor(baseHttpService) {
2285
+ this.baseHttpService = baseHttpService;
2286
+ this.serviceUrl = '/admin/rule-groups';
2287
+ this.fetchRuleGroups$ = () => {
2288
+ return this.searchRuleGroups$(new Expression(), 0, 100);
2289
+ };
2290
+ this.searchRuleGroups$ = (expression, skip, count) => {
2291
+ let params = new HttpParams();
2292
+ params = params.set('skip', '' + skip);
2293
+ params = params.set('count', '' + count);
2294
+ return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
2295
+ };
2296
+ this.createRuleGroup$ = (ruleGroup) => {
2297
+ return this.baseHttpService.api({
2298
+ url: `${this.serviceUrl}`,
2299
+ method: 'post',
2300
+ body: ruleGroup,
2301
+ });
2302
+ };
2303
+ this.updateRuleGroup$ = (ruleGroup) => {
2304
+ return this.baseHttpService.api({
2305
+ url: `${this.serviceUrl}/${ruleGroup.id}`,
2306
+ method: 'post',
2307
+ body: ruleGroup,
2308
+ });
2309
+ };
2310
+ this.duplicateRuleGroup$ = (body) => {
2311
+ return this.baseHttpService
2312
+ .api({
2313
+ url: `${this.serviceUrl}/${body.id}/clone`,
2314
+ method: 'post',
2315
+ body,
2316
+ })
2317
+ .pipe(map$1(response => response.clonedRecordId));
2318
+ };
2319
+ this.removeRuleGroup$ = (id) => {
2320
+ return this.baseHttpService.api({
2321
+ url: `${this.serviceUrl}/${id}`,
2322
+ method: 'delete',
2323
+ });
2324
+ };
2325
+ this.restoreRuleGroup$ = (id) => {
2326
+ return this.baseHttpService.api({
2327
+ url: `${this.serviceUrl}/${id}/restore`,
2328
+ method: 'patch',
2329
+ });
2330
+ };
2331
+ }
2332
+ }
2333
+ RuleGroupsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2334
+ RuleGroupsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService });
2335
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService, decorators: [{
2336
+ type: Injectable
2337
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2338
+
2339
+ class RulesApiService {
2340
+ constructor(baseHttpService) {
2341
+ this.baseHttpService = baseHttpService;
2342
+ this.serviceUrl = '/admin/rules';
2343
+ this.fetchRules$ = () => {
2654
2344
  return this.searchRules$(new Expression(), 0, 100);
2655
2345
  };
2656
2346
  this.searchRules$ = (expression, skip, count) => {
@@ -2738,6 +2428,177 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2738
2428
  type: Injectable
2739
2429
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2740
2430
 
2431
+ class SalesforceApiService {
2432
+ constructor(httpService) {
2433
+ this.httpService = httpService;
2434
+ this.SERVICE_URL = '/proxy';
2435
+ }
2436
+ query(searchRequest, objectName, options) {
2437
+ return this.httpService.api({
2438
+ method: 'post',
2439
+ body: { ...searchRequest, count: searchRequest.count || 100 },
2440
+ url: `${this.SERVICE_URL}/query/${objectName}`,
2441
+ ...options,
2442
+ });
2443
+ }
2444
+ queryObjects(search, options) {
2445
+ let params = new HttpParams();
2446
+ if (search) {
2447
+ params = params.append('search', search);
2448
+ }
2449
+ return this.httpService.api({
2450
+ url: `${this.SERVICE_URL}/query`,
2451
+ params,
2452
+ ...options,
2453
+ });
2454
+ }
2455
+ search(req, options) {
2456
+ return this.httpService.api({
2457
+ url: `${this.SERVICE_URL}/rest/search`,
2458
+ params: { q: req.searchString },
2459
+ ...options,
2460
+ });
2461
+ }
2462
+ /**
2463
+ * @deprecated
2464
+ */
2465
+ describe(objectName, fieldName, options) {
2466
+ const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields` + (fieldName ? `/${fieldName}` : '');
2467
+ return this.httpService.api({ url: methodUrl, ...options });
2468
+ }
2469
+ describeObject(objectName, options) {
2470
+ const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields`;
2471
+ return this.httpService.api({ url: methodUrl, ...options });
2472
+ }
2473
+ describeField(objectName, fieldName, options) {
2474
+ const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields/${fieldName}`;
2475
+ return this.httpService.api({ url: methodUrl, ...options });
2476
+ }
2477
+ describe2(objectName, fields, options) {
2478
+ const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields`;
2479
+ return this.httpService.api({ method: 'post', url: methodUrl, body: fields, ...options });
2480
+ }
2481
+ apexGetRequest(path, params, options) {
2482
+ // this line is needed because HttpParams instance from Integration behaves wrong in studio instance of Angular
2483
+ const httpParams = new HttpParams({ fromString: params.toString() });
2484
+ return this.httpService.api({ url: `${this.SERVICE_URL}/apex${path}`, params: httpParams, ...options });
2485
+ }
2486
+ apexPostRequest(path, body, options) {
2487
+ return this.httpService.api({
2488
+ method: 'post',
2489
+ body,
2490
+ url: `${this.SERVICE_URL}/apex${path}`,
2491
+ ...options,
2492
+ });
2493
+ }
2494
+ getGlobalPicklists() {
2495
+ return this.httpService.api({
2496
+ method: 'get',
2497
+ url: `${this.SERVICE_URL}/globalvalueset`,
2498
+ });
2499
+ }
2500
+ getGlobalPicklistValues(id) {
2501
+ return this.httpService.api({
2502
+ method: 'get',
2503
+ url: `${this.SERVICE_URL}/globalvalueset/${id}/values`,
2504
+ });
2505
+ }
2506
+ }
2507
+ SalesforceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2508
+ SalesforceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService });
2509
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, decorators: [{
2510
+ type: Injectable
2511
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2512
+
2513
+ class SandboxManagerApiService {
2514
+ constructor(messageService) {
2515
+ this.messageService = messageService;
2516
+ /**
2517
+ * Shows an error message using the message service.
2518
+ *
2519
+ * @param {string} message - the error message to be published.
2520
+ */
2521
+ this.publishErrorMessage = (message) => {
2522
+ this.messageService.add({ severity: 'error', summary: message, sticky: true });
2523
+ };
2524
+ }
2525
+ getSalesforceOrganizations$() {
2526
+ try {
2527
+ return window.doSandboxCall
2528
+ ? from(window.doSandboxCall('orgs', '', 'GET')).pipe(map$1(response => handleCanvasResponse(response, [], this.publishErrorMessage)), catchError$1(() => of([])))
2529
+ : of([]);
2530
+ }
2531
+ catch {
2532
+ return of([]);
2533
+ }
2534
+ }
2535
+ getAvailableSalesforceOrganizationSizes$() {
2536
+ try {
2537
+ return window.doSandboxCall
2538
+ ? from(window.doSandboxCall('available-sizes', '', 'GET')).pipe(map$1(response => handleCanvasResponse(response, {}, this.publishErrorMessage)), catchError$1(() => of({})))
2539
+ : of({});
2540
+ }
2541
+ catch {
2542
+ return of({});
2543
+ }
2544
+ }
2545
+ createSalesforceOrganization$(payload) {
2546
+ try {
2547
+ return window.doSandboxCall
2548
+ ? from(window.doSandboxCall('orgs', JSON.stringify(payload), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
2549
+ : of(undefined);
2550
+ }
2551
+ catch (err) {
2552
+ return of(undefined);
2553
+ }
2554
+ }
2555
+ updateSalesforceOrganization$(payload) {
2556
+ try {
2557
+ return window.doSandboxCall
2558
+ ? from(window.doSandboxCall(`orgs/${payload.orgId}`, JSON.stringify(payload), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
2559
+ : of(undefined);
2560
+ }
2561
+ catch {
2562
+ return of(undefined);
2563
+ }
2564
+ }
2565
+ deleteSalesforceOrganization$(payload) {
2566
+ try {
2567
+ return window.doSandboxCall
2568
+ ? from(window.doSandboxCall(`orgs/${payload.orgId}`, '', 'DELETE')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
2569
+ : of(undefined);
2570
+ }
2571
+ catch {
2572
+ return of(undefined);
2573
+ }
2574
+ }
2575
+ activateSalesforceOrganization$(payload) {
2576
+ try {
2577
+ return window.doSandboxCall
2578
+ ? from(window.doSandboxCall(`orgs/${payload.orgId}/activate`, JSON.stringify({}), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
2579
+ : of(undefined);
2580
+ }
2581
+ catch {
2582
+ return of(undefined);
2583
+ }
2584
+ }
2585
+ deactivateSalesforceOrganization$(payload) {
2586
+ try {
2587
+ return window.doSandboxCall
2588
+ ? from(window.doSandboxCall(`orgs/${payload.orgId}/deactivate`, JSON.stringify({}), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
2589
+ : of(undefined);
2590
+ }
2591
+ catch {
2592
+ return of(undefined);
2593
+ }
2594
+ }
2595
+ }
2596
+ SandboxManagerApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SandboxManagerApiService, deps: [{ token: i1$2.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
2597
+ SandboxManagerApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SandboxManagerApiService });
2598
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SandboxManagerApiService, decorators: [{
2599
+ type: Injectable
2600
+ }], ctorParameters: function () { return [{ type: i1$2.MessageService }]; } });
2601
+
2741
2602
  class ScriptsApiService {
2742
2603
  constructor(baseHttpService) {
2743
2604
  this.baseHttpService = baseHttpService;
@@ -3108,7 +2969,7 @@ class UITemplatesApiService {
3108
2969
  url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories`,
3109
2970
  params,
3110
2971
  })
3111
- .pipe(switchMap$1(dtos => {
2972
+ .pipe(switchMap(dtos => {
3112
2973
  if (!dtos.length) {
3113
2974
  return of([]);
3114
2975
  }
@@ -3120,7 +2981,7 @@ class UITemplatesApiService {
3120
2981
  .api({
3121
2982
  url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories/${storyId}`,
3122
2983
  })
3123
- .pipe(switchMap$1(dto => this.convertToComponentStory$(templateId, componentId, dto)));
2984
+ .pipe(switchMap(dto => this.convertToComponentStory$(templateId, componentId, dto)));
3124
2985
  };
3125
2986
  this.createComponentStory$ = (templateId, story) => {
3126
2987
  return this.baseHttpService.api({
@@ -3189,7 +3050,7 @@ class UITemplatesApiService {
3189
3050
  ]).pipe(map$1(([html, js, css, json]) => ({ html, js, css, json })));
3190
3051
  };
3191
3052
  this.fetchComponentsAttachments$ = (templateId) => {
3192
- return this.fetchComponents$(templateId).pipe(switchMap$1(components => {
3053
+ return this.fetchComponents$(templateId).pipe(switchMap(components => {
3193
3054
  return forkJoin(components.map(component => this.fetchComponentAttachments$(templateId, component)));
3194
3055
  }));
3195
3056
  };
@@ -3334,179 +3195,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
3334
3195
  type: Injectable
3335
3196
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
3336
3197
 
3337
- class SandboxManagerApiService {
3338
- constructor(messageService) {
3339
- this.messageService = messageService;
3340
- /**
3341
- * Shows an error message using the message service.
3342
- *
3343
- * @param {string} message - the error message to be published.
3344
- */
3345
- this.publishErrorMessage = (message) => {
3346
- this.messageService.add({ severity: 'error', summary: message, sticky: true });
3347
- };
3348
- }
3349
- getSalesforceOrganizations$() {
3350
- try {
3351
- return window.doSandboxCall
3352
- ? from(window.doSandboxCall('orgs', '', 'GET')).pipe(map$1(response => handleCanvasResponse(response, [], this.publishErrorMessage)), catchError$1(() => of([])))
3353
- : of([]);
3354
- }
3355
- catch {
3356
- return of([]);
3357
- }
3358
- }
3359
- getAvailableSalesforceOrganizationSizes$() {
3360
- try {
3361
- return window.doSandboxCall
3362
- ? from(window.doSandboxCall('available-sizes', '', 'GET')).pipe(map$1(response => handleCanvasResponse(response, {}, this.publishErrorMessage)), catchError$1(() => of({})))
3363
- : of({});
3364
- }
3365
- catch {
3366
- return of({});
3367
- }
3368
- }
3369
- createSalesforceOrganization$(payload) {
3370
- try {
3371
- return window.doSandboxCall
3372
- ? from(window.doSandboxCall('orgs', JSON.stringify(payload), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
3373
- : of(undefined);
3374
- }
3375
- catch (err) {
3376
- return of(undefined);
3377
- }
3378
- }
3379
- updateSalesforceOrganization$(payload) {
3380
- try {
3381
- return window.doSandboxCall
3382
- ? from(window.doSandboxCall(`orgs/${payload.orgId}`, JSON.stringify(payload), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
3383
- : of(undefined);
3384
- }
3385
- catch {
3386
- return of(undefined);
3387
- }
3388
- }
3389
- deleteSalesforceOrganization$(payload) {
3390
- try {
3391
- return window.doSandboxCall
3392
- ? from(window.doSandboxCall(`orgs/${payload.orgId}`, '', 'DELETE')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
3393
- : of(undefined);
3394
- }
3395
- catch {
3396
- return of(undefined);
3397
- }
3398
- }
3399
- activateSalesforceOrganization$(payload) {
3400
- try {
3401
- return window.doSandboxCall
3402
- ? from(window.doSandboxCall(`orgs/${payload.orgId}/activate`, JSON.stringify({}), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
3403
- : of(undefined);
3404
- }
3405
- catch {
3406
- return of(undefined);
3407
- }
3408
- }
3409
- deactivateSalesforceOrganization$(payload) {
3410
- try {
3411
- return window.doSandboxCall
3412
- ? from(window.doSandboxCall(`orgs/${payload.orgId}/deactivate`, JSON.stringify({}), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError$1(() => of(undefined)))
3413
- : of(undefined);
3414
- }
3415
- catch {
3416
- return of(undefined);
3417
- }
3418
- }
3419
- }
3420
- SandboxManagerApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SandboxManagerApiService, deps: [{ token: i1$2.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
3421
- SandboxManagerApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SandboxManagerApiService });
3422
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SandboxManagerApiService, decorators: [{
3423
- type: Injectable
3424
- }], ctorParameters: function () { return [{ type: i1$2.MessageService }]; } });
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
-
3510
3198
  class ApiModule {
3511
3199
  }
3512
3200
  ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
@@ -3522,7 +3210,6 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
3522
3210
  ProductModelApiService,
3523
3211
  ProceduresApiService,
3524
3212
  QuoteApiService,
3525
- DocumentTemplatesApiService,
3526
3213
  RampApiService,
3527
3214
  SalesforceApiService,
3528
3215
  UITemplatesApiService,
@@ -3572,7 +3259,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
3572
3259
  ProductModelApiService,
3573
3260
  ProceduresApiService,
3574
3261
  QuoteApiService,
3575
- DocumentTemplatesApiService,
3576
3262
  RampApiService,
3577
3263
  SalesforceApiService,
3578
3264
  UITemplatesApiService,
@@ -3614,5 +3300,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
3614
3300
  * Generated bundle index. Do not edit.
3615
3301
  */
3616
3302
 
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 };
3303
+ export { AccountApiService, ApiModule, CatalogAdminApiService, CatalogApiService, ConfigurationApiService, ConfigurationProcessorsApiService, ConfigurationSettingsApiService, ContextApiService, ContractedPriceApiService, DeltaApiService, DocumentAttachmentApiService, 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 };
3618
3304
  //# sourceMappingURL=veloceapps-api.mjs.map