@veloceapps/api 11.0.0-12 → 11.0.0-120

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.
Files changed (133) hide show
  1. package/esm2020/src/index.mjs +1 -19
  2. package/esm2020/src/lib/api.module.mjs +1 -55
  3. package/esm2020/src/lib/types/index.mjs +1 -3
  4. package/esm2020/src/lib/types/stateful-configuration.types.mjs +1 -1
  5. package/esm2020/v2/api-v2.module.mjs +44 -22
  6. package/esm2020/v2/services/cache-api.service.mjs +22 -0
  7. package/esm2020/v2/services/catalog-admin-api.service.mjs +192 -0
  8. package/esm2020/v2/services/catalog-api.service.mjs +90 -0
  9. package/esm2020/v2/services/configuration-settings-api.service.mjs +89 -0
  10. package/esm2020/v2/services/context-definition-admin-api.service.mjs +73 -0
  11. package/esm2020/v2/services/document-attachment-api.service.mjs +66 -0
  12. package/esm2020/v2/services/endpoints-admin-api.service.mjs +79 -0
  13. package/esm2020/v2/services/flows-api.service.mjs +29 -0
  14. package/esm2020/v2/services/functions-admin-api.service.mjs +116 -0
  15. package/esm2020/v2/services/guided-sellings-admin-api.service.mjs +65 -0
  16. package/esm2020/v2/services/guided-sellings-api.service.mjs +37 -0
  17. package/esm2020/v2/services/index.mjs +22 -11
  18. package/esm2020/v2/services/orchestrations-admin-api.service.mjs +87 -0
  19. package/esm2020/v2/services/orchestrations-api.service.mjs +23 -0
  20. package/esm2020/v2/services/pcm-api.service.mjs +38 -0
  21. package/esm2020/v2/services/picklists-admin-api.service.mjs +41 -0
  22. package/esm2020/v2/services/products-admin-api.service.mjs +90 -0
  23. package/esm2020/v2/services/sales-transactions-api.service.mjs +20 -36
  24. package/esm2020/v2/services/salesforce-api.service.mjs +83 -0
  25. package/esm2020/v2/services/shopping-cart-settings-api.service.mjs +28 -0
  26. package/esm2020/v2/services/ui-definitions-admin-api.service.mjs +70 -0
  27. package/esm2020/v2/services/ui-templates-admin-api.service.mjs +286 -0
  28. package/esm2020/v2/services/veloce-objects-api.service.mjs +90 -0
  29. package/esm2020/v2/types/attachment.types.mjs +2 -0
  30. package/esm2020/v2/types/dto/configuration-settings-dto.types.mjs +22 -0
  31. package/esm2020/v2/types/dto/ui-definition-dto.types.mjs +2 -0
  32. package/esm2020/v2/types/function.types.mjs +2 -0
  33. package/esm2020/v2/types/index.mjs +4 -1
  34. package/esm2020/v2/types/pcm.types.mjs +2 -0
  35. package/esm2020/v2/types/procedure.types.mjs +1 -1
  36. package/esm2020/v2/types/sales-transaction.types.mjs +1 -1
  37. package/esm2020/v2/types/search-request.types.mjs +2 -0
  38. package/esm2020/v2/utils/ui-definition.utils.mjs +23 -0
  39. package/fesm2015/veloceapps-api-v2.mjs +1127 -411
  40. package/fesm2015/veloceapps-api-v2.mjs.map +1 -1
  41. package/fesm2015/veloceapps-api.mjs +68 -1476
  42. package/fesm2015/veloceapps-api.mjs.map +1 -1
  43. package/fesm2020/veloceapps-api-v2.mjs +1255 -460
  44. package/fesm2020/veloceapps-api-v2.mjs.map +1 -1
  45. package/fesm2020/veloceapps-api.mjs +107 -1593
  46. package/fesm2020/veloceapps-api.mjs.map +1 -1
  47. package/package.json +1 -1
  48. package/src/index.d.ts +0 -18
  49. package/src/lib/types/index.d.ts +0 -2
  50. package/src/lib/types/stateful-configuration.types.d.ts +1 -2
  51. package/v2/services/cache-api.service.d.ts +11 -0
  52. package/{src/lib → v2}/services/catalog-admin-api.service.d.ts +2 -2
  53. package/{src/lib → v2}/services/catalog-api.service.d.ts +5 -5
  54. package/{src/lib → v2}/services/configuration-settings-api.service.d.ts +1 -2
  55. package/v2/services/{context-definition-api.service.d.ts → context-definition-admin-api.service.d.ts} +5 -4
  56. package/{src/lib → v2}/services/document-attachment-api.service.d.ts +1 -1
  57. package/{src/lib/services/endpoints-api.service.d.ts → v2/services/endpoints-admin-api.service.d.ts} +3 -4
  58. package/v2/services/functions-admin-api.service.d.ts +25 -0
  59. package/v2/services/index.d.ts +21 -10
  60. package/v2/services/orchestrations-admin-api.service.d.ts +21 -0
  61. package/v2/services/orchestrations-api.service.d.ts +12 -0
  62. package/v2/services/pcm-api.service.d.ts +12 -0
  63. package/{src/lib/services/picklists-api.service.d.ts → v2/services/picklists-admin-api.service.d.ts} +3 -3
  64. package/v2/services/products-admin-api.service.d.ts +21 -0
  65. package/v2/services/sales-transactions-api.service.d.ts +11 -5
  66. package/{src/lib → v2}/services/salesforce-api.service.d.ts +1 -0
  67. package/v2/services/ui-definitions-admin-api.service.d.ts +18 -0
  68. package/v2/services/{ui-templates-api.service.d.ts → ui-templates-admin-api.service.d.ts} +3 -3
  69. package/{src/lib → v2}/services/veloce-objects-api.service.d.ts +3 -3
  70. package/v2/types/dto/ui-definition-dto.types.d.ts +7 -0
  71. package/v2/types/function.types.d.ts +14 -0
  72. package/v2/types/index.d.ts +3 -0
  73. package/v2/types/pcm.types.d.ts +10 -0
  74. package/v2/types/procedure.types.d.ts +58 -7
  75. package/v2/types/sales-transaction.types.d.ts +6 -3
  76. package/v2/types/search-request.types.d.ts +8 -0
  77. package/v2/utils/ui-definition.utils.d.ts +5 -0
  78. package/esm2020/src/lib/services/catalog-admin-api.service.mjs +0 -192
  79. package/esm2020/src/lib/services/catalog-api.service.mjs +0 -90
  80. package/esm2020/src/lib/services/configuration-api.service.mjs +0 -122
  81. package/esm2020/src/lib/services/configuration-settings-api.service.mjs +0 -96
  82. package/esm2020/src/lib/services/delta-api.service.mjs +0 -23
  83. package/esm2020/src/lib/services/document-attachment-api.service.mjs +0 -66
  84. package/esm2020/src/lib/services/endpoints-api.service.mjs +0 -80
  85. package/esm2020/src/lib/services/flows-api.service.mjs +0 -29
  86. package/esm2020/src/lib/services/guided-sellings-admin-api.service.mjs +0 -65
  87. package/esm2020/src/lib/services/guided-sellings-api.service.mjs +0 -37
  88. package/esm2020/src/lib/services/picklists-api.service.mjs +0 -41
  89. package/esm2020/src/lib/services/price-api.service.mjs +0 -63
  90. package/esm2020/src/lib/services/product-api.service.mjs +0 -153
  91. package/esm2020/src/lib/services/product-model-api.service.mjs +0 -223
  92. package/esm2020/src/lib/services/ramp-api.service.mjs +0 -31
  93. package/esm2020/src/lib/services/salesforce-api.service.mjs +0 -79
  94. package/esm2020/src/lib/services/shopping-cart-settings-api.service.mjs +0 -28
  95. package/esm2020/src/lib/services/veloce-objects-api.service.mjs +0 -90
  96. package/esm2020/src/lib/types/attachment.types.mjs +0 -2
  97. package/esm2020/src/lib/types/dto/configuration-settings-dto.types.mjs +0 -22
  98. package/esm2020/src/lib/types/price.types.mjs +0 -2
  99. package/esm2020/src/lib/types/quote.types.mjs +0 -2
  100. package/esm2020/src/lib/types/ramp-request.types.mjs +0 -2
  101. package/esm2020/v2/services/context-definition-api.service.mjs +0 -62
  102. package/esm2020/v2/services/procedures-admin-api.service.mjs +0 -82
  103. package/esm2020/v2/services/procedures-api.service.mjs +0 -44
  104. package/esm2020/v2/services/rule-groups-admin-api.service.mjs +0 -62
  105. package/esm2020/v2/services/rules-admin-api.service.mjs +0 -98
  106. package/esm2020/v2/services/rules-api.service.mjs +0 -36
  107. package/esm2020/v2/services/scripts-admin-api.service.mjs +0 -75
  108. package/esm2020/v2/services/scripts-api.service.mjs +0 -23
  109. package/esm2020/v2/services/ui-definitions-api.service.mjs +0 -132
  110. package/esm2020/v2/services/ui-templates-api.service.mjs +0 -286
  111. package/src/lib/services/configuration-api.service.d.ts +0 -23
  112. package/src/lib/services/delta-api.service.d.ts +0 -12
  113. package/src/lib/services/price-api.service.d.ts +0 -16
  114. package/src/lib/services/product-api.service.d.ts +0 -31
  115. package/src/lib/services/product-model-api.service.d.ts +0 -29
  116. package/src/lib/services/ramp-api.service.d.ts +0 -13
  117. package/src/lib/types/price.types.d.ts +0 -5
  118. package/src/lib/types/quote.types.d.ts +0 -8
  119. package/src/lib/types/ramp-request.types.d.ts +0 -13
  120. package/v2/services/procedures-admin-api.service.d.ts +0 -23
  121. package/v2/services/procedures-api.service.d.ts +0 -15
  122. package/v2/services/rule-groups-admin-api.service.d.ts +0 -18
  123. package/v2/services/rules-admin-api.service.d.ts +0 -22
  124. package/v2/services/rules-api.service.d.ts +0 -11
  125. package/v2/services/scripts-admin-api.service.d.ts +0 -20
  126. package/v2/services/scripts-api.service.d.ts +0 -11
  127. package/v2/services/ui-definitions-api.service.d.ts +0 -24
  128. /package/{src/lib → v2}/services/flows-api.service.d.ts +0 -0
  129. /package/{src/lib → v2}/services/guided-sellings-admin-api.service.d.ts +0 -0
  130. /package/{src/lib → v2}/services/guided-sellings-api.service.d.ts +0 -0
  131. /package/{src/lib → v2}/services/shopping-cart-settings-api.service.d.ts +0 -0
  132. /package/{src/lib → v2}/types/attachment.types.d.ts +0 -0
  133. /package/{src/lib → v2}/types/dto/configuration-settings-dto.types.d.ts +0 -0
@@ -1,13 +1,301 @@
1
- import { HttpParams, HttpClientModule } from '@angular/common/http';
1
+ import { HttpParams, HttpErrorResponse, HttpClientModule } from '@angular/common/http';
2
2
  import * as i0 from '@angular/core';
3
3
  import { Injectable, NgModule } from '@angular/core';
4
4
  import * as i1 from '@veloceapps/core';
5
- import { Expression, RuleGroupTypes, uiDefinitionFromDTO, uiDefinitionToDTO, BaseHttpService, XrayService } from '@veloceapps/core';
6
- import { of, map as map$1, noop, catchError as catchError$1, forkJoin, switchMap } from 'rxjs';
7
- import { catchError, map } from 'rxjs/operators';
8
- import { omit } from 'lodash';
5
+ import { Expression, Operator, parseJsonSafely, parseJsonStringAsObject, BaseHttpService, XrayService } from '@veloceapps/core';
6
+ import { noop, of, map as map$1, tap as tap$1, catchError as catchError$1, forkJoin, switchMap } from 'rxjs';
7
+ import { map, catchError, tap } from 'rxjs/operators';
8
+ import * as i2 from 'primeng/api';
9
9
  import { __rest } from 'tslib';
10
10
 
11
+ class CacheApiService {
12
+ constructor(httpService) {
13
+ this.httpService = httpService;
14
+ this.SERVICE_URL = '/v2/cache/evict';
15
+ }
16
+ clear$(name, options) {
17
+ return this.httpService.api(Object.assign({ method: 'get', url: `${this.SERVICE_URL}/` + name }, options));
18
+ }
19
+ }
20
+ CacheApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CacheApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
21
+ CacheApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CacheApiService });
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CacheApiService, decorators: [{
23
+ type: Injectable
24
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
25
+
26
+ class CatalogAdminApiService {
27
+ constructor(baseHttpService) {
28
+ this.baseHttpService = baseHttpService;
29
+ this.serviceUrl = '/v2/catalogs';
30
+ this.fetchCatalogs$ = (searchParams) => {
31
+ const params = new HttpParams({ fromObject: Object.assign({}, searchParams) });
32
+ return this.baseHttpService.api({ url: `${this.serviceUrl}`, params });
33
+ };
34
+ this.searchCatalogs$ = (searchParams, expression) => {
35
+ const params = new HttpParams({ fromObject: Object.assign({}, searchParams) });
36
+ return this.baseHttpService.api({
37
+ method: 'post',
38
+ url: `${this.serviceUrl}/search`,
39
+ params,
40
+ body: expression || {},
41
+ });
42
+ };
43
+ this.fetchCategories$ = (catalogId) => {
44
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${catalogId}/categories` });
45
+ };
46
+ this.searchProducts$ = (catalogId, categoryId) => {
47
+ return this.baseHttpService.api({
48
+ method: 'post',
49
+ url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/products/search`,
50
+ body: {},
51
+ });
52
+ };
53
+ this.fetchAttributes$ = (catalogId, categoryId) => {
54
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/attributes` });
55
+ };
56
+ this.createNewCatalog$ = (catalogData) => {
57
+ return this.baseHttpService.api({
58
+ url: `${this.serviceUrl}`,
59
+ method: 'post',
60
+ body: catalogData,
61
+ });
62
+ };
63
+ this.duplicateCatalog$ = (cloneRequest) => {
64
+ return this.baseHttpService.api({
65
+ url: `${this.serviceUrl}/${cloneRequest.id}/clone`,
66
+ method: 'post',
67
+ body: cloneRequest,
68
+ });
69
+ };
70
+ this.updateCatalog$ = (data) => {
71
+ return this.baseHttpService.api({
72
+ url: `${this.serviceUrl}/${data.id}`,
73
+ method: 'put',
74
+ body: data,
75
+ });
76
+ };
77
+ this.removeCatalog$ = (id) => {
78
+ return this.baseHttpService.api({
79
+ url: `${this.serviceUrl}/${id}`,
80
+ method: 'delete',
81
+ });
82
+ };
83
+ this.restoreCatalog$ = (id) => {
84
+ return this.baseHttpService.api({
85
+ url: `${this.serviceUrl}/${id}/restore`,
86
+ method: 'patch',
87
+ });
88
+ };
89
+ this.createNewCategory$ = (categoryData) => {
90
+ return this.baseHttpService.api({
91
+ url: `${this.serviceUrl}/${categoryData.catalogId}/categories`,
92
+ method: 'post',
93
+ body: categoryData,
94
+ });
95
+ };
96
+ this.updateCategory$ = (category) => {
97
+ return this.baseHttpService.api({
98
+ url: `${this.serviceUrl}/${category.catalogId}/categories/${category.id}`,
99
+ method: 'put',
100
+ body: category,
101
+ });
102
+ };
103
+ this.duplicateCategory$ = (catalogId, cloneRequest) => {
104
+ return this.baseHttpService.api({
105
+ url: `${this.serviceUrl}/${catalogId}/categories/${cloneRequest.id}/clone`,
106
+ method: 'post',
107
+ body: cloneRequest,
108
+ });
109
+ };
110
+ this.removeCategory$ = (id, catalogId) => {
111
+ return this.baseHttpService.api({
112
+ url: `${this.serviceUrl}/${catalogId}/categories/${id}`,
113
+ method: 'delete',
114
+ });
115
+ };
116
+ this.restoreCategory$ = (id, catalogId) => {
117
+ return this.baseHttpService.api({
118
+ url: `${this.serviceUrl}/${catalogId}/categories/${id}/restore`,
119
+ method: 'patch',
120
+ });
121
+ };
122
+ this.removeAttribute$ = ({ catalogId, categoryId, data, }) => {
123
+ return this.baseHttpService.api({
124
+ method: 'delete',
125
+ url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/attributes/${data.id}`,
126
+ body: data,
127
+ });
128
+ };
129
+ this.restoreAttribute$ = ({ catalogId, categoryId, data, }) => {
130
+ return this.baseHttpService.api({
131
+ url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/attributes/${data.id}/restore`,
132
+ method: 'patch',
133
+ });
134
+ };
135
+ this.createNewAttribute$ = ({ catalogId, categoryId, data, }) => {
136
+ return this.baseHttpService.api({
137
+ method: 'post',
138
+ url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/attributes`,
139
+ body: data,
140
+ });
141
+ };
142
+ this.updateAttribute$ = ({ catalogId, categoryId, data, }) => {
143
+ return this.baseHttpService.api({
144
+ method: 'put',
145
+ url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/attributes/${data.id}`,
146
+ body: data,
147
+ });
148
+ };
149
+ this.searchProductCandidates$ = (catalogId, categoryId, expression, searchParams) => {
150
+ const params = new HttpParams({ fromObject: Object.assign({}, searchParams) });
151
+ return this.baseHttpService.api({
152
+ method: 'post',
153
+ url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/candidates/search`,
154
+ params,
155
+ body: expression,
156
+ });
157
+ };
158
+ this.addProduct$ = (product, catalogId, categoryId) => {
159
+ return this.baseHttpService.api({
160
+ method: 'post',
161
+ url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/products`,
162
+ body: product,
163
+ });
164
+ };
165
+ this.updateProduct$ = (product, catalogId, categoryId) => {
166
+ return this.baseHttpService.api({
167
+ method: 'put',
168
+ url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/products/${product.id}`,
169
+ body: product,
170
+ });
171
+ };
172
+ this.removeProduct$ = ({ catalogId, categoryId, data, }) => {
173
+ return this.baseHttpService.api({
174
+ method: 'delete',
175
+ url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/products/${data.id}`,
176
+ });
177
+ };
178
+ }
179
+ attachImage$(catalogId, categoryId, file) {
180
+ const data = new FormData();
181
+ data.append('image', file);
182
+ return this.baseHttpService.upload({
183
+ method: 'post',
184
+ url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/image`,
185
+ body: data,
186
+ });
187
+ }
188
+ removeImage$(catalogId, categoryId) {
189
+ return this.baseHttpService.api({
190
+ method: 'delete',
191
+ url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/image`,
192
+ });
193
+ }
194
+ fetchImage$(catalogId, categoryId) {
195
+ return this.baseHttpService.api({
196
+ url: this.getImageUrl(catalogId, categoryId),
197
+ method: 'get',
198
+ responseType: 'blob',
199
+ errorHandler: noop,
200
+ });
201
+ }
202
+ getImageUrl(catalogId, categoryId) {
203
+ return `${this.serviceUrl}/${catalogId}/categories/${categoryId}/image`;
204
+ }
205
+ }
206
+ CatalogAdminApiService.MAX_RESULTS = 60;
207
+ CatalogAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
208
+ CatalogAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogAdminApiService });
209
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogAdminApiService, decorators: [{
210
+ type: Injectable
211
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
212
+
213
+ class CatalogApiService {
214
+ constructor(service) {
215
+ this.service = service;
216
+ this.serviceUrl = '/v2/product-catalogs';
217
+ }
218
+ fetchCatalogs$() {
219
+ return this.service.api({
220
+ method: 'get',
221
+ url: `${this.serviceUrl}`,
222
+ });
223
+ }
224
+ searchCatalogs$(searchParams, expression) {
225
+ const params = new HttpParams({ fromObject: searchParams });
226
+ return this.service.api({
227
+ method: 'post',
228
+ url: `${this.serviceUrl}/search`,
229
+ params,
230
+ body: expression,
231
+ });
232
+ }
233
+ getCatalog$(id) {
234
+ return this.service.api({
235
+ method: 'get',
236
+ url: `${this.serviceUrl}/${id}`,
237
+ });
238
+ }
239
+ fetchCategories$(catalogId) {
240
+ return this.service.api({
241
+ method: 'get',
242
+ url: `${this.serviceUrl}/${catalogId}/categories`,
243
+ });
244
+ }
245
+ fetchCatalogProducts$(catalogId, searchParams, context) {
246
+ const params = new HttpParams({ fromObject: searchParams });
247
+ return this.service.api({
248
+ method: 'post',
249
+ url: `${this.serviceUrl}/${catalogId}/products`,
250
+ params,
251
+ body: context,
252
+ });
253
+ }
254
+ fetchCategoryProducts$(catalogId, categoryId, searchParams, context) {
255
+ const params = new HttpParams({ fromObject: searchParams });
256
+ return this.service.api({
257
+ method: 'post',
258
+ url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/products`,
259
+ params,
260
+ body: context,
261
+ });
262
+ }
263
+ searchCategoryProducts$(catalogId, categoryId, searchParams, searchRequest, context) {
264
+ const params = new HttpParams({ fromObject: searchParams });
265
+ return this.service.api({
266
+ method: 'post',
267
+ url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/products/search`,
268
+ params,
269
+ body: {
270
+ configurationContext: context,
271
+ request: searchRequest,
272
+ },
273
+ });
274
+ }
275
+ fetchEligibleProducts$(searchParams, context) {
276
+ const params = new HttpParams({ fromObject: searchParams });
277
+ return this.service.api({
278
+ method: 'post',
279
+ url: `${this.serviceUrl}/products`,
280
+ params: params,
281
+ body: context,
282
+ });
283
+ }
284
+ fetchProducts$(searchParams) {
285
+ const params = new HttpParams({ fromObject: searchParams });
286
+ return this.service.api({
287
+ method: 'get',
288
+ url: `${this.serviceUrl}/products`,
289
+ params: params,
290
+ });
291
+ }
292
+ }
293
+ CatalogApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
294
+ CatalogApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogApiService });
295
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogApiService, decorators: [{
296
+ type: Injectable
297
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
298
+
11
299
  class ConfigurationProcessorsApiService {
12
300
  constructor(baseHttpService) {
13
301
  this.baseHttpService = baseHttpService;
@@ -43,10 +331,82 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
43
331
  type: Injectable
44
332
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
45
333
 
46
- class ContextDefinitionApiService {
334
+ class ConfigurationSettingsDTO {
335
+ static fromDTO(dto, key) {
336
+ return {
337
+ id: dto === null || dto === void 0 ? void 0 : dto.id,
338
+ key: (dto === null || dto === void 0 ? void 0 : dto.key) || key || '',
339
+ value: dto === null || dto === void 0 ? void 0 : dto.value,
340
+ };
341
+ }
342
+ static toDTO(data) {
343
+ return {
344
+ id: data.id,
345
+ key: data.key,
346
+ value: data.value,
347
+ };
348
+ }
349
+ constructor(id, key, value) {
350
+ this.id = id;
351
+ this.key = key;
352
+ this.value = value;
353
+ }
354
+ }
355
+
356
+ class ConfigurationSettingsApiService {
357
+ constructor(httpService, messageService) {
358
+ this.httpService = httpService;
359
+ this.messageService = messageService;
360
+ this.SERVICE_URL = '/v2/settings';
361
+ }
362
+ fetchSettings(options) {
363
+ return this.httpService
364
+ .api(Object.assign({ url: `${this.SERVICE_URL}`, method: 'get' }, options))
365
+ .pipe(map((settings) => settings.map(setting => ConfigurationSettingsDTO.fromDTO(setting))));
366
+ }
367
+ fetchSetting(settingsKey, options) {
368
+ return this.httpService
369
+ .api(Object.assign(Object.assign({ url: `${this.SERVICE_URL}/byKey/${settingsKey}`, method: 'get' }, options), { skipErrorHandler: true }))
370
+ .pipe(map((setting) => ConfigurationSettingsDTO.fromDTO(setting, settingsKey)), catchError(err => {
371
+ if (err instanceof HttpErrorResponse && err.status === 404) {
372
+ if (!(options === null || options === void 0 ? void 0 : options.skipErrorHandler)) {
373
+ this.messageService.add({
374
+ severity: 'error',
375
+ summary: `Configuration Setting "${settingsKey}" is not found`,
376
+ sticky: true,
377
+ });
378
+ }
379
+ return of(null);
380
+ }
381
+ throw err;
382
+ }));
383
+ }
384
+ createSetting(setting, options) {
385
+ const request = ConfigurationSettingsDTO.toDTO(setting);
386
+ return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}`, method: 'post', body: Object.assign({}, request) }, options));
387
+ }
388
+ updateSetting(setting, options) {
389
+ const request = ConfigurationSettingsDTO.toDTO(setting);
390
+ return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/${request.id}`, method: 'put', body: Object.assign({}, request) }, options));
391
+ }
392
+ removeSetting(setting, options) {
393
+ const request = ConfigurationSettingsDTO.toDTO(setting);
394
+ return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/${request.id}`, method: 'delete' }, options));
395
+ }
396
+ restoreSetting(settingId, options) {
397
+ return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/${settingId}/restore`, method: 'patch' }, options));
398
+ }
399
+ }
400
+ ConfigurationSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService, deps: [{ token: i1.BaseHttpService }, { token: i2.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
401
+ ConfigurationSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService });
402
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService, decorators: [{
403
+ type: Injectable
404
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i2.MessageService }]; } });
405
+
406
+ class ContextDefinitionAdminApiService {
47
407
  constructor(baseHttpService) {
48
408
  this.baseHttpService = baseHttpService;
49
- this.serviceUrl = '/v2/context-definition';
409
+ this.serviceUrl = '/admin/v2/context-definition';
50
410
  }
51
411
  fetchContextDefinitions$() {
52
412
  return this.baseHttpService.api({ url: `${this.serviceUrl}`, skipErrorHandler: true }).pipe(catchError(() => {
@@ -56,6 +416,9 @@ class ContextDefinitionApiService {
56
416
  fetchContextMappings$(id) {
57
417
  return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}/mappings` });
58
418
  }
419
+ fetchContextMappingsDetails$(id) {
420
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}/mappings/details` });
421
+ }
59
422
  fetchContextDefinitionStructure$(id) {
60
423
  return this.baseHttpService
61
424
  .api({
@@ -66,21 +429,28 @@ class ContextDefinitionApiService {
66
429
  return of([]);
67
430
  }), map(objects => {
68
431
  return objects.map(object => {
69
- var _a, _b;
70
- const tag = (_b = (_a = object.tags) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.title;
71
432
  const objectAttributes = object.attributes || [];
72
433
  return {
73
434
  id: object.id,
74
- title: tag || object.title,
75
- attributes: objectAttributes.map(attribute => {
435
+ title: object.title,
436
+ parentNodeId: object.parentNodeId,
437
+ attributeTags: objectAttributes.reduce((result, attribute) => {
76
438
  var _a, _b;
77
439
  const tag = (_b = (_a = attribute.tags) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.title;
78
- return {
79
- title: tag || attribute.title,
80
- fieldType: attribute.fieldType,
81
- dataType: attribute.dataType,
82
- };
83
- }),
440
+ if (tag) {
441
+ result.push({
442
+ title: tag,
443
+ fieldType: attribute.fieldType,
444
+ dataType: attribute.dataType,
445
+ });
446
+ }
447
+ return result;
448
+ }, []),
449
+ attributes: objectAttributes.map(({ title, fieldType, dataType }) => ({
450
+ title,
451
+ fieldType,
452
+ dataType,
453
+ })),
84
454
  };
85
455
  });
86
456
  }));
@@ -96,301 +466,683 @@ class ContextDefinitionApiService {
96
466
  });
97
467
  }
98
468
  }
99
- ContextDefinitionApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextDefinitionApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
100
- ContextDefinitionApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextDefinitionApiService });
101
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextDefinitionApiService, decorators: [{
469
+ ContextDefinitionAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextDefinitionAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
470
+ ContextDefinitionAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextDefinitionAdminApiService });
471
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextDefinitionAdminApiService, decorators: [{
102
472
  type: Injectable
103
473
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
104
474
 
105
- class ProceduresAdminApiService {
475
+ class DocumentAttachmentApiService {
476
+ constructor(httpService, fileDownloadService) {
477
+ this.httpService = httpService;
478
+ this.fileDownloadService = fileDownloadService;
479
+ this.SERVICE_URL = '/v2/attachments';
480
+ }
481
+ getAttachments(searchRequest) {
482
+ return this.httpService.api({
483
+ url: `${this.SERVICE_URL}/search`,
484
+ method: 'post',
485
+ body: searchRequest,
486
+ });
487
+ }
488
+ createAttachment(attachment, file, reportProgress) {
489
+ const formData = new FormData();
490
+ if (file) {
491
+ formData.append('file', file, file.name);
492
+ }
493
+ formData.append('attachment', new Blob([JSON.stringify(attachment)], {
494
+ type: 'application/json',
495
+ }));
496
+ return this.httpService.upload({
497
+ url: `${this.SERVICE_URL}`,
498
+ body: formData,
499
+ method: 'post',
500
+ observe: reportProgress ? 'events' : undefined,
501
+ reportProgress,
502
+ });
503
+ }
504
+ updateAttachment(id, attachment) {
505
+ return this.httpService.api({
506
+ url: `${this.SERVICE_URL}/${id}`,
507
+ body: attachment,
508
+ method: 'put',
509
+ });
510
+ }
511
+ getAttachmentFile(id, isPreventDownload) {
512
+ return this.httpService
513
+ .api({
514
+ url: `${this.SERVICE_URL}/${id}/file`,
515
+ responseType: isPreventDownload ? 'arraybuffer' : 'blob',
516
+ observe: isPreventDownload ? 'body' : 'response',
517
+ })
518
+ .pipe(tap(response => {
519
+ if (!isPreventDownload) {
520
+ this.fileDownloadService.processDownload(response);
521
+ }
522
+ }), map(response => (isPreventDownload ? new Blob([response.body || response]) : response.body || response)));
523
+ }
524
+ removeAttachment(id) {
525
+ return this.httpService.api({
526
+ url: `${this.SERVICE_URL}/${id}`,
527
+ method: 'delete',
528
+ });
529
+ }
530
+ }
531
+ DocumentAttachmentApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentAttachmentApiService, deps: [{ token: i1.BaseHttpService }, { token: i1.FileDownloadService }], target: i0.ɵɵFactoryTarget.Injectable });
532
+ DocumentAttachmentApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentAttachmentApiService });
533
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentAttachmentApiService, decorators: [{
534
+ type: Injectable
535
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i1.FileDownloadService }]; } });
536
+
537
+ class EndpointsAdminApiService {
106
538
  constructor(baseHttpService) {
107
539
  this.baseHttpService = baseHttpService;
108
- this.SERVICE_URL = '/v2/admin/procedures';
109
- this.fetchProcedures$ = () => {
110
- return this.searchProcedures$(new Expression(), 0, 100);
540
+ this.serviceUrl = '/admin/v2/api-endpoints';
541
+ }
542
+ fetchEndpoints$() {
543
+ return this.searchEndpoints$(new Expression(), 0, -1);
544
+ }
545
+ searchEndpoints$(expression, skip, count) {
546
+ let params = new HttpParams();
547
+ params = params.set('skip', '' + skip);
548
+ params = params.set('count', '' + count);
549
+ return this.baseHttpService.api({
550
+ method: 'post',
551
+ url: `${this.serviceUrl}/search`,
552
+ params,
553
+ body: expression,
554
+ });
555
+ }
556
+ removeEndpoint$(id) {
557
+ return this.baseHttpService.api({
558
+ url: `${this.serviceUrl}/${id}`,
559
+ method: 'delete',
560
+ });
561
+ }
562
+ restoreEndpoint$(id) {
563
+ return this.baseHttpService.api({
564
+ url: `${this.serviceUrl}/${id}/restore`,
565
+ method: 'patch',
566
+ });
567
+ }
568
+ fetchEndpoint$(id) {
569
+ return this.baseHttpService.api({
570
+ url: `${this.serviceUrl}/${id}`,
571
+ method: 'get',
572
+ });
573
+ }
574
+ createEndpoint$(body) {
575
+ return this.baseHttpService.api({
576
+ url: `${this.serviceUrl}`,
577
+ method: 'post',
578
+ body,
579
+ });
580
+ }
581
+ updateEndpoint$(body) {
582
+ return this.baseHttpService.api({
583
+ url: `${this.serviceUrl}/${body.id}`,
584
+ method: 'put',
585
+ body,
586
+ });
587
+ }
588
+ duplicateEndpoint$(cloneRequest) {
589
+ return this.baseHttpService.api({
590
+ url: `${this.serviceUrl}/${cloneRequest.id}/clone`,
591
+ method: 'post',
592
+ body: cloneRequest,
593
+ });
594
+ }
595
+ executeEndpoint$(body) {
596
+ return this.baseHttpService.api({
597
+ url: `${this.serviceUrl}/execute`,
598
+ method: 'post',
599
+ body,
600
+ responseType: 'text',
601
+ skipErrorHandler: true,
602
+ });
603
+ }
604
+ }
605
+ EndpointsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
606
+ EndpointsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsAdminApiService });
607
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsAdminApiService, decorators: [{
608
+ type: Injectable
609
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
610
+
611
+ class FlowsApiService {
612
+ constructor(configurationSettingsApiService) {
613
+ this.configurationSettingsApiService = configurationSettingsApiService;
614
+ this.flowsKey = 'flows';
615
+ }
616
+ getFlow(id) {
617
+ return this.fetchFlows().pipe(map(flows => flows.find(flow => flow.id == id)), map(flow => {
618
+ if (!flow) {
619
+ throw new Error(`Flow with flowId=${id} is not defined`);
620
+ }
621
+ return flow;
622
+ }));
623
+ }
624
+ fetchFlows() {
625
+ return this.configurationSettingsApiService
626
+ .fetchSetting(this.flowsKey)
627
+ .pipe(map((setting) => ((setting === null || setting === void 0 ? void 0 : setting.value) ? JSON.parse(setting.value) : [])));
628
+ }
629
+ }
630
+ FlowsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
631
+ FlowsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService });
632
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, decorators: [{
633
+ type: Injectable
634
+ }], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
635
+
636
+ class FunctionsAdminApiService {
637
+ constructor(baseHttpService) {
638
+ this.baseHttpService = baseHttpService;
639
+ this.serviceUrl = '/admin/v2/functions';
640
+ this.fetchAll$ = () => {
641
+ return this.search$(new Expression(), 0, 100);
111
642
  };
112
- this.searchProcedures$ = (expression, skip, count) => {
643
+ this.search$ = (expression, skip, count) => {
113
644
  let params = new HttpParams();
114
- params = params.set('skip', '' + skip);
115
- params = params.set('count', '' + count);
645
+ if (typeof skip === 'number') {
646
+ params = params.set('skip', '' + skip);
647
+ }
648
+ if (typeof count === 'number') {
649
+ params = params.set('count', '' + count);
650
+ }
116
651
  return this.baseHttpService.api({
117
652
  method: 'post',
118
- url: `${this.SERVICE_URL}/search`,
653
+ url: `${this.serviceUrl}/rules/search`,
119
654
  params,
120
655
  body: expression,
121
656
  });
122
657
  };
123
- this.createProcedure$ = (newProcedure) => {
658
+ this.create$ = (rule) => {
124
659
  return this.baseHttpService.api({
125
- url: `${this.SERVICE_URL}`,
660
+ url: `${this.serviceUrl}/rules`,
126
661
  method: 'post',
127
- body: newProcedure,
662
+ body: rule,
128
663
  });
129
664
  };
130
- this.updateProcedure$ = (procedure) => {
665
+ this.update$ = (rule) => {
131
666
  return this.baseHttpService.api({
132
- url: `${this.SERVICE_URL}/${procedure.id}`,
667
+ url: `${this.serviceUrl}/rules/${rule.id}`,
133
668
  method: 'put',
134
- body: procedure,
669
+ body: rule,
135
670
  });
136
671
  };
137
- this.duplicateProcedure$ = (body) => {
672
+ this.duplicate$ = (body) => {
138
673
  return this.baseHttpService
139
674
  .api({
140
- url: `${this.SERVICE_URL}/${body.id}/clone`,
675
+ url: `${this.serviceUrl}/rules/${body.id}/clone`,
141
676
  method: 'post',
142
677
  body,
143
678
  })
144
679
  .pipe(map$1(response => response.clonedRecordId));
145
680
  };
146
- this.removeProcedure$ = (id) => {
681
+ this.remove$ = (id) => {
147
682
  return this.baseHttpService.api({
148
- url: `${this.SERVICE_URL}/${id}`,
683
+ url: `${this.serviceUrl}/rules/${id}`,
149
684
  method: 'delete',
150
685
  });
151
686
  };
152
- this.restoreProcedure$ = (id) => {
687
+ this.restore$ = (id) => {
153
688
  return this.baseHttpService.api({
154
- url: `${this.SERVICE_URL}/${id}/restore`,
689
+ url: `${this.serviceUrl}/rules/${id}/restore`,
155
690
  method: 'patch',
156
691
  });
157
692
  };
158
693
  }
159
- fetchProcedure$(id) {
694
+ fetch$(id) {
160
695
  return this.baseHttpService.api({
161
- url: `${this.SERVICE_URL}/${id}`,
696
+ url: `${this.serviceUrl}/rules/${id}`,
162
697
  method: 'get',
163
698
  });
164
699
  }
165
- /**
166
- * @deprecated
167
- */
168
- fetchDefaultPricingSteps$() {
700
+ fetchHeaderFields$() {
169
701
  return this.baseHttpService.api({
170
- url: `/admin/procedures/pricing-steps`,
702
+ url: `${this.serviceUrl}/rules/describe/Header`,
171
703
  method: 'get',
172
704
  });
173
705
  }
174
- }
175
- ProceduresAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
176
- ProceduresAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresAdminApiService });
177
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresAdminApiService, decorators: [{
178
- type: Injectable
179
- }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
180
-
181
- class ProceduresApiService {
182
- constructor(baseHttpService) {
183
- this.baseHttpService = baseHttpService;
184
- this.SERVICE_URL = '/v2/procedures';
185
- }
186
- apply$(request, options) {
187
- return this.baseHttpService.api(Object.assign({ url: `${this.SERVICE_URL}/apply`, method: 'post', body: request }, options));
188
- }
189
706
  execute$(body) {
707
+ const url = `${this.serviceUrl}/rules/execute`;
190
708
  return this.baseHttpService.api({
191
- url: `${this.SERVICE_URL}/execute`,
709
+ url,
192
710
  method: 'post',
193
711
  body,
194
712
  });
195
713
  }
196
- catalogExecute$(body) {
714
+ executeExtractFunction$(body) {
197
715
  return this.baseHttpService.api({
198
- url: `${this.SERVICE_URL}/catalog/execute`,
716
+ url: `${this.serviceUrl}/extract`,
199
717
  method: 'post',
200
718
  body,
201
719
  });
202
720
  }
203
- rlmExecute$(body) {
721
+ fetchFunctionDatasets$() {
722
+ return this.baseHttpService.api({
723
+ url: `${this.serviceUrl}/datasets`,
724
+ method: 'get',
725
+ });
726
+ }
727
+ fetchFunctionTags$() {
728
+ return this.baseHttpService.api({
729
+ url: `${this.serviceUrl}/tags`,
730
+ method: 'get',
731
+ });
732
+ }
733
+ fetchObjectParentIdFields$(objectName) {
204
734
  return this.baseHttpService.api({
205
- url: `${this.SERVICE_URL}/rlm/execute`,
735
+ url: `${this.serviceUrl}/parent-id-fields/${objectName}`,
736
+ method: 'get',
737
+ });
738
+ }
739
+ }
740
+ FunctionsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FunctionsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
741
+ FunctionsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FunctionsAdminApiService });
742
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FunctionsAdminApiService, decorators: [{
743
+ type: Injectable
744
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
745
+
746
+ class GuidedSellingsAdminApiService {
747
+ constructor(baseHttpService) {
748
+ this.baseHttpService = baseHttpService;
749
+ this.serviceUrl = '/admin/v2/guided-selling';
750
+ this.fetchGuidedSellings$ = (searchParams) => {
751
+ return this.searchGuidedSellings$(searchParams);
752
+ };
753
+ this.searchGuidedSellings$ = (searchParams, expression) => {
754
+ const params = new HttpParams({ fromObject: Object.assign({}, searchParams) });
755
+ return this.baseHttpService.api({
756
+ method: 'post',
757
+ url: `${this.serviceUrl}/search`,
758
+ params,
759
+ body: expression || {},
760
+ });
761
+ };
762
+ this.fetchGuidedSelling$ = (id) => {
763
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
764
+ };
765
+ this.createNewGuidedSelling$ = (guidedSelling) => {
766
+ return this.baseHttpService.api({
767
+ url: `${this.serviceUrl}`,
768
+ method: 'post',
769
+ body: guidedSelling,
770
+ });
771
+ };
772
+ this.duplicateGuidedSelling$ = (cloneRequest) => {
773
+ return this.baseHttpService.api({
774
+ url: `${this.serviceUrl}/${cloneRequest.id}/clone`,
775
+ method: 'post',
776
+ body: cloneRequest,
777
+ });
778
+ };
779
+ this.updateGuidedSelling$ = (data) => {
780
+ return this.baseHttpService.api({
781
+ url: `${this.serviceUrl}/${data.id}`,
782
+ method: 'put',
783
+ body: data,
784
+ });
785
+ };
786
+ this.removeGuidedSelling$ = (id) => {
787
+ return this.baseHttpService.api({
788
+ url: `${this.serviceUrl}/${id}`,
789
+ method: 'delete',
790
+ });
791
+ };
792
+ this.restoreGuidedSelling$ = (id) => {
793
+ return this.baseHttpService.api({
794
+ url: `${this.serviceUrl}/${id}/restore`,
795
+ method: 'patch',
796
+ });
797
+ };
798
+ }
799
+ }
800
+ GuidedSellingsAdminApiService.MAX_RESULTS = 60;
801
+ GuidedSellingsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
802
+ GuidedSellingsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingsAdminApiService });
803
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingsAdminApiService, decorators: [{
804
+ type: Injectable
805
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
806
+
807
+ class GuidedSellingApiService {
808
+ constructor(http) {
809
+ this.http = http;
810
+ this.serviceUrl = '/v2/guided-selling';
811
+ }
812
+ searchByName$(name, searchParams) {
813
+ const params = new HttpParams({ fromObject: Object.assign({}, searchParams) });
814
+ const expression = new Expression(undefined, [{ key: 'name', operator: Operator.EQ, value: name }]);
815
+ return this.http.api({
206
816
  method: 'post',
207
- body,
817
+ url: `${this.serviceUrl}/search`,
818
+ params,
819
+ body: expression || {},
820
+ });
821
+ }
822
+ searchById$(id, searchParams) {
823
+ const params = new HttpParams({ fromObject: Object.assign({}, searchParams) });
824
+ const expression = new Expression(undefined, [{ key: 'id', operator: Operator.EQ, value: id }]);
825
+ return this.http.api({
826
+ method: 'post',
827
+ url: `${this.serviceUrl}/search`,
828
+ params,
829
+ body: expression || {},
208
830
  });
209
831
  }
210
832
  }
211
- ProceduresApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
212
- ProceduresApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService });
213
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService, decorators: [{
833
+ GuidedSellingApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
834
+ GuidedSellingApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingApiService });
835
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingApiService, decorators: [{
214
836
  type: Injectable
215
837
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
216
838
 
217
- class RuleGroupsAdminApiService {
839
+ class OrchestrationsAdminApiService {
218
840
  constructor(baseHttpService) {
219
841
  this.baseHttpService = baseHttpService;
220
- this.serviceUrl = '/v2/admin/rule-groups';
221
- this.fetchRuleGroups$ = () => {
222
- return this.searchRuleGroups$(new Expression(), 0, 100);
842
+ this.SERVICE_URL = '/admin/v2/orchestrations';
843
+ this.fetchAll$ = () => {
844
+ return this.search$(new Expression(), 0, 100);
223
845
  };
224
- this.searchRuleGroups$ = (expression, skip, count) => {
846
+ this.search$ = (expression, skip, count) => {
225
847
  let params = new HttpParams();
226
848
  params = params.set('skip', '' + skip);
227
849
  params = params.set('count', '' + count);
228
- return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
229
- };
230
- this.createRuleGroup$ = (ruleGroup) => {
231
850
  return this.baseHttpService.api({
232
- url: `${this.serviceUrl}`,
233
851
  method: 'post',
234
- body: ruleGroup,
852
+ url: `${this.SERVICE_URL}/search`,
853
+ params,
854
+ body: expression,
235
855
  });
236
856
  };
237
- this.updateRuleGroup$ = (ruleGroup) => {
857
+ this.create$ = (newProcedure) => {
238
858
  return this.baseHttpService.api({
239
- url: `${this.serviceUrl}/${ruleGroup.id}`,
859
+ url: `${this.SERVICE_URL}`,
240
860
  method: 'post',
241
- body: ruleGroup,
861
+ body: newProcedure,
242
862
  });
243
863
  };
244
- this.duplicateRuleGroup$ = (body) => {
864
+ this.update$ = (procedure) => {
865
+ return this.baseHttpService.api({
866
+ url: `${this.SERVICE_URL}/${procedure.id}`,
867
+ method: 'put',
868
+ body: procedure,
869
+ });
870
+ };
871
+ this.duplicate$ = (body) => {
245
872
  return this.baseHttpService
246
873
  .api({
247
- url: `${this.serviceUrl}/${body.id}/clone`,
874
+ url: `${this.SERVICE_URL}/${body.id}/clone`,
248
875
  method: 'post',
249
876
  body,
250
877
  })
251
878
  .pipe(map$1(response => response.clonedRecordId));
252
879
  };
253
- this.removeRuleGroup$ = (id) => {
880
+ this.remove$ = (id) => {
881
+ return this.baseHttpService.api({
882
+ url: `${this.SERVICE_URL}/${id}`,
883
+ method: 'delete',
884
+ });
885
+ };
886
+ this.restore$ = (id) => {
887
+ return this.baseHttpService.api({
888
+ url: `${this.SERVICE_URL}/${id}/restore`,
889
+ method: 'patch',
890
+ });
891
+ };
892
+ }
893
+ fetch$(id) {
894
+ return this.baseHttpService.api({
895
+ url: `${this.SERVICE_URL}/${id}`,
896
+ method: 'get',
897
+ });
898
+ }
899
+ execute$(body) {
900
+ return this.baseHttpService.api({
901
+ url: `${this.SERVICE_URL}/execute`,
902
+ method: 'post',
903
+ body,
904
+ });
905
+ }
906
+ catalogExecute$(body) {
907
+ return this.baseHttpService.api({
908
+ url: `${this.SERVICE_URL}/catalog/execute`,
909
+ method: 'post',
910
+ body,
911
+ });
912
+ }
913
+ }
914
+ OrchestrationsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrchestrationsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
915
+ OrchestrationsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrchestrationsAdminApiService });
916
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrchestrationsAdminApiService, decorators: [{
917
+ type: Injectable
918
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
919
+
920
+ class OrchestrationsApiService {
921
+ constructor(baseHttpService) {
922
+ this.baseHttpService = baseHttpService;
923
+ this.SERVICE_URL = '/v2/orchestrations';
924
+ }
925
+ apply$(request, options) {
926
+ return this.baseHttpService.api(Object.assign({ url: `${this.SERVICE_URL}/apply`, method: 'post', body: request }, options));
927
+ }
928
+ }
929
+ OrchestrationsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrchestrationsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
930
+ OrchestrationsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrchestrationsApiService });
931
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrchestrationsApiService, decorators: [{
932
+ type: Injectable
933
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
934
+
935
+ class SalesforceApiService {
936
+ constructor(httpService) {
937
+ this.httpService = httpService;
938
+ this.SERVICE_URL = '/v2/proxy';
939
+ }
940
+ query(searchRequest, objectName, options) {
941
+ return this.httpService.api(Object.assign({ method: 'post', body: Object.assign(Object.assign({}, searchRequest), { count: searchRequest.count || 100 }), url: `${this.SERVICE_URL}/query/${objectName}` }, options));
942
+ }
943
+ queryObjects(search, options) {
944
+ let params = new HttpParams();
945
+ if (search) {
946
+ params = params.append('search', search);
947
+ }
948
+ return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/query`, params }, options));
949
+ }
950
+ search(req, options) {
951
+ return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/rest/search`, params: { q: req.searchString } }, options));
952
+ }
953
+ describeObject(objectName, options) {
954
+ const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields`;
955
+ return this.httpService.api(Object.assign({ url: methodUrl }, options));
956
+ }
957
+ describeField(objectName, fieldName, options) {
958
+ const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields/${fieldName}`;
959
+ return this.httpService.api(Object.assign({ url: methodUrl }, options));
960
+ }
961
+ describe2(objectName, fields, options) {
962
+ const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields`;
963
+ return this.httpService.api(Object.assign({ method: 'post', url: methodUrl, body: fields }, options));
964
+ }
965
+ apexGetRequest(path, params, options) {
966
+ // this line is needed because HttpParams instance from Integration behaves wrong in studio instance of Angular
967
+ const httpParams = new HttpParams({ fromString: params.toString() });
968
+ return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/apex${path}`, params: httpParams }, options));
969
+ }
970
+ apexPostRequest(path, body, options) {
971
+ return this.httpService.api(Object.assign({ method: 'post', body, url: `${this.SERVICE_URL}/apex${path}` }, options));
972
+ }
973
+ restGetRequest(path, params, options) {
974
+ const httpParams = new HttpParams({ fromString: params.toString() });
975
+ return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/rest${path}`, params: httpParams }, options));
976
+ }
977
+ getGlobalPicklists() {
978
+ return this.httpService.api({
979
+ method: 'get',
980
+ url: `${this.SERVICE_URL}/globalvalueset`,
981
+ });
982
+ }
983
+ getGlobalPicklistValues(id) {
984
+ return this.httpService.api({
985
+ method: 'get',
986
+ url: `${this.SERVICE_URL}/globalvalueset/${id}/values`,
987
+ });
988
+ }
989
+ }
990
+ SalesforceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
991
+ SalesforceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService });
992
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, decorators: [{
993
+ type: Injectable
994
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
995
+
996
+ class PCMApiService {
997
+ constructor(sfApiService) {
998
+ this.sfApiService = sfApiService;
999
+ }
1000
+ fetchPCMByProductId(productId) {
1001
+ return this.sfApiService.restGetRequest(`/connect/pcm/products/${productId}`, new HttpParams()).pipe(tap$1(response => {
1002
+ if (response.status.code !== '200') {
1003
+ throw new Error(response.status.message);
1004
+ }
1005
+ }), map$1(response => {
1006
+ const pcm = response.products[0];
1007
+ if (!pcm) {
1008
+ throw new Error('PCM product is not found');
1009
+ }
1010
+ this.fixUrls(pcm);
1011
+ return pcm;
1012
+ }));
1013
+ }
1014
+ fixUrls(product) {
1015
+ if (product.displayUrl) {
1016
+ product.displayUrl = product.displayUrl.replaceAll('&', '&');
1017
+ }
1018
+ product.productComponentGroups.forEach(group => {
1019
+ group.components.forEach(component => this.fixUrls(component));
1020
+ });
1021
+ }
1022
+ }
1023
+ PCMApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PCMApiService, deps: [{ token: SalesforceApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1024
+ PCMApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PCMApiService });
1025
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PCMApiService, decorators: [{
1026
+ type: Injectable
1027
+ }], ctorParameters: function () { return [{ type: SalesforceApiService }]; } });
1028
+
1029
+ class PicklistsAdminApiService {
1030
+ constructor(baseHttpService) {
1031
+ this.baseHttpService = baseHttpService;
1032
+ this.serviceUrl = '/admin/v2/picklists';
1033
+ this.fetchAllPicklists$ = () => this.baseHttpService.api({ url: `${this.serviceUrl}` });
1034
+ this.fetchPicklist$ = (code) => this.baseHttpService.api({ url: `${this.serviceUrl}/${code}` });
1035
+ this.createPicklist$ = (picklist) => {
1036
+ return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}`, body: picklist });
1037
+ };
1038
+ this.updatePicklist$ = (picklist) => {
254
1039
  return this.baseHttpService.api({
255
- url: `${this.serviceUrl}/${id}`,
256
- method: 'delete',
1040
+ method: 'put',
1041
+ url: `${this.serviceUrl}/${picklist.id}`,
1042
+ body: picklist,
257
1043
  });
258
1044
  };
259
- this.restoreRuleGroup$ = (id) => {
1045
+ this.removePicklist$ = (id) => this.baseHttpService.api({ method: 'delete', url: `${this.serviceUrl}/${id}` });
1046
+ this.restorePicklist$ = (id) => {
260
1047
  return this.baseHttpService.api({
261
1048
  url: `${this.serviceUrl}/${id}/restore`,
262
1049
  method: 'patch',
263
1050
  });
264
1051
  };
1052
+ this.addPicklistValue$ = (picklist, value) => {
1053
+ const data = Object.assign(Object.assign({}, picklist), { values: [...picklist.values, value] });
1054
+ return this.baseHttpService.api({ method: 'put', url: `${this.serviceUrl}/${picklist.id}`, body: data });
1055
+ };
265
1056
  }
266
1057
  }
267
- RuleGroupsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
268
- RuleGroupsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsAdminApiService });
269
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsAdminApiService, decorators: [{
1058
+ PicklistsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1059
+ PicklistsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsAdminApiService });
1060
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsAdminApiService, decorators: [{
270
1061
  type: Injectable
271
1062
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
272
1063
 
273
- class RulesAdminApiService {
1064
+ class ProductsAdminApiService {
274
1065
  constructor(baseHttpService) {
275
1066
  this.baseHttpService = baseHttpService;
276
- this.serviceUrl = '/v2/admin/rules';
277
- this.fetchRules$ = () => {
278
- return this.searchRules$(new Expression(), 0, 100);
279
- };
280
- this.searchRules$ = (expression, skip, count) => {
1067
+ this.serviceUrl = '/admin/v2/products';
1068
+ this.fetchProducts$ = (payload) => {
281
1069
  let params = new HttpParams();
282
- if (typeof skip === 'number') {
283
- params = params.set('skip', '' + skip);
284
- }
285
- if (typeof count === 'number') {
286
- params = params.set('count', '' + count);
1070
+ params = params.append('count', payload.count);
1071
+ params = params.append('skip', payload.skip);
1072
+ if (payload.name) {
1073
+ params = params.append('name', payload.name);
287
1074
  }
288
- return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
1075
+ return this.baseHttpService.api({ url: `${this.serviceUrl}`, params });
289
1076
  };
290
- this.createRule$ = (rule) => {
1077
+ this.searchProducts$ = (expression, skip, count) => {
1078
+ let params = new HttpParams();
1079
+ params = params.set('skip', '' + skip);
1080
+ params = params.set('count', '' + count);
291
1081
  return this.baseHttpService.api({
292
- url: `${this.serviceUrl}`,
293
1082
  method: 'post',
294
- body: rule,
1083
+ url: `${this.serviceUrl}/search`,
1084
+ params: params,
1085
+ body: expression,
295
1086
  });
296
1087
  };
297
- this.updateRule$ = (rule) => {
1088
+ this.fetchProduct$ = (id) => this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
1089
+ this.createNewProduct$ = (productData) => {
298
1090
  return this.baseHttpService.api({
299
- url: `${this.serviceUrl}/${rule.id}`,
300
- method: 'put',
301
- body: rule,
1091
+ url: `${this.serviceUrl}`,
1092
+ method: 'post',
1093
+ body: productData,
302
1094
  });
303
1095
  };
304
- this.duplicateRule$ = (body) => {
305
- return this.baseHttpService
306
- .api({
307
- url: `${this.serviceUrl}/${body.id}/clone`,
308
- method: 'post',
1096
+ this.updateProduct$ = (body) => {
1097
+ return this.baseHttpService.api({
1098
+ url: `${this.serviceUrl}/${body.id}`,
1099
+ method: 'put',
309
1100
  body,
310
- })
311
- .pipe(map$1(response => response.clonedRecordId));
1101
+ });
312
1102
  };
313
- this.removeRule$ = (id) => {
1103
+ this.removeProduct$ = (id) => {
314
1104
  return this.baseHttpService.api({
315
1105
  url: `${this.serviceUrl}/${id}`,
316
1106
  method: 'delete',
317
1107
  });
318
1108
  };
319
- this.restoreRule$ = (id) => {
1109
+ this.restoreProduct$ = (id) => {
320
1110
  return this.baseHttpService.api({
321
1111
  url: `${this.serviceUrl}/${id}/restore`,
322
1112
  method: 'patch',
323
1113
  });
324
1114
  };
325
1115
  }
326
- fetchRule$(id) {
327
- return this.baseHttpService.api({
328
- url: `${this.serviceUrl}/${id}`,
329
- method: 'get',
330
- });
331
- }
332
- fetchHeaderFields$() {
333
- return this.baseHttpService.api({
334
- url: `${this.serviceUrl}/describe/Header`,
335
- method: 'get',
1116
+ attachImage$(productId, file) {
1117
+ const data = new FormData();
1118
+ data.append('image', file);
1119
+ return this.baseHttpService.upload({
1120
+ method: 'post',
1121
+ url: `${this.serviceUrl}/${productId}/image`,
1122
+ body: data,
336
1123
  });
337
1124
  }
338
- execute$(body) {
339
- const url = this.getExecuteRuleUrl(body.rule.ruleGroupType);
1125
+ removeImage$(productId) {
340
1126
  return this.baseHttpService.api({
341
- url,
342
- method: 'post',
343
- body,
1127
+ method: 'delete',
1128
+ url: `${this.serviceUrl}/${productId}/image`,
344
1129
  });
345
1130
  }
346
- getExecuteRuleUrl(ruleGroupType) {
347
- if (ruleGroupType === RuleGroupTypes.eligibility) {
348
- return '/rules/eligibility/execute';
349
- }
350
- if (ruleGroupType === RuleGroupTypes.catalog) {
351
- return '/rules/catalog/execute';
352
- }
353
- if (ruleGroupType === RuleGroupTypes.rlmContextBased) {
354
- return '/rules/rlm/execute';
355
- }
356
- return '/rules/execute';
357
- }
358
- }
359
- RulesAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
360
- RulesAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesAdminApiService });
361
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesAdminApiService, decorators: [{
362
- type: Injectable
363
- }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
364
-
365
- class RulesApiService {
366
- constructor(baseHttpService) {
367
- this.baseHttpService = baseHttpService;
368
- this.serviceUrl = '/v2/rules';
369
- }
370
- execute$(body) {
371
- const url = this.getExecuteRuleUrl(body.rule.ruleGroupType);
1131
+ fetchImage$(productId) {
372
1132
  return this.baseHttpService.api({
373
- url,
374
- method: 'post',
375
- body,
1133
+ url: this.getImageUrl(productId),
1134
+ method: 'get',
1135
+ responseType: 'blob',
1136
+ errorHandler: noop,
376
1137
  });
377
1138
  }
378
- getExecuteRuleUrl(ruleGroupType) {
379
- if (ruleGroupType === RuleGroupTypes.eligibility) {
380
- return `${this.serviceUrl}/eligibility/execute`;
381
- }
382
- if (ruleGroupType === RuleGroupTypes.catalog) {
383
- return `${this.serviceUrl}/catalog/execute`;
384
- }
385
- if (ruleGroupType === RuleGroupTypes.rlmContextBased) {
386
- return `${this.serviceUrl}/rlm/execute`;
387
- }
388
- return `${this.serviceUrl}/execute`;
1139
+ getImageUrl(productId) {
1140
+ return `${this.serviceUrl}/${productId}/image`;
389
1141
  }
390
1142
  }
391
- RulesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
392
- RulesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService });
393
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService, decorators: [{
1143
+ ProductsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1144
+ ProductsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductsAdminApiService });
1145
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductsAdminApiService, decorators: [{
394
1146
  type: Injectable
395
1147
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
396
1148
 
@@ -406,45 +1158,19 @@ class SalesTransactionApiService {
406
1158
  * @param options Request options
407
1159
  */
408
1160
  getState(objectId, params, options) {
409
- // return of({
410
- // id: 'ID',
411
- // salesTransactionName: 'Sales Transaction Name',
412
- // account: 'Acc ID',
413
- // quoteAccount: 'Acc ID',
414
- // pricebook: 'Pricebook ID',
415
- // status: 'Draft',
416
- // totalAmount: 0,
417
- // subtotal: 0,
418
- // activatedDate: '2025-01-25',
419
- // effectiveDate: '2025-01-25',
420
- // startDate: '2025-01-25',
421
- // tags: {},
422
- // salesTransactionItems: [],
423
- // assets: [],
424
- // } satisfies SalesTransaction);
425
1161
  return this.httpService.api(Object.assign({ method: 'get', url: `${this.SERVICE_URL}/${objectId}`, params: params }, options));
426
1162
  }
427
- upsert(request, options) {
428
- return of({
429
- id: 'ID',
430
- });
431
- // return this.httpService.api({
432
- // method: 'post',
433
- // url: `${this.SERVICE_URL}`,
434
- // body: request,
435
- // ...options,
436
- // });
1163
+ /**
1164
+ * This endpoint doesn't include orders and assets
1165
+ * @param headerId SF record ID (quoteId | accountId | opportunityId | orderId etc)
1166
+ * @param params Query params
1167
+ * @param options Request options
1168
+ */
1169
+ query(headerId, params, options) {
1170
+ return this.httpService.api(Object.assign({ method: 'get', url: `${this.SERVICE_URL}/query/${headerId}`, params: params }, options));
437
1171
  }
438
- submit(request, options) {
439
- return of({
440
- id: 'ID',
441
- });
442
- // return this.httpService.api({
443
- // method: 'post',
444
- // url: `${this.SERVICE_URL}`,
445
- // body: request,
446
- // ...options,
447
- // });
1172
+ save(request, options) {
1173
+ return this.httpService.api(Object.assign(Object.assign({ method: 'post', url: `${this.SERVICE_URL}/save/${request.transactionContext.salesTransaction.id}`, body: request }, options), { responseType: 'text' }));
448
1174
  }
449
1175
  }
450
1176
  SalesTransactionApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesTransactionApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
@@ -453,211 +1179,94 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
453
1179
  type: Injectable
454
1180
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
455
1181
 
456
- class ScriptsAdminApiService {
457
- constructor(baseHttpService) {
458
- this.baseHttpService = baseHttpService;
459
- this.serviceUrl = '/v2/admin/scripts';
460
- this.fetchScripts$ = () => {
461
- return this.baseHttpService.api({ url: `${this.serviceUrl}` });
462
- };
463
- this.searchScripts$ = (expression, skip, count) => {
464
- let params = new HttpParams();
465
- if (typeof skip === 'number') {
466
- params = params.set('skip', '' + skip);
467
- }
468
- if (typeof count === 'number') {
469
- params = params.set('count', '' + count);
470
- }
471
- return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
472
- };
473
- this.fetchScript$ = (id) => {
474
- return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
475
- };
476
- this.createScript$ = (script) => {
477
- return this.baseHttpService.api({
478
- url: `${this.serviceUrl}`,
479
- method: 'post',
480
- body: script,
481
- });
482
- };
483
- this.updateScriptMeta$ = (script) => {
484
- return this.baseHttpService.api({
485
- url: `${this.serviceUrl}/${script.id}`,
486
- method: 'put',
487
- body: script,
488
- });
489
- };
490
- this.updateScriptDetails$ = (script) => {
491
- return this.baseHttpService.api({
492
- url: `${this.serviceUrl}/${script.id}`,
493
- method: 'put',
494
- body: script,
495
- });
496
- };
497
- this.cloneScript$ = (cloneRequest) => {
498
- return this.baseHttpService
499
- .api({
500
- url: `${this.serviceUrl}/${cloneRequest.id}/clone`,
501
- method: 'post',
502
- body: cloneRequest,
503
- })
504
- .pipe(map(response => response.clonedRecordId));
505
- };
506
- this.removeScript$ = (id) => {
507
- return this.baseHttpService.api({
508
- url: `${this.serviceUrl}/${id}`,
509
- method: 'delete',
510
- });
511
- };
512
- this.restoreScript$ = (id) => {
513
- return this.baseHttpService.api({
514
- url: `${this.serviceUrl}/${id}/restore`,
515
- method: 'patch',
516
- });
517
- };
1182
+ class ShoppingCartSettingsApiService {
1183
+ constructor(configurationSettingsApiService) {
1184
+ this.configurationSettingsApiService = configurationSettingsApiService;
1185
+ this.shoppingCartSettingsKey = 'shopping-cart';
1186
+ }
1187
+ getSetting(id) {
1188
+ return this.fetchSettings().pipe(map((settings) => parseJsonSafely(settings === null || settings === void 0 ? void 0 : settings.value, [])), map(settings => settings.find(setting => setting.id == id)));
1189
+ }
1190
+ fetchSettings() {
1191
+ return this.configurationSettingsApiService.fetchSetting(this.shoppingCartSettingsKey, { skipErrorHandler: true });
1192
+ }
1193
+ getSettingsMap() {
1194
+ return this.fetchSettings().pipe(map((settings) => parseJsonSafely(settings === null || settings === void 0 ? void 0 : settings.value, [])), map((settings) => settings.reduce((acc, setting) => {
1195
+ return Object.assign(Object.assign({}, acc), { [setting.id]: setting.properties });
1196
+ }, {})));
518
1197
  }
519
1198
  }
520
- ScriptsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
521
- ScriptsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsAdminApiService });
522
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsAdminApiService, decorators: [{
1199
+ ShoppingCartSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1200
+ ShoppingCartSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService });
1201
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService, decorators: [{
523
1202
  type: Injectable
524
- }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1203
+ }], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
525
1204
 
526
- class ScriptsApiService {
527
- constructor(baseHttpService) {
528
- this.baseHttpService = baseHttpService;
529
- this.serviceUrl = '/v2/scripts';
530
- this.execute$ = (body) => {
531
- return this.baseHttpService.api({
532
- url: `${this.serviceUrl}/execute`,
533
- method: 'post',
534
- body,
535
- errorHandler: () => null,
536
- });
537
- };
538
- }
1205
+ function uiDefinitionFromDTO(container) {
1206
+ const { sourceBlob } = container, rest = __rest(container, ["sourceBlob"]);
1207
+ return Object.assign(Object.assign({}, rest), { source: parseJsonStringAsObject(sourceBlob) });
1208
+ }
1209
+ function uiDefinitionToDTO(container) {
1210
+ const { source } = container, rest = __rest(container, ["source"]);
1211
+ return Object.assign(Object.assign({}, rest), { sourceBlob: JSON.stringify(source) });
1212
+ }
1213
+ function newUiDefinitionToDTO(container) {
1214
+ const { source } = container, rest = __rest(container, ["source"]);
1215
+ return Object.assign(Object.assign({}, rest), { sourceBlob: JSON.stringify(source) });
539
1216
  }
540
- ScriptsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
541
- ScriptsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService });
542
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService, decorators: [{
543
- type: Injectable
544
- }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
545
1217
 
546
- class UIDefinitionsApiService {
1218
+ class UIDefinitionsAdminApiService {
547
1219
  constructor(baseHttpService) {
548
1220
  this.baseHttpService = baseHttpService;
549
- this.serviceUrl = '/v2/uidefinitions';
1221
+ this.serviceUrl = '/admin/v2/uidefinitions';
550
1222
  }
551
- fetch$(modelId, version) {
552
- const serviceUrl = this.getServiceUrl(modelId);
553
- let params = new HttpParams();
554
- if (version != null) {
555
- params = params.set('modelVersion', version);
1223
+ fetchAll$(params, options) {
1224
+ let httpParams = new HttpParams();
1225
+ if ((params === null || params === void 0 ? void 0 : params.productId) != null) {
1226
+ httpParams = httpParams.set('productId', params.productId);
1227
+ }
1228
+ if (params === null || params === void 0 ? void 0 : params.defaultUIDefinitionId) {
1229
+ httpParams = httpParams.set('defaultUIDefinitionId', params.defaultUIDefinitionId);
556
1230
  }
557
1231
  return this.baseHttpService
558
- .api({
559
- method: 'get',
560
- url: serviceUrl,
561
- params: params,
562
- })
1232
+ .api(Object.assign({ method: 'get', url: this.serviceUrl, params: httpParams }, options))
563
1233
  .pipe(map$1(containers => containers.map(uiDefinitionFromDTO)));
564
1234
  }
565
- create$(modelId, uiDefinitionContainer) {
566
- var _a, _b;
567
- const serviceUrl = this.getServiceUrl(modelId);
568
- const dto = Object.assign(Object.assign({}, omit(uiDefinitionContainer, 'source')), { name: uiDefinitionContainer.source.name, modelId: uiDefinitionContainer.source.modelId, templateName: (_a = uiDefinitionContainer.source.uiTemplateData) === null || _a === void 0 ? void 0 : _a.TEMPLATE_NAME, rootType: (_b = uiDefinitionContainer.source.uiTemplateData) === null || _b === void 0 ? void 0 : _b.ROOT_TYPE, defaultFlag: uiDefinitionContainer.source.primary, sourceBlob: JSON.stringify(uiDefinitionContainer.source) });
1235
+ fetch$(id, options) {
1236
+ return this.baseHttpService
1237
+ .api(Object.assign({ method: 'get', url: `${this.serviceUrl}/${id}` }, options))
1238
+ .pipe(map$1(container => uiDefinitionFromDTO(Object.assign(Object.assign({}, container), { id }))));
1239
+ }
1240
+ create$(uiDefinitionContainer) {
1241
+ const dto = newUiDefinitionToDTO(uiDefinitionContainer);
569
1242
  return this.baseHttpService
570
1243
  .api({
571
1244
  method: 'post',
572
- url: serviceUrl,
1245
+ url: this.serviceUrl,
573
1246
  body: dto,
574
1247
  })
575
1248
  .pipe(map$1(container => uiDefinitionFromDTO(container)));
576
1249
  }
577
- get$(modelId, uiDefinitionId) {
578
- const serviceUrl = this.getServiceUrl(modelId);
579
- return this.baseHttpService
580
- .api({
581
- method: 'get',
582
- url: `${serviceUrl}/${uiDefinitionId}`,
583
- })
584
- .pipe(map$1(container => uiDefinitionFromDTO(Object.assign(Object.assign({}, container), { id: uiDefinitionId }))));
585
- }
586
1250
  update$(uiDefinitionContainer) {
587
- const serviceUrl = this.getServiceUrl(uiDefinitionContainer.modelId);
588
1251
  const dto = uiDefinitionToDTO(uiDefinitionContainer);
589
1252
  return this.baseHttpService
590
1253
  .api({
591
1254
  method: 'put',
592
- url: `${serviceUrl}/${uiDefinitionContainer.id}`,
1255
+ url: `${this.serviceUrl}/${uiDefinitionContainer.id}`,
593
1256
  body: dto,
594
1257
  })
595
1258
  .pipe(map$1(container => uiDefinitionFromDTO(container)));
596
1259
  }
597
- delete$(uiDefinitionContainer) {
598
- const serviceUrl = this.getServiceUrl(uiDefinitionContainer.modelId);
599
- return this.baseHttpService.api({
600
- method: 'delete',
601
- url: `${serviceUrl}/${uiDefinitionContainer.id}`,
602
- });
603
- }
604
- getServiceUrl(modelId) {
605
- return `/models/${modelId}/uidefinitions`;
606
- }
607
- fetchUIDefinitions$(params) {
608
- let httpParams = new HttpParams();
609
- if ((params === null || params === void 0 ? void 0 : params.productId) != null) {
610
- httpParams = httpParams.set('productId', params.productId);
611
- }
612
- if ((params === null || params === void 0 ? void 0 : params.defaultUIDefinitionId) != null) {
613
- httpParams = httpParams.set('defaultUIDefinitionId', params.defaultUIDefinitionId);
614
- }
615
- return this.baseHttpService
616
- .api({
617
- method: 'get',
618
- url: this.serviceUrl,
619
- params: httpParams,
620
- })
621
- .pipe(map$1(containers => containers.map(uiDefinitionFromDTO)));
622
- }
623
- fetchUIDefinition$(id) {
624
- return this.baseHttpService
625
- .api({
626
- method: 'get',
627
- url: `${this.serviceUrl}/${id}`,
628
- })
629
- .pipe(map$1(container => uiDefinitionFromDTO(Object.assign(Object.assign({}, container), { id }))), map$1(uiDefinition => {
630
- const result = uiDefinition;
631
- if (!uiDefinition.modelId && uiDefinition.source.modelId) {
632
- result['modelId'] = uiDefinition.source.modelId;
633
- }
634
- return result;
635
- }));
636
- }
637
- createUIDefinition$(body) {
638
- return this.baseHttpService.api({
639
- method: 'post',
640
- url: this.serviceUrl,
641
- body,
642
- });
643
- }
644
- updateUIDefinition$(uiDefinition) {
645
- return this.baseHttpService.api({
646
- method: 'put',
647
- url: `${this.serviceUrl}/${uiDefinition.id}`,
648
- body: uiDefinition,
649
- });
650
- }
651
- deleteUIDefinition$(id) {
1260
+ delete$(id) {
652
1261
  return this.baseHttpService.api({
653
1262
  method: 'delete',
654
1263
  url: `${this.serviceUrl}/${id}`,
655
1264
  });
656
1265
  }
657
1266
  }
658
- UIDefinitionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
659
- UIDefinitionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService });
660
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService, decorators: [{
1267
+ UIDefinitionsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1268
+ UIDefinitionsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsAdminApiService });
1269
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsAdminApiService, decorators: [{
661
1270
  type: Injectable
662
1271
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
663
1272
 
@@ -674,10 +1283,10 @@ const fromUIComponentStoryDTO = (dto, attachments) => {
674
1283
  };
675
1284
  };
676
1285
 
677
- class UITemplatesApiService {
1286
+ class UITemplatesAdminApiService {
678
1287
  constructor(baseHttpService) {
679
1288
  this.baseHttpService = baseHttpService;
680
- this.serviceUrl = '/v2/uitemplates';
1289
+ this.serviceUrl = '/admin/v2/uitemplates';
681
1290
  this.fetchTemplates$ = (name) => {
682
1291
  let params = new HttpParams();
683
1292
  if (name) {
@@ -948,9 +1557,94 @@ class UITemplatesApiService {
948
1557
  });
949
1558
  }
950
1559
  }
951
- UITemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
952
- UITemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService });
953
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService, decorators: [{
1560
+ UITemplatesAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1561
+ UITemplatesAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesAdminApiService });
1562
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesAdminApiService, decorators: [{
1563
+ type: Injectable
1564
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1565
+
1566
+ class VeloceObjectsAdminApiService {
1567
+ constructor(baseHttpService) {
1568
+ this.baseHttpService = baseHttpService;
1569
+ this.serviceUrl = '/admin/v2/veloceobjects';
1570
+ this.updateCategory$ = (category) => {
1571
+ return this.baseHttpService.api({
1572
+ method: 'put',
1573
+ url: `${this.serviceUrl}/categories/${category.id}`,
1574
+ body: category,
1575
+ });
1576
+ };
1577
+ this.deleteCategory$ = (id) => {
1578
+ return this.baseHttpService.api({
1579
+ method: 'delete',
1580
+ url: `${this.serviceUrl}/categories/${id}`,
1581
+ });
1582
+ };
1583
+ this.searchObjects$ = (searchParams, expression) => {
1584
+ const params = new HttpParams({ fromObject: Object.assign({}, searchParams) });
1585
+ return this.baseHttpService.api({
1586
+ method: 'post',
1587
+ url: `${this.serviceUrl}/search`,
1588
+ params,
1589
+ body: expression || {},
1590
+ });
1591
+ };
1592
+ this.deleteObject$ = (id) => {
1593
+ return this.baseHttpService.api({
1594
+ method: 'delete',
1595
+ url: `${this.serviceUrl}/${id}`,
1596
+ });
1597
+ };
1598
+ this.duplicateObject$ = (body) => {
1599
+ return this.baseHttpService
1600
+ .api({
1601
+ method: 'post',
1602
+ url: `${this.serviceUrl}/${body.id}/clone`,
1603
+ body,
1604
+ })
1605
+ .pipe(map(response => response.clonedRecordId));
1606
+ };
1607
+ this.restoreObject$ = (id) => {
1608
+ return this.baseHttpService.api({
1609
+ method: 'patch',
1610
+ url: `${this.serviceUrl}/${id}/restore`,
1611
+ });
1612
+ };
1613
+ }
1614
+ fetchCategories$() {
1615
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/categories` });
1616
+ }
1617
+ createCategory$(category) {
1618
+ return this.baseHttpService.api({
1619
+ method: 'post',
1620
+ url: `${this.serviceUrl}/categories`,
1621
+ body: category,
1622
+ });
1623
+ }
1624
+ fetchObjects$() {
1625
+ return this.baseHttpService.api({ url: `${this.serviceUrl}` });
1626
+ }
1627
+ fetchObject$(id) {
1628
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
1629
+ }
1630
+ createObject$(object) {
1631
+ return this.baseHttpService.api({
1632
+ method: 'post',
1633
+ url: `${this.serviceUrl}`,
1634
+ body: object,
1635
+ });
1636
+ }
1637
+ updateObject$(object) {
1638
+ return this.baseHttpService.api({
1639
+ method: 'put',
1640
+ url: `${this.serviceUrl}/${object.id}`,
1641
+ body: object,
1642
+ });
1643
+ }
1644
+ }
1645
+ VeloceObjectsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1646
+ VeloceObjectsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsAdminApiService });
1647
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsAdminApiService, decorators: [{
954
1648
  type: Injectable
955
1649
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
956
1650
 
@@ -960,18 +1654,29 @@ ApiV2Module.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15
960
1654
  ApiV2Module.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ApiV2Module, imports: [HttpClientModule] });
961
1655
  ApiV2Module.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiV2Module, providers: [
962
1656
  BaseHttpService,
1657
+ CacheApiService,
1658
+ CatalogAdminApiService,
1659
+ CatalogApiService,
963
1660
  ConfigurationProcessorsApiService,
964
- ContextDefinitionApiService,
965
- ProceduresAdminApiService,
966
- ProceduresApiService,
967
- RuleGroupsAdminApiService,
968
- RulesAdminApiService,
969
- RulesApiService,
1661
+ ConfigurationSettingsApiService,
1662
+ ContextDefinitionAdminApiService,
1663
+ DocumentAttachmentApiService,
1664
+ EndpointsAdminApiService,
1665
+ FlowsApiService,
1666
+ OrchestrationsAdminApiService,
1667
+ OrchestrationsApiService,
1668
+ PCMApiService,
1669
+ PicklistsAdminApiService,
1670
+ ProductsAdminApiService,
1671
+ FunctionsAdminApiService,
1672
+ GuidedSellingsAdminApiService,
1673
+ GuidedSellingApiService,
1674
+ SalesforceApiService,
970
1675
  SalesTransactionApiService,
971
- ScriptsAdminApiService,
972
- ScriptsApiService,
973
- UIDefinitionsApiService,
974
- UITemplatesApiService,
1676
+ ShoppingCartSettingsApiService,
1677
+ UIDefinitionsAdminApiService,
1678
+ UITemplatesAdminApiService,
1679
+ VeloceObjectsAdminApiService,
975
1680
  XrayService,
976
1681
  ], imports: [HttpClientModule] });
977
1682
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiV2Module, decorators: [{
@@ -980,18 +1685,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
980
1685
  imports: [HttpClientModule],
981
1686
  providers: [
982
1687
  BaseHttpService,
1688
+ CacheApiService,
1689
+ CatalogAdminApiService,
1690
+ CatalogApiService,
983
1691
  ConfigurationProcessorsApiService,
984
- ContextDefinitionApiService,
985
- ProceduresAdminApiService,
986
- ProceduresApiService,
987
- RuleGroupsAdminApiService,
988
- RulesAdminApiService,
989
- RulesApiService,
1692
+ ConfigurationSettingsApiService,
1693
+ ContextDefinitionAdminApiService,
1694
+ DocumentAttachmentApiService,
1695
+ EndpointsAdminApiService,
1696
+ FlowsApiService,
1697
+ OrchestrationsAdminApiService,
1698
+ OrchestrationsApiService,
1699
+ PCMApiService,
1700
+ PicklistsAdminApiService,
1701
+ ProductsAdminApiService,
1702
+ FunctionsAdminApiService,
1703
+ GuidedSellingsAdminApiService,
1704
+ GuidedSellingApiService,
1705
+ SalesforceApiService,
990
1706
  SalesTransactionApiService,
991
- ScriptsAdminApiService,
992
- ScriptsApiService,
993
- UIDefinitionsApiService,
994
- UITemplatesApiService,
1707
+ ShoppingCartSettingsApiService,
1708
+ UIDefinitionsAdminApiService,
1709
+ UITemplatesAdminApiService,
1710
+ VeloceObjectsAdminApiService,
995
1711
  XrayService,
996
1712
  ],
997
1713
  }]
@@ -1001,5 +1717,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1001
1717
  * Generated bundle index. Do not edit.
1002
1718
  */
1003
1719
 
1004
- export { ApiV2Module, ConfigurationProcessorsApiService, ContextDefinitionApiService, ProceduresAdminApiService, ProceduresApiService, RuleGroupsAdminApiService, RulesAdminApiService, RulesApiService, SalesTransactionApiService, ScriptsAdminApiService, ScriptsApiService, UIDefinitionsApiService, UITemplatesApiService };
1720
+ export { ApiV2Module, CacheApiService, CatalogAdminApiService, CatalogApiService, ConfigurationProcessorsApiService, ConfigurationSettingsApiService, ContextDefinitionAdminApiService, DocumentAttachmentApiService, EndpointsAdminApiService, FlowsApiService, FunctionsAdminApiService, GuidedSellingApiService, GuidedSellingsAdminApiService, OrchestrationsAdminApiService, OrchestrationsApiService, PCMApiService, PicklistsAdminApiService, ProductsAdminApiService, SalesTransactionApiService, SalesforceApiService, ShoppingCartSettingsApiService, UIDefinitionsAdminApiService, UITemplatesAdminApiService, VeloceObjectsAdminApiService };
1005
1721
  //# sourceMappingURL=veloceapps-api-v2.mjs.map