@veloceapps/api 11.0.0-4 → 11.0.0-40

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 (217) hide show
  1. package/esm2020/index.mjs +2 -45
  2. package/esm2020/src/index.mjs +18 -0
  3. package/esm2020/src/lib/api.module.mjs +66 -0
  4. package/esm2020/src/lib/services/account-api.service.mjs +87 -0
  5. package/esm2020/src/lib/services/auth.service.mjs +22 -0
  6. package/esm2020/src/lib/services/contracted-price-api.service.mjs +45 -0
  7. package/esm2020/src/lib/services/flow-state-api.mjs +142 -0
  8. package/esm2020/src/lib/services/guided-sellings-admin-api.service.mjs +65 -0
  9. package/esm2020/src/lib/services/guided-sellings-api.service.mjs +37 -0
  10. package/esm2020/src/lib/services/offers-api.service.mjs +76 -0
  11. package/esm2020/src/lib/services/org-info-api.service.mjs +54 -0
  12. package/esm2020/src/lib/services/portals-api.service.mjs +76 -0
  13. package/esm2020/src/lib/services/promotions-api.service.mjs +68 -0
  14. package/esm2020/src/lib/services/rebate-program-api.service.mjs +68 -0
  15. package/esm2020/src/lib/services/rebate-type-api.service.mjs +68 -0
  16. package/esm2020/src/lib/services/sandbox-manager-api.service.mjs +94 -0
  17. package/esm2020/src/lib/services/stateful-configuration-api.mjs +51 -0
  18. package/esm2020/src/lib/types/auth.types.mjs +2 -0
  19. package/esm2020/src/lib/types/clone-request.types.mjs +2 -0
  20. package/esm2020/src/lib/types/delta-request.types.mjs +2 -0
  21. package/esm2020/src/lib/types/dto/offers-dto.types.mjs +2 -0
  22. package/esm2020/src/lib/types/index.mjs +6 -0
  23. package/esm2020/src/lib/types/org-info.types.mjs +2 -0
  24. package/esm2020/src/lib/types/search-request.types.mjs +2 -0
  25. package/esm2020/src/lib/types/stateful-configuration.types.mjs +2 -0
  26. package/esm2020/src/lib/utils/canvas.utils.mjs +33 -0
  27. package/esm2020/src/lib/utils/index.mjs +2 -0
  28. package/esm2020/v2/api-v2.module.mjs +70 -0
  29. package/esm2020/v2/index.mjs +4 -0
  30. package/esm2020/v2/services/cache-api.service.mjs +22 -0
  31. package/esm2020/v2/services/catalog-admin-api.service.mjs +192 -0
  32. package/esm2020/v2/services/catalog-api.service.mjs +90 -0
  33. package/esm2020/v2/services/configuration-processors-api.service.mjs +38 -0
  34. package/esm2020/v2/services/configuration-settings-api.service.mjs +89 -0
  35. package/esm2020/v2/services/context-definition-admin-api.service.mjs +67 -0
  36. package/esm2020/v2/services/document-attachment-api.service.mjs +66 -0
  37. package/esm2020/v2/services/endpoints-admin-api.service.mjs +79 -0
  38. package/esm2020/v2/services/flows-api.service.mjs +29 -0
  39. package/esm2020/v2/services/function-groups-admin-api.service.mjs +62 -0
  40. package/esm2020/v2/services/functions-admin-api.service.mjs +97 -0
  41. package/esm2020/v2/services/index.mjs +24 -0
  42. package/esm2020/v2/services/orchestrations-admin-api.service.mjs +87 -0
  43. package/esm2020/v2/services/orchestrations-api.service.mjs +23 -0
  44. package/esm2020/v2/services/pcm-api.service.mjs +29 -0
  45. package/esm2020/v2/services/picklists-admin-api.service.mjs +41 -0
  46. package/esm2020/v2/services/products-admin-api.service.mjs +90 -0
  47. package/esm2020/v2/services/sales-transactions-api.service.mjs +52 -0
  48. package/esm2020/v2/services/salesforce-api.service.mjs +83 -0
  49. package/esm2020/v2/services/scripts-admin-api.service.mjs +83 -0
  50. package/esm2020/v2/services/shopping-cart-settings-api.service.mjs +28 -0
  51. package/esm2020/v2/services/ui-definitions-admin-api.service.mjs +68 -0
  52. package/esm2020/v2/services/ui-templates-admin-api.service.mjs +286 -0
  53. package/esm2020/v2/services/veloce-objects-api.service.mjs +90 -0
  54. package/esm2020/v2/types/attachment.types.mjs +2 -0
  55. package/esm2020/v2/types/clone-request.types.mjs +2 -0
  56. package/esm2020/v2/types/dto/configuration-settings-dto.types.mjs +22 -0
  57. package/esm2020/v2/types/dto/ui-definition-dto.types.mjs +2 -0
  58. package/esm2020/v2/types/dto/ui-template-dto.types.mjs +2 -0
  59. package/esm2020/v2/types/index.mjs +6 -0
  60. package/esm2020/v2/types/pcm.types.mjs +2 -0
  61. package/esm2020/v2/types/procedure.types.mjs +2 -0
  62. package/esm2020/v2/types/sales-transaction.types.mjs +2 -0
  63. package/esm2020/v2/types/search-request.types.mjs +2 -0
  64. package/esm2020/v2/utils/ui-definition.utils.mjs +23 -0
  65. package/esm2020/v2/utils/ui-template.utils.mjs +13 -0
  66. package/esm2020/v2/veloceapps-api-v2.mjs +5 -0
  67. package/esm2020/veloceapps-api.mjs +1 -1
  68. package/fesm2015/veloceapps-api-v2.mjs +1746 -0
  69. package/fesm2015/veloceapps-api-v2.mjs.map +1 -0
  70. package/fesm2015/veloceapps-api.mjs +564 -2751
  71. package/fesm2015/veloceapps-api.mjs.map +1 -1
  72. package/fesm2020/veloceapps-api-v2.mjs +1818 -0
  73. package/fesm2020/veloceapps-api-v2.mjs.map +1 -0
  74. package/fesm2020/veloceapps-api.mjs +563 -2848
  75. package/fesm2020/veloceapps-api.mjs.map +1 -1
  76. package/index.d.ts +1 -44
  77. package/package.json +9 -1
  78. package/src/index.d.ts +17 -0
  79. package/{lib → src/lib}/api.module.d.ts +2 -1
  80. package/{lib → src/lib}/types/index.d.ts +0 -2
  81. package/{lib → src/lib}/types/stateful-configuration.types.d.ts +1 -2
  82. package/src/lib/utils/index.d.ts +1 -0
  83. package/v2/api-v2.module.d.ts +7 -0
  84. package/v2/index.d.ts +3 -0
  85. package/v2/services/cache-api.service.d.ts +11 -0
  86. package/{lib → v2}/services/catalog-api.service.d.ts +5 -5
  87. package/{lib → v2}/services/configuration-settings-api.service.d.ts +1 -2
  88. package/{lib/services/rlm-api.service.d.ts → v2/services/context-definition-admin-api.service.d.ts} +3 -3
  89. package/{lib → v2}/services/document-attachment-api.service.d.ts +1 -1
  90. package/{lib/services/endpoints-api.service.d.ts → v2/services/endpoints-admin-api.service.d.ts} +3 -4
  91. package/v2/services/function-groups-admin-api.service.d.ts +18 -0
  92. package/v2/services/functions-admin-api.service.d.ts +22 -0
  93. package/v2/services/index.d.ts +23 -0
  94. package/v2/services/orchestrations-admin-api.service.d.ts +21 -0
  95. package/v2/services/orchestrations-api.service.d.ts +12 -0
  96. package/v2/services/pcm-api.service.d.ts +11 -0
  97. package/{lib/services/picklists-api.service.d.ts → v2/services/picklists-admin-api.service.d.ts} +3 -3
  98. package/v2/services/products-admin-api.service.d.ts +21 -0
  99. package/v2/services/sales-transactions-api.service.d.ts +20 -0
  100. package/{lib → v2}/services/salesforce-api.service.d.ts +1 -0
  101. package/{lib/services/scripts-api.service.d.ts → v2/services/scripts-admin-api.service.d.ts} +3 -3
  102. package/v2/services/ui-definitions-admin-api.service.d.ts +18 -0
  103. package/{lib/services/ui-templates-api.service.d.ts → v2/services/ui-templates-admin-api.service.d.ts} +3 -3
  104. package/{lib → v2}/services/veloce-objects-api.service.d.ts +3 -3
  105. package/v2/types/clone-request.types.d.ts +5 -0
  106. package/v2/types/dto/ui-definition-dto.types.d.ts +7 -0
  107. package/v2/types/index.d.ts +5 -0
  108. package/v2/types/pcm.types.d.ts +10 -0
  109. package/v2/types/procedure.types.d.ts +10 -0
  110. package/v2/types/sales-transaction.types.d.ts +14 -0
  111. package/v2/types/search-request.types.d.ts +8 -0
  112. package/v2/utils/ui-definition.utils.d.ts +5 -0
  113. package/esm2020/lib/api.module.mjs +0 -146
  114. package/esm2020/lib/services/account-api.service.mjs +0 -87
  115. package/esm2020/lib/services/auth.service.mjs +0 -22
  116. package/esm2020/lib/services/catalog-admin-api.service.mjs +0 -192
  117. package/esm2020/lib/services/catalog-api.service.mjs +0 -90
  118. package/esm2020/lib/services/configuration-api.service.mjs +0 -109
  119. package/esm2020/lib/services/configuration-processors-api.service.mjs +0 -38
  120. package/esm2020/lib/services/configuration-settings-api.service.mjs +0 -96
  121. package/esm2020/lib/services/context-api.service.mjs +0 -26
  122. package/esm2020/lib/services/contracted-price-api.service.mjs +0 -45
  123. package/esm2020/lib/services/delta-api.service.mjs +0 -23
  124. package/esm2020/lib/services/document-attachment-api.service.mjs +0 -66
  125. package/esm2020/lib/services/endpoints-api.service.mjs +0 -80
  126. package/esm2020/lib/services/flow-state-api.mjs +0 -142
  127. package/esm2020/lib/services/flows-api.service.mjs +0 -29
  128. package/esm2020/lib/services/guided-sellings-admin-api.service.mjs +0 -65
  129. package/esm2020/lib/services/guided-sellings-api.service.mjs +0 -37
  130. package/esm2020/lib/services/offers-api.service.mjs +0 -76
  131. package/esm2020/lib/services/org-info-api.service.mjs +0 -54
  132. package/esm2020/lib/services/picklists-api.service.mjs +0 -41
  133. package/esm2020/lib/services/portals-api.service.mjs +0 -76
  134. package/esm2020/lib/services/price-api.service.mjs +0 -63
  135. package/esm2020/lib/services/procedures-api.service.mjs +0 -113
  136. package/esm2020/lib/services/product-api.service.mjs +0 -153
  137. package/esm2020/lib/services/product-model-api.service.mjs +0 -223
  138. package/esm2020/lib/services/promotions-api.service.mjs +0 -68
  139. package/esm2020/lib/services/quote-api.service.mjs +0 -56
  140. package/esm2020/lib/services/ramp-api.service.mjs +0 -31
  141. package/esm2020/lib/services/rebate-program-api.service.mjs +0 -68
  142. package/esm2020/lib/services/rebate-type-api.service.mjs +0 -68
  143. package/esm2020/lib/services/rlm-api.service.mjs +0 -64
  144. package/esm2020/lib/services/rlm-quote-api.service.mjs +0 -27
  145. package/esm2020/lib/services/rule-groups-api.service.mjs +0 -62
  146. package/esm2020/lib/services/rules-api.service.mjs +0 -98
  147. package/esm2020/lib/services/salesforce-api.service.mjs +0 -79
  148. package/esm2020/lib/services/sandbox-manager-api.service.mjs +0 -94
  149. package/esm2020/lib/services/scripts-api.service.mjs +0 -83
  150. package/esm2020/lib/services/shopping-cart-settings-api.service.mjs +0 -28
  151. package/esm2020/lib/services/stateful-configuration-api.mjs +0 -51
  152. package/esm2020/lib/services/ui-definitions-api.service.mjs +0 -76
  153. package/esm2020/lib/services/ui-templates-api.service.mjs +0 -286
  154. package/esm2020/lib/services/veloce-objects-api.service.mjs +0 -90
  155. package/esm2020/lib/types/attachment.types.mjs +0 -2
  156. package/esm2020/lib/types/auth.types.mjs +0 -2
  157. package/esm2020/lib/types/clone-request.types.mjs +0 -2
  158. package/esm2020/lib/types/delta-request.types.mjs +0 -2
  159. package/esm2020/lib/types/dto/configuration-settings-dto.types.mjs +0 -22
  160. package/esm2020/lib/types/dto/offers-dto.types.mjs +0 -2
  161. package/esm2020/lib/types/dto/ui-template-dto.types.mjs +0 -2
  162. package/esm2020/lib/types/index.mjs +0 -8
  163. package/esm2020/lib/types/org-info.types.mjs +0 -2
  164. package/esm2020/lib/types/price.types.mjs +0 -2
  165. package/esm2020/lib/types/quote.types.mjs +0 -2
  166. package/esm2020/lib/types/ramp-request.types.mjs +0 -2
  167. package/esm2020/lib/types/search-request.types.mjs +0 -2
  168. package/esm2020/lib/types/stateful-configuration.types.mjs +0 -2
  169. package/esm2020/lib/utils/canvas.utils.mjs +0 -33
  170. package/esm2020/lib/utils/index.mjs +0 -3
  171. package/esm2020/lib/utils/ui-template.utils.mjs +0 -13
  172. package/lib/services/configuration-api.service.d.ts +0 -23
  173. package/lib/services/context-api.service.d.ts +0 -11
  174. package/lib/services/delta-api.service.d.ts +0 -12
  175. package/lib/services/price-api.service.d.ts +0 -16
  176. package/lib/services/procedures-api.service.d.ts +0 -30
  177. package/lib/services/product-api.service.d.ts +0 -31
  178. package/lib/services/product-model-api.service.d.ts +0 -29
  179. package/lib/services/quote-api.service.d.ts +0 -22
  180. package/lib/services/ramp-api.service.d.ts +0 -13
  181. package/lib/services/rlm-quote-api.service.d.ts +0 -11
  182. package/lib/services/rule-groups-api.service.d.ts +0 -18
  183. package/lib/services/rules-api.service.d.ts +0 -22
  184. package/lib/services/ui-definitions-api.service.d.ts +0 -15
  185. package/lib/types/price.types.d.ts +0 -5
  186. package/lib/types/quote.types.d.ts +0 -8
  187. package/lib/types/ramp-request.types.d.ts +0 -13
  188. package/lib/utils/index.d.ts +0 -2
  189. /package/{lib → src/lib}/services/account-api.service.d.ts +0 -0
  190. /package/{lib → src/lib}/services/auth.service.d.ts +0 -0
  191. /package/{lib → src/lib}/services/contracted-price-api.service.d.ts +0 -0
  192. /package/{lib → src/lib}/services/flow-state-api.d.ts +0 -0
  193. /package/{lib → src/lib}/services/guided-sellings-admin-api.service.d.ts +0 -0
  194. /package/{lib → src/lib}/services/guided-sellings-api.service.d.ts +0 -0
  195. /package/{lib → src/lib}/services/offers-api.service.d.ts +0 -0
  196. /package/{lib → src/lib}/services/org-info-api.service.d.ts +0 -0
  197. /package/{lib → src/lib}/services/portals-api.service.d.ts +0 -0
  198. /package/{lib → src/lib}/services/promotions-api.service.d.ts +0 -0
  199. /package/{lib → src/lib}/services/rebate-program-api.service.d.ts +0 -0
  200. /package/{lib → src/lib}/services/rebate-type-api.service.d.ts +0 -0
  201. /package/{lib → src/lib}/services/sandbox-manager-api.service.d.ts +0 -0
  202. /package/{lib → src/lib}/services/stateful-configuration-api.d.ts +0 -0
  203. /package/{lib → src/lib}/types/auth.types.d.ts +0 -0
  204. /package/{lib → src/lib}/types/clone-request.types.d.ts +0 -0
  205. /package/{lib → src/lib}/types/delta-request.types.d.ts +0 -0
  206. /package/{lib → src/lib}/types/dto/offers-dto.types.d.ts +0 -0
  207. /package/{lib → src/lib}/types/org-info.types.d.ts +0 -0
  208. /package/{lib → src/lib}/types/search-request.types.d.ts +0 -0
  209. /package/{lib → src/lib}/utils/canvas.utils.d.ts +0 -0
  210. /package/{lib → v2}/services/catalog-admin-api.service.d.ts +0 -0
  211. /package/{lib → v2}/services/configuration-processors-api.service.d.ts +0 -0
  212. /package/{lib → v2}/services/flows-api.service.d.ts +0 -0
  213. /package/{lib → v2}/services/shopping-cart-settings-api.service.d.ts +0 -0
  214. /package/{lib → v2}/types/attachment.types.d.ts +0 -0
  215. /package/{lib → v2}/types/dto/configuration-settings-dto.types.d.ts +0 -0
  216. /package/{lib → v2}/types/dto/ui-template-dto.types.d.ts +0 -0
  217. /package/{lib → v2}/utils/ui-template.utils.d.ts +0 -0
@@ -0,0 +1,1746 @@
1
+ import { HttpParams, HttpErrorResponse, HttpClientModule } from '@angular/common/http';
2
+ import * as i0 from '@angular/core';
3
+ import { Injectable, NgModule } from '@angular/core';
4
+ import * as i1 from '@veloceapps/core';
5
+ import { Expression, RuleGroupTypes, 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
+ import { __rest } from 'tslib';
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
+
299
+ class ConfigurationProcessorsApiService {
300
+ constructor(baseHttpService) {
301
+ this.baseHttpService = baseHttpService;
302
+ this.serviceUrl = '/v2/configuration/processors/owners';
303
+ this.fetchConfigurationProcessors$ = (ownerId) => {
304
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${ownerId}` });
305
+ };
306
+ this.createConfigurationProcessors$ = (configurationProcessor) => {
307
+ return this.baseHttpService.api({
308
+ method: 'post',
309
+ url: `${this.serviceUrl}/${configurationProcessor.ownerId}`,
310
+ body: configurationProcessor,
311
+ });
312
+ };
313
+ this.updateConfigurationProcessors$ = (configurationProcessor) => {
314
+ return this.baseHttpService.api({
315
+ method: 'put',
316
+ url: `${this.serviceUrl}/${configurationProcessor.ownerId}/${configurationProcessor.id}`,
317
+ body: configurationProcessor,
318
+ });
319
+ };
320
+ this.deleteConfigurationProcessors$ = (configurationProcessor) => {
321
+ return this.baseHttpService.api({
322
+ method: 'delete',
323
+ url: `${this.serviceUrl}/${configurationProcessor.ownerId}/${configurationProcessor.id}`,
324
+ });
325
+ };
326
+ }
327
+ }
328
+ ConfigurationProcessorsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
329
+ ConfigurationProcessorsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService });
330
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService, decorators: [{
331
+ type: Injectable
332
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
333
+
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 {
407
+ constructor(baseHttpService) {
408
+ this.baseHttpService = baseHttpService;
409
+ this.serviceUrl = '/admin/v2/context-definition';
410
+ }
411
+ fetchContextDefinitions$() {
412
+ return this.baseHttpService.api({ url: `${this.serviceUrl}`, skipErrorHandler: true }).pipe(catchError(() => {
413
+ return of([]);
414
+ }));
415
+ }
416
+ fetchContextMappings$(id) {
417
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}/mappings` });
418
+ }
419
+ fetchContextDefinitionStructure$(id) {
420
+ return this.baseHttpService
421
+ .api({
422
+ url: `${this.serviceUrl}/${id}/structure/details`,
423
+ skipErrorHandler: true,
424
+ })
425
+ .pipe(catchError(() => {
426
+ return of([]);
427
+ }), map(objects => {
428
+ return objects.map(object => {
429
+ var _a, _b, _c;
430
+ const tag = (_b = (_a = object.tags) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.title;
431
+ const objectAttributes = object.attributes || [];
432
+ return {
433
+ id: object.id,
434
+ title: tag || object.title,
435
+ parentNodeId: object.parentNodeId,
436
+ nodeTags: ((_c = object.tags) !== null && _c !== void 0 ? _c : []).map(nodeTag => nodeTag.title),
437
+ attributes: objectAttributes.reduce((result, attribute) => {
438
+ var _a, _b;
439
+ const tag = (_b = (_a = attribute.tags) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.title;
440
+ if (tag) {
441
+ result.push({
442
+ title: tag,
443
+ fieldType: attribute.fieldType,
444
+ dataType: attribute.dataType,
445
+ });
446
+ }
447
+ return result;
448
+ }, []),
449
+ };
450
+ });
451
+ }));
452
+ }
453
+ fetchRlmProcedures(contextDefinitionId) {
454
+ const params = {};
455
+ if (contextDefinitionId) {
456
+ params['contextDefinitionId'] = contextDefinitionId;
457
+ }
458
+ return this.baseHttpService.api({
459
+ url: `${this.serviceUrl}/procedures`,
460
+ params,
461
+ });
462
+ }
463
+ }
464
+ ContextDefinitionAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextDefinitionAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
465
+ ContextDefinitionAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextDefinitionAdminApiService });
466
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextDefinitionAdminApiService, decorators: [{
467
+ type: Injectable
468
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
469
+
470
+ class DocumentAttachmentApiService {
471
+ constructor(httpService, fileDownloadService) {
472
+ this.httpService = httpService;
473
+ this.fileDownloadService = fileDownloadService;
474
+ this.SERVICE_URL = '/v2/attachments';
475
+ }
476
+ getAttachments(searchRequest) {
477
+ return this.httpService.api({
478
+ url: `${this.SERVICE_URL}/search`,
479
+ method: 'post',
480
+ body: searchRequest,
481
+ });
482
+ }
483
+ createAttachment(attachment, file, reportProgress) {
484
+ const formData = new FormData();
485
+ if (file) {
486
+ formData.append('file', file, file.name);
487
+ }
488
+ formData.append('attachment', new Blob([JSON.stringify(attachment)], {
489
+ type: 'application/json',
490
+ }));
491
+ return this.httpService.upload({
492
+ url: `${this.SERVICE_URL}`,
493
+ body: formData,
494
+ method: 'post',
495
+ observe: reportProgress ? 'events' : undefined,
496
+ reportProgress,
497
+ });
498
+ }
499
+ updateAttachment(id, attachment) {
500
+ return this.httpService.api({
501
+ url: `${this.SERVICE_URL}/${id}`,
502
+ body: attachment,
503
+ method: 'put',
504
+ });
505
+ }
506
+ getAttachmentFile(id, isPreventDownload) {
507
+ return this.httpService
508
+ .api({
509
+ url: `${this.SERVICE_URL}/${id}/file`,
510
+ responseType: isPreventDownload ? 'arraybuffer' : 'blob',
511
+ observe: isPreventDownload ? 'body' : 'response',
512
+ })
513
+ .pipe(tap(response => {
514
+ if (!isPreventDownload) {
515
+ this.fileDownloadService.processDownload(response);
516
+ }
517
+ }), map(response => (isPreventDownload ? new Blob([response.body || response]) : response.body || response)));
518
+ }
519
+ removeAttachment(id) {
520
+ return this.httpService.api({
521
+ url: `${this.SERVICE_URL}/${id}`,
522
+ method: 'delete',
523
+ });
524
+ }
525
+ }
526
+ 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 });
527
+ DocumentAttachmentApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentAttachmentApiService });
528
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentAttachmentApiService, decorators: [{
529
+ type: Injectable
530
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i1.FileDownloadService }]; } });
531
+
532
+ class EndpointsAdminApiService {
533
+ constructor(baseHttpService) {
534
+ this.baseHttpService = baseHttpService;
535
+ this.serviceUrl = '/admin/v2/api-endpoints';
536
+ }
537
+ fetchEndpoints$() {
538
+ return this.searchEndpoints$(new Expression(), 0, -1);
539
+ }
540
+ searchEndpoints$(expression, skip, count) {
541
+ let params = new HttpParams();
542
+ params = params.set('skip', '' + skip);
543
+ params = params.set('count', '' + count);
544
+ return this.baseHttpService.api({
545
+ method: 'post',
546
+ url: `${this.serviceUrl}/search`,
547
+ params,
548
+ body: expression,
549
+ });
550
+ }
551
+ removeEndpoint$(id) {
552
+ return this.baseHttpService.api({
553
+ url: `${this.serviceUrl}/${id}`,
554
+ method: 'delete',
555
+ });
556
+ }
557
+ restoreEndpoint$(id) {
558
+ return this.baseHttpService.api({
559
+ url: `${this.serviceUrl}/${id}/restore`,
560
+ method: 'patch',
561
+ });
562
+ }
563
+ fetchEndpoint$(id) {
564
+ return this.baseHttpService.api({
565
+ url: `${this.serviceUrl}/${id}`,
566
+ method: 'get',
567
+ });
568
+ }
569
+ createEndpoint$(body) {
570
+ return this.baseHttpService.api({
571
+ url: `${this.serviceUrl}`,
572
+ method: 'post',
573
+ body,
574
+ });
575
+ }
576
+ updateEndpoint$(body) {
577
+ return this.baseHttpService.api({
578
+ url: `${this.serviceUrl}/${body.id}`,
579
+ method: 'put',
580
+ body,
581
+ });
582
+ }
583
+ duplicateEndpoint$(cloneRequest) {
584
+ return this.baseHttpService.api({
585
+ url: `${this.serviceUrl}/${cloneRequest.id}/clone`,
586
+ method: 'post',
587
+ body: cloneRequest,
588
+ });
589
+ }
590
+ executeEndpoint$(body) {
591
+ return this.baseHttpService.api({
592
+ url: `${this.serviceUrl}/execute`,
593
+ method: 'post',
594
+ body,
595
+ responseType: 'text',
596
+ skipErrorHandler: true,
597
+ });
598
+ }
599
+ }
600
+ EndpointsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
601
+ EndpointsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsAdminApiService });
602
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsAdminApiService, decorators: [{
603
+ type: Injectable
604
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
605
+
606
+ class FlowsApiService {
607
+ constructor(configurationSettingsApiService) {
608
+ this.configurationSettingsApiService = configurationSettingsApiService;
609
+ this.flowsKey = 'flows';
610
+ }
611
+ getFlow(id) {
612
+ return this.fetchFlows().pipe(map(flows => flows.find(flow => flow.id == id)), map(flow => {
613
+ if (!flow) {
614
+ throw new Error(`Flow with flowId=${id} is not defined`);
615
+ }
616
+ return flow;
617
+ }));
618
+ }
619
+ fetchFlows() {
620
+ return this.configurationSettingsApiService
621
+ .fetchSetting(this.flowsKey)
622
+ .pipe(map((setting) => ((setting === null || setting === void 0 ? void 0 : setting.value) ? JSON.parse(setting.value) : [])));
623
+ }
624
+ }
625
+ FlowsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
626
+ FlowsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService });
627
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, decorators: [{
628
+ type: Injectable
629
+ }], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
630
+
631
+ class FunctionGroupsAdminApiService {
632
+ constructor(baseHttpService) {
633
+ this.baseHttpService = baseHttpService;
634
+ this.serviceUrl = '/admin/v2/functions/groups';
635
+ this.fetchAll$ = () => {
636
+ return this.search$(new Expression(), 0, 100);
637
+ };
638
+ this.search$ = (expression, skip, count) => {
639
+ let params = new HttpParams();
640
+ params = params.set('skip', '' + skip);
641
+ params = params.set('count', '' + count);
642
+ return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
643
+ };
644
+ this.create$ = (ruleGroup) => {
645
+ return this.baseHttpService.api({
646
+ url: `${this.serviceUrl}`,
647
+ method: 'post',
648
+ body: ruleGroup,
649
+ });
650
+ };
651
+ this.update$ = (ruleGroup) => {
652
+ return this.baseHttpService.api({
653
+ url: `${this.serviceUrl}/${ruleGroup.id}`,
654
+ method: 'post',
655
+ body: ruleGroup,
656
+ });
657
+ };
658
+ this.duplicate$ = (body) => {
659
+ return this.baseHttpService
660
+ .api({
661
+ url: `${this.serviceUrl}/${body.id}/clone`,
662
+ method: 'post',
663
+ body,
664
+ })
665
+ .pipe(map$1(response => response.clonedRecordId));
666
+ };
667
+ this.remove$ = (id) => {
668
+ return this.baseHttpService.api({
669
+ url: `${this.serviceUrl}/${id}`,
670
+ method: 'delete',
671
+ });
672
+ };
673
+ this.restore$ = (id) => {
674
+ return this.baseHttpService.api({
675
+ url: `${this.serviceUrl}/${id}/restore`,
676
+ method: 'patch',
677
+ });
678
+ };
679
+ }
680
+ }
681
+ FunctionGroupsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FunctionGroupsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
682
+ FunctionGroupsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FunctionGroupsAdminApiService });
683
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FunctionGroupsAdminApiService, decorators: [{
684
+ type: Injectable
685
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
686
+
687
+ class FunctionsAdminApiService {
688
+ constructor(baseHttpService) {
689
+ this.baseHttpService = baseHttpService;
690
+ this.serviceUrl = '/admin/v2/functions/rules';
691
+ this.fetchAll$ = () => {
692
+ return this.search$(new Expression(), 0, 100);
693
+ };
694
+ this.search$ = (expression, skip, count) => {
695
+ let params = new HttpParams();
696
+ if (typeof skip === 'number') {
697
+ params = params.set('skip', '' + skip);
698
+ }
699
+ if (typeof count === 'number') {
700
+ params = params.set('count', '' + count);
701
+ }
702
+ return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
703
+ };
704
+ this.create$ = (rule) => {
705
+ return this.baseHttpService.api({
706
+ url: `${this.serviceUrl}`,
707
+ method: 'post',
708
+ body: rule,
709
+ });
710
+ };
711
+ this.update$ = (rule) => {
712
+ return this.baseHttpService.api({
713
+ url: `${this.serviceUrl}/${rule.id}`,
714
+ method: 'put',
715
+ body: rule,
716
+ });
717
+ };
718
+ this.duplicate$ = (body) => {
719
+ return this.baseHttpService
720
+ .api({
721
+ url: `${this.serviceUrl}/${body.id}/clone`,
722
+ method: 'post',
723
+ body,
724
+ })
725
+ .pipe(map$1(response => response.clonedRecordId));
726
+ };
727
+ this.remove$ = (id) => {
728
+ return this.baseHttpService.api({
729
+ url: `${this.serviceUrl}/${id}`,
730
+ method: 'delete',
731
+ });
732
+ };
733
+ this.restore$ = (id) => {
734
+ return this.baseHttpService.api({
735
+ url: `${this.serviceUrl}/${id}/restore`,
736
+ method: 'patch',
737
+ });
738
+ };
739
+ }
740
+ fetch$(id) {
741
+ return this.baseHttpService.api({
742
+ url: `${this.serviceUrl}/${id}`,
743
+ method: 'get',
744
+ });
745
+ }
746
+ fetchHeaderFields$() {
747
+ return this.baseHttpService.api({
748
+ url: `${this.serviceUrl}/describe/Header`,
749
+ method: 'get',
750
+ });
751
+ }
752
+ execute$(body) {
753
+ const url = this.getExecuteRuleUrl(body.rule.ruleGroupType);
754
+ return this.baseHttpService.api({
755
+ url,
756
+ method: 'post',
757
+ body,
758
+ });
759
+ }
760
+ getExecuteRuleUrl(ruleGroupType) {
761
+ switch (ruleGroupType) {
762
+ case RuleGroupTypes.eligibility:
763
+ return `${this.serviceUrl}/eligibility/execute`;
764
+ case RuleGroupTypes.rlmContextBased:
765
+ case RuleGroupTypes.generalContextBased:
766
+ return `${this.serviceUrl}/execute`;
767
+ default:
768
+ return `${this.serviceUrl}/legacy/execute`;
769
+ }
770
+ }
771
+ }
772
+ FunctionsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FunctionsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
773
+ FunctionsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FunctionsAdminApiService });
774
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FunctionsAdminApiService, decorators: [{
775
+ type: Injectable
776
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
777
+
778
+ class OrchestrationsAdminApiService {
779
+ constructor(baseHttpService) {
780
+ this.baseHttpService = baseHttpService;
781
+ this.SERVICE_URL = '/admin/v2/orchestrations';
782
+ this.fetchAll$ = () => {
783
+ return this.search$(new Expression(), 0, 100);
784
+ };
785
+ this.search$ = (expression, skip, count) => {
786
+ let params = new HttpParams();
787
+ params = params.set('skip', '' + skip);
788
+ params = params.set('count', '' + count);
789
+ return this.baseHttpService.api({
790
+ method: 'post',
791
+ url: `${this.SERVICE_URL}/search`,
792
+ params,
793
+ body: expression,
794
+ });
795
+ };
796
+ this.create$ = (newProcedure) => {
797
+ return this.baseHttpService.api({
798
+ url: `${this.SERVICE_URL}`,
799
+ method: 'post',
800
+ body: newProcedure,
801
+ });
802
+ };
803
+ this.update$ = (procedure) => {
804
+ return this.baseHttpService.api({
805
+ url: `${this.SERVICE_URL}/${procedure.id}`,
806
+ method: 'put',
807
+ body: procedure,
808
+ });
809
+ };
810
+ this.duplicate$ = (body) => {
811
+ return this.baseHttpService
812
+ .api({
813
+ url: `${this.SERVICE_URL}/${body.id}/clone`,
814
+ method: 'post',
815
+ body,
816
+ })
817
+ .pipe(map$1(response => response.clonedRecordId));
818
+ };
819
+ this.remove$ = (id) => {
820
+ return this.baseHttpService.api({
821
+ url: `${this.SERVICE_URL}/${id}`,
822
+ method: 'delete',
823
+ });
824
+ };
825
+ this.restore$ = (id) => {
826
+ return this.baseHttpService.api({
827
+ url: `${this.SERVICE_URL}/${id}/restore`,
828
+ method: 'patch',
829
+ });
830
+ };
831
+ }
832
+ fetch$(id) {
833
+ return this.baseHttpService.api({
834
+ url: `${this.SERVICE_URL}/${id}`,
835
+ method: 'get',
836
+ });
837
+ }
838
+ execute$(body) {
839
+ return this.baseHttpService.api({
840
+ url: `${this.SERVICE_URL}/execute`,
841
+ method: 'post',
842
+ body,
843
+ });
844
+ }
845
+ catalogExecute$(body) {
846
+ return this.baseHttpService.api({
847
+ url: `${this.SERVICE_URL}/catalog/execute`,
848
+ method: 'post',
849
+ body,
850
+ });
851
+ }
852
+ }
853
+ OrchestrationsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrchestrationsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
854
+ OrchestrationsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrchestrationsAdminApiService });
855
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrchestrationsAdminApiService, decorators: [{
856
+ type: Injectable
857
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
858
+
859
+ class OrchestrationsApiService {
860
+ constructor(baseHttpService) {
861
+ this.baseHttpService = baseHttpService;
862
+ this.SERVICE_URL = '/v2/orchestrations';
863
+ }
864
+ apply$(request, options) {
865
+ return this.baseHttpService.api(Object.assign({ url: `${this.SERVICE_URL}/apply`, method: 'post', body: request }, options));
866
+ }
867
+ }
868
+ OrchestrationsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrchestrationsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
869
+ OrchestrationsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrchestrationsApiService });
870
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrchestrationsApiService, decorators: [{
871
+ type: Injectable
872
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
873
+
874
+ class SalesforceApiService {
875
+ constructor(httpService) {
876
+ this.httpService = httpService;
877
+ this.SERVICE_URL = '/v2/proxy';
878
+ }
879
+ query(searchRequest, objectName, options) {
880
+ 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));
881
+ }
882
+ queryObjects(search, options) {
883
+ let params = new HttpParams();
884
+ if (search) {
885
+ params = params.append('search', search);
886
+ }
887
+ return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/query`, params }, options));
888
+ }
889
+ search(req, options) {
890
+ return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/rest/search`, params: { q: req.searchString } }, options));
891
+ }
892
+ describeObject(objectName, options) {
893
+ const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields`;
894
+ return this.httpService.api(Object.assign({ url: methodUrl }, options));
895
+ }
896
+ describeField(objectName, fieldName, options) {
897
+ const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields/${fieldName}`;
898
+ return this.httpService.api(Object.assign({ url: methodUrl }, options));
899
+ }
900
+ describe2(objectName, fields, options) {
901
+ const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields`;
902
+ return this.httpService.api(Object.assign({ method: 'post', url: methodUrl, body: fields }, options));
903
+ }
904
+ apexGetRequest(path, params, options) {
905
+ // this line is needed because HttpParams instance from Integration behaves wrong in studio instance of Angular
906
+ const httpParams = new HttpParams({ fromString: params.toString() });
907
+ return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/apex${path}`, params: httpParams }, options));
908
+ }
909
+ apexPostRequest(path, body, options) {
910
+ return this.httpService.api(Object.assign({ method: 'post', body, url: `${this.SERVICE_URL}/apex${path}` }, options));
911
+ }
912
+ restGetRequest(path, params, options) {
913
+ const httpParams = new HttpParams({ fromString: params.toString() });
914
+ return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/rest${path}`, params: httpParams }, options));
915
+ }
916
+ getGlobalPicklists() {
917
+ return this.httpService.api({
918
+ method: 'get',
919
+ url: `${this.SERVICE_URL}/globalvalueset`,
920
+ });
921
+ }
922
+ getGlobalPicklistValues(id) {
923
+ return this.httpService.api({
924
+ method: 'get',
925
+ url: `${this.SERVICE_URL}/globalvalueset/${id}/values`,
926
+ });
927
+ }
928
+ }
929
+ SalesforceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
930
+ SalesforceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService });
931
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, decorators: [{
932
+ type: Injectable
933
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
934
+
935
+ class PCMApiService {
936
+ constructor(sfApiService) {
937
+ this.sfApiService = sfApiService;
938
+ }
939
+ fetchPCMByProductId(productId) {
940
+ return this.sfApiService.restGetRequest(`/connect/pcm/products/${productId}`, new HttpParams()).pipe(tap$1(response => {
941
+ if (response.status.code !== '200') {
942
+ throw new Error(response.status.message);
943
+ }
944
+ }), map$1(response => {
945
+ const pcm = response.products[0];
946
+ if (!pcm) {
947
+ throw new Error('PCM product is not found');
948
+ }
949
+ return pcm;
950
+ }));
951
+ }
952
+ }
953
+ PCMApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PCMApiService, deps: [{ token: SalesforceApiService }], target: i0.ɵɵFactoryTarget.Injectable });
954
+ PCMApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PCMApiService });
955
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PCMApiService, decorators: [{
956
+ type: Injectable
957
+ }], ctorParameters: function () { return [{ type: SalesforceApiService }]; } });
958
+
959
+ class PicklistsAdminApiService {
960
+ constructor(baseHttpService) {
961
+ this.baseHttpService = baseHttpService;
962
+ this.serviceUrl = '/admin/v2/picklists';
963
+ this.fetchAllPicklists$ = () => this.baseHttpService.api({ url: `${this.serviceUrl}` });
964
+ this.fetchPicklist$ = (code) => this.baseHttpService.api({ url: `${this.serviceUrl}/${code}` });
965
+ this.createPicklist$ = (picklist) => {
966
+ return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}`, body: picklist });
967
+ };
968
+ this.updatePicklist$ = (picklist) => {
969
+ return this.baseHttpService.api({
970
+ method: 'put',
971
+ url: `${this.serviceUrl}/${picklist.id}`,
972
+ body: picklist,
973
+ });
974
+ };
975
+ this.removePicklist$ = (id) => this.baseHttpService.api({ method: 'delete', url: `${this.serviceUrl}/${id}` });
976
+ this.restorePicklist$ = (id) => {
977
+ return this.baseHttpService.api({
978
+ url: `${this.serviceUrl}/${id}/restore`,
979
+ method: 'patch',
980
+ });
981
+ };
982
+ this.addPicklistValue$ = (picklist, value) => {
983
+ const data = Object.assign(Object.assign({}, picklist), { values: [...picklist.values, value] });
984
+ return this.baseHttpService.api({ method: 'put', url: `${this.serviceUrl}/${picklist.id}`, body: data });
985
+ };
986
+ }
987
+ }
988
+ PicklistsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
989
+ PicklistsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsAdminApiService });
990
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsAdminApiService, decorators: [{
991
+ type: Injectable
992
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
993
+
994
+ class ProductsAdminApiService {
995
+ constructor(baseHttpService) {
996
+ this.baseHttpService = baseHttpService;
997
+ this.serviceUrl = '/admin/v2/products';
998
+ this.fetchProducts$ = (payload) => {
999
+ let params = new HttpParams();
1000
+ params = params.append('count', payload.count);
1001
+ params = params.append('skip', payload.skip);
1002
+ if (payload.name) {
1003
+ params = params.append('name', payload.name);
1004
+ }
1005
+ return this.baseHttpService.api({ url: `${this.serviceUrl}`, params });
1006
+ };
1007
+ this.searchProducts$ = (expression, skip, count) => {
1008
+ let params = new HttpParams();
1009
+ params = params.set('skip', '' + skip);
1010
+ params = params.set('count', '' + count);
1011
+ return this.baseHttpService.api({
1012
+ method: 'post',
1013
+ url: `${this.serviceUrl}/search`,
1014
+ params: params,
1015
+ body: expression,
1016
+ });
1017
+ };
1018
+ this.fetchProduct$ = (id) => this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
1019
+ this.createNewProduct$ = (productData) => {
1020
+ return this.baseHttpService.api({
1021
+ url: `${this.serviceUrl}`,
1022
+ method: 'post',
1023
+ body: productData,
1024
+ });
1025
+ };
1026
+ this.updateProduct$ = (body) => {
1027
+ return this.baseHttpService.api({
1028
+ url: `${this.serviceUrl}/${body.id}`,
1029
+ method: 'put',
1030
+ body,
1031
+ });
1032
+ };
1033
+ this.removeProduct$ = (id) => {
1034
+ return this.baseHttpService.api({
1035
+ url: `${this.serviceUrl}/${id}`,
1036
+ method: 'delete',
1037
+ });
1038
+ };
1039
+ this.restoreProduct$ = (id) => {
1040
+ return this.baseHttpService.api({
1041
+ url: `${this.serviceUrl}/${id}/restore`,
1042
+ method: 'patch',
1043
+ });
1044
+ };
1045
+ }
1046
+ attachImage$(productId, file) {
1047
+ const data = new FormData();
1048
+ data.append('image', file);
1049
+ return this.baseHttpService.upload({
1050
+ method: 'post',
1051
+ url: `${this.serviceUrl}/${productId}/image`,
1052
+ body: data,
1053
+ });
1054
+ }
1055
+ removeImage$(productId) {
1056
+ return this.baseHttpService.api({
1057
+ method: 'delete',
1058
+ url: `${this.serviceUrl}/${productId}/image`,
1059
+ });
1060
+ }
1061
+ fetchImage$(productId) {
1062
+ return this.baseHttpService.api({
1063
+ url: this.getImageUrl(productId),
1064
+ method: 'get',
1065
+ responseType: 'blob',
1066
+ errorHandler: noop,
1067
+ });
1068
+ }
1069
+ getImageUrl(productId) {
1070
+ return `${this.serviceUrl}/${productId}/image`;
1071
+ }
1072
+ }
1073
+ ProductsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1074
+ ProductsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductsAdminApiService });
1075
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductsAdminApiService, decorators: [{
1076
+ type: Injectable
1077
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1078
+
1079
+ class SalesTransactionApiService {
1080
+ constructor(httpService) {
1081
+ this.httpService = httpService;
1082
+ this.SERVICE_URL = '/v2/transactions';
1083
+ }
1084
+ /**
1085
+ * This endpoint doesn't include orders and assets
1086
+ * @param objectId SF record ID (quoteId | accountId | opportunityId | orderId etc)
1087
+ * @param params Query params
1088
+ * @param options Request options
1089
+ */
1090
+ getState(objectId, params, options) {
1091
+ return this.httpService.api(Object.assign({ method: 'get', url: `${this.SERVICE_URL}/${objectId}`, params: params }, options));
1092
+ }
1093
+ upsert(request, options) {
1094
+ return of({
1095
+ id: 'ID',
1096
+ });
1097
+ // return this.httpService.api({
1098
+ // method: 'post',
1099
+ // url: `${this.SERVICE_URL}`,
1100
+ // body: request,
1101
+ // ...options,
1102
+ // });
1103
+ }
1104
+ submit(request, options) {
1105
+ return of({
1106
+ id: 'ID',
1107
+ });
1108
+ // return this.httpService.api({
1109
+ // method: 'post',
1110
+ // url: `${this.SERVICE_URL}`,
1111
+ // body: request,
1112
+ // ...options,
1113
+ // });
1114
+ }
1115
+ }
1116
+ SalesTransactionApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesTransactionApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1117
+ SalesTransactionApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesTransactionApiService });
1118
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesTransactionApiService, decorators: [{
1119
+ type: Injectable
1120
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1121
+
1122
+ class ScriptsAdminApiService {
1123
+ constructor(baseHttpService) {
1124
+ this.baseHttpService = baseHttpService;
1125
+ this.serviceUrl = '/admin/v2/functions/scripts';
1126
+ this.fetchScripts$ = () => {
1127
+ return this.baseHttpService.api({ url: `${this.serviceUrl}` });
1128
+ };
1129
+ this.searchScripts$ = (expression, skip, count) => {
1130
+ let params = new HttpParams();
1131
+ if (typeof skip === 'number') {
1132
+ params = params.set('skip', '' + skip);
1133
+ }
1134
+ if (typeof count === 'number') {
1135
+ params = params.set('count', '' + count);
1136
+ }
1137
+ return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
1138
+ };
1139
+ this.fetchScript$ = (id) => {
1140
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
1141
+ };
1142
+ this.createScript$ = (script) => {
1143
+ return this.baseHttpService.api({
1144
+ url: `${this.serviceUrl}`,
1145
+ method: 'post',
1146
+ body: script,
1147
+ });
1148
+ };
1149
+ this.updateScriptMeta$ = (script) => {
1150
+ return this.baseHttpService.api({
1151
+ url: `${this.serviceUrl}/${script.id}`,
1152
+ method: 'put',
1153
+ body: script,
1154
+ });
1155
+ };
1156
+ this.updateScriptDetails$ = (script) => {
1157
+ return this.baseHttpService.api({
1158
+ url: `${this.serviceUrl}/${script.id}`,
1159
+ method: 'put',
1160
+ body: script,
1161
+ });
1162
+ };
1163
+ this.cloneScript$ = (cloneRequest) => {
1164
+ return this.baseHttpService
1165
+ .api({
1166
+ url: `${this.serviceUrl}/${cloneRequest.id}/clone`,
1167
+ method: 'post',
1168
+ body: cloneRequest,
1169
+ })
1170
+ .pipe(map(response => response.clonedRecordId));
1171
+ };
1172
+ this.removeScript$ = (id) => {
1173
+ return this.baseHttpService.api({
1174
+ url: `${this.serviceUrl}/${id}`,
1175
+ method: 'delete',
1176
+ });
1177
+ };
1178
+ this.restoreScript$ = (id) => {
1179
+ return this.baseHttpService.api({
1180
+ url: `${this.serviceUrl}/${id}/restore`,
1181
+ method: 'patch',
1182
+ });
1183
+ };
1184
+ this.execute$ = (body) => {
1185
+ return this.baseHttpService.api({
1186
+ url: `${this.serviceUrl}/execute`,
1187
+ method: 'post',
1188
+ body,
1189
+ errorHandler: () => null,
1190
+ });
1191
+ };
1192
+ }
1193
+ }
1194
+ ScriptsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1195
+ ScriptsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsAdminApiService });
1196
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsAdminApiService, decorators: [{
1197
+ type: Injectable
1198
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1199
+
1200
+ class ShoppingCartSettingsApiService {
1201
+ constructor(configurationSettingsApiService) {
1202
+ this.configurationSettingsApiService = configurationSettingsApiService;
1203
+ this.shoppingCartSettingsKey = 'shopping-cart';
1204
+ }
1205
+ getSetting(id) {
1206
+ return this.fetchSettings().pipe(map((settings) => parseJsonSafely(settings === null || settings === void 0 ? void 0 : settings.value, [])), map(settings => settings.find(setting => setting.id == id)));
1207
+ }
1208
+ fetchSettings() {
1209
+ return this.configurationSettingsApiService.fetchSetting(this.shoppingCartSettingsKey, { skipErrorHandler: true });
1210
+ }
1211
+ getSettingsMap() {
1212
+ return this.fetchSettings().pipe(map((settings) => parseJsonSafely(settings === null || settings === void 0 ? void 0 : settings.value, [])), map((settings) => settings.reduce((acc, setting) => {
1213
+ return Object.assign(Object.assign({}, acc), { [setting.id]: setting.properties });
1214
+ }, {})));
1215
+ }
1216
+ }
1217
+ ShoppingCartSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1218
+ ShoppingCartSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService });
1219
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService, decorators: [{
1220
+ type: Injectable
1221
+ }], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
1222
+
1223
+ function uiDefinitionFromDTO(container) {
1224
+ const { sourceBlob } = container, rest = __rest(container, ["sourceBlob"]);
1225
+ return Object.assign(Object.assign({}, rest), { source: parseJsonStringAsObject(sourceBlob) });
1226
+ }
1227
+ function uiDefinitionToDTO(container) {
1228
+ const { source } = container, rest = __rest(container, ["source"]);
1229
+ return Object.assign(Object.assign({}, rest), { sourceBlob: JSON.stringify(source) });
1230
+ }
1231
+ function newUiDefinitionToDTO(container) {
1232
+ const { source } = container, rest = __rest(container, ["source"]);
1233
+ return Object.assign(Object.assign({}, rest), { sourceBlob: JSON.stringify(source) });
1234
+ }
1235
+
1236
+ class UIDefinitionsAdminApiService {
1237
+ constructor(baseHttpService) {
1238
+ this.baseHttpService = baseHttpService;
1239
+ this.serviceUrl = '/admin/v2/uidefinitions';
1240
+ }
1241
+ fetchAll$(params) {
1242
+ let httpParams = new HttpParams();
1243
+ if ((params === null || params === void 0 ? void 0 : params.productId) != null) {
1244
+ httpParams = httpParams.set('productId', params.productId);
1245
+ }
1246
+ if ((params === null || params === void 0 ? void 0 : params.defaultUIDefinitionId) != null) {
1247
+ httpParams = httpParams.set('defaultUIDefinitionId', params.defaultUIDefinitionId);
1248
+ }
1249
+ return this.baseHttpService
1250
+ .api({
1251
+ method: 'get',
1252
+ url: this.serviceUrl,
1253
+ params: httpParams,
1254
+ })
1255
+ .pipe(map$1(containers => containers.map(uiDefinitionFromDTO)));
1256
+ }
1257
+ fetch$(id) {
1258
+ return this.baseHttpService
1259
+ .api({
1260
+ method: 'get',
1261
+ url: `${this.serviceUrl}/${id}`,
1262
+ })
1263
+ .pipe(map$1(container => uiDefinitionFromDTO(Object.assign(Object.assign({}, container), { id }))));
1264
+ }
1265
+ create$(uiDefinitionContainer) {
1266
+ const dto = newUiDefinitionToDTO(uiDefinitionContainer);
1267
+ return this.baseHttpService
1268
+ .api({
1269
+ method: 'post',
1270
+ url: this.serviceUrl,
1271
+ body: dto,
1272
+ })
1273
+ .pipe(map$1(container => uiDefinitionFromDTO(container)));
1274
+ }
1275
+ update$(uiDefinitionContainer) {
1276
+ const dto = uiDefinitionToDTO(uiDefinitionContainer);
1277
+ return this.baseHttpService
1278
+ .api({
1279
+ method: 'put',
1280
+ url: `${this.serviceUrl}/${uiDefinitionContainer.id}`,
1281
+ body: dto,
1282
+ })
1283
+ .pipe(map$1(container => uiDefinitionFromDTO(container)));
1284
+ }
1285
+ delete$(id) {
1286
+ return this.baseHttpService.api({
1287
+ method: 'delete',
1288
+ url: `${this.serviceUrl}/${id}`,
1289
+ });
1290
+ }
1291
+ }
1292
+ UIDefinitionsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1293
+ UIDefinitionsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsAdminApiService });
1294
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsAdminApiService, decorators: [{
1295
+ type: Injectable
1296
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1297
+
1298
+ const fromUIComponentStoryDTO = (dto, attachments) => {
1299
+ return {
1300
+ id: dto.id,
1301
+ name: dto.name,
1302
+ uiComponentId: dto.uiComponentId,
1303
+ description: dto.description,
1304
+ section: attachments.json,
1305
+ template: attachments.html,
1306
+ script: attachments.js,
1307
+ styles: attachments.css,
1308
+ };
1309
+ };
1310
+
1311
+ class UITemplatesAdminApiService {
1312
+ constructor(baseHttpService) {
1313
+ this.baseHttpService = baseHttpService;
1314
+ this.serviceUrl = '/admin/v2/uitemplates';
1315
+ this.fetchTemplates$ = (name) => {
1316
+ let params = new HttpParams();
1317
+ if (name) {
1318
+ params = params.append('name', name);
1319
+ }
1320
+ return this.baseHttpService.api({ url: `${this.serviceUrl}`, params });
1321
+ };
1322
+ this.createTemplate$ = (template) => {
1323
+ return this.baseHttpService.api({
1324
+ method: 'post',
1325
+ url: `${this.serviceUrl}`,
1326
+ body: template,
1327
+ });
1328
+ };
1329
+ this.updateTemplate$ = (template) => {
1330
+ return this.baseHttpService.api({
1331
+ method: 'put',
1332
+ url: `${this.serviceUrl}/${template.id}`,
1333
+ body: template,
1334
+ });
1335
+ };
1336
+ this.duplicateTemplate$ = (template, cloneRequest) => {
1337
+ return this.baseHttpService
1338
+ .api({
1339
+ url: `${this.serviceUrl}/${template.id}/clone`,
1340
+ method: 'post',
1341
+ body: cloneRequest,
1342
+ })
1343
+ .pipe(map$1(response => response.clonedRecordId));
1344
+ };
1345
+ this.removeTemplate$ = (id) => {
1346
+ return this.baseHttpService.api({
1347
+ method: 'delete',
1348
+ url: `${this.serviceUrl}/${id}`,
1349
+ });
1350
+ };
1351
+ this.restoreTemplate$ = (id) => {
1352
+ return this.baseHttpService.api({
1353
+ method: 'patch',
1354
+ url: `${this.serviceUrl}/${id}`,
1355
+ });
1356
+ };
1357
+ this.searchTemplates$ = (data) => {
1358
+ return this.baseHttpService.api({
1359
+ method: 'post',
1360
+ url: `${this.serviceUrl}/search`,
1361
+ params: data.params,
1362
+ body: data.expression,
1363
+ });
1364
+ };
1365
+ this.fetchComponents$ = (templateId, name) => {
1366
+ let params = new HttpParams();
1367
+ if (name) {
1368
+ params = params.append('name', name);
1369
+ }
1370
+ return this.baseHttpService.api({
1371
+ url: `${this.serviceUrl}/${templateId}/components`,
1372
+ params,
1373
+ });
1374
+ };
1375
+ this.fetchComponent$ = (templateId, componentId) => {
1376
+ return this.baseHttpService.api({
1377
+ url: `${this.serviceUrl}/${templateId}/components/${componentId}`,
1378
+ });
1379
+ };
1380
+ this.createComponent$ = (component) => {
1381
+ return this.baseHttpService.api({
1382
+ method: 'post',
1383
+ url: `${this.serviceUrl}/${component.uiTemplateId}/components`,
1384
+ body: component,
1385
+ });
1386
+ };
1387
+ this.updateComponent$ = (component) => {
1388
+ return this.baseHttpService.api({
1389
+ method: 'put',
1390
+ url: `${this.serviceUrl}/${component.uiTemplateId}/components/${component.id}`,
1391
+ body: component,
1392
+ });
1393
+ };
1394
+ this.duplicateComponent$ = (component, cloneRequest) => {
1395
+ return this.baseHttpService
1396
+ .api({
1397
+ url: `${this.serviceUrl}/${component.uiTemplateId}/components/${component.id}/clone`,
1398
+ method: 'post',
1399
+ body: cloneRequest,
1400
+ })
1401
+ .pipe(map$1(response => response.clonedRecordId));
1402
+ };
1403
+ this.removeComponent$ = (templateId, componentId) => {
1404
+ return this.baseHttpService.api({
1405
+ method: 'delete',
1406
+ url: `${this.serviceUrl}/${templateId}/components/${componentId}`,
1407
+ });
1408
+ };
1409
+ this.restoreComponent$ = (templateId, componentId) => {
1410
+ return this.baseHttpService.api({
1411
+ method: 'patch',
1412
+ url: `${this.serviceUrl}/${templateId}/components/${componentId}`,
1413
+ });
1414
+ };
1415
+ this.searchComponents$ = (templateId, data) => {
1416
+ return this.baseHttpService.api({
1417
+ method: 'post',
1418
+ url: `${this.serviceUrl}/${templateId}/components/search`,
1419
+ params: data.params,
1420
+ body: data.expression,
1421
+ });
1422
+ };
1423
+ this.fetchStoryAttachment = (templateId, componentId, storyId, type) => {
1424
+ return this.baseHttpService
1425
+ .api({
1426
+ url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories/${storyId}/attachments/${type}/file`,
1427
+ responseType: 'text',
1428
+ errorHandler: noop,
1429
+ })
1430
+ .pipe(catchError$1(() => of('')));
1431
+ };
1432
+ this.convertToComponentStory$ = (templateId, componentId, storyDto) => {
1433
+ return forkJoin([
1434
+ this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'html'),
1435
+ this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'js'),
1436
+ this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'css'),
1437
+ this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'json'),
1438
+ ]).pipe(map$1(([html, js, css, json]) => ({ html, js, css, json })), map$1(attachments => fromUIComponentStoryDTO(storyDto, attachments)));
1439
+ };
1440
+ this.fetchStories$ = (templateId, componentId, name) => {
1441
+ let params = new HttpParams();
1442
+ if (name) {
1443
+ params = params.append('name', name);
1444
+ }
1445
+ return this.baseHttpService
1446
+ .api({
1447
+ url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories`,
1448
+ params,
1449
+ })
1450
+ .pipe(switchMap(dtos => {
1451
+ if (!dtos.length) {
1452
+ return of([]);
1453
+ }
1454
+ return forkJoin(dtos.map(dto => this.convertToComponentStory$(templateId, componentId, dto)));
1455
+ }));
1456
+ };
1457
+ this.fetchStory$ = (templateId, componentId, storyId) => {
1458
+ return this.baseHttpService
1459
+ .api({
1460
+ url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories/${storyId}`,
1461
+ })
1462
+ .pipe(switchMap(dto => this.convertToComponentStory$(templateId, componentId, dto)));
1463
+ };
1464
+ this.createComponentStory$ = (templateId, story) => {
1465
+ return this.baseHttpService.api({
1466
+ method: 'post',
1467
+ url: `${this.serviceUrl}/${templateId}/components/${story.uiComponentId}/stories`,
1468
+ body: story,
1469
+ });
1470
+ };
1471
+ this.updateComponentStory$ = (templateId, story) => {
1472
+ const { script, template, styles, section } = story, rest = __rest(story, ["script", "template", "styles", "section"]);
1473
+ return this.baseHttpService
1474
+ .api({
1475
+ method: 'put',
1476
+ url: `${this.serviceUrl}/${templateId}/components/${story.uiComponentId}/stories/${story.id}`,
1477
+ body: rest,
1478
+ })
1479
+ .pipe(map$1(dto => fromUIComponentStoryDTO(dto, { html: template, js: script, css: styles, json: section })));
1480
+ };
1481
+ this.duplicateComponentStory$ = (story, cloneRequest) => {
1482
+ return this.baseHttpService
1483
+ .api({
1484
+ url: `${this.serviceUrl}/${story.template}/components/${story.uiComponentId}/stories/${story.id}/clone`,
1485
+ method: 'post',
1486
+ body: cloneRequest,
1487
+ })
1488
+ .pipe(map$1(response => response.clonedRecordId));
1489
+ };
1490
+ this.deleteComponentStory$ = (templateId, componentId, storyId) => {
1491
+ return this.baseHttpService.api({
1492
+ method: 'delete',
1493
+ url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories/${storyId}`,
1494
+ });
1495
+ };
1496
+ this.restoreComponentStory$ = (templateId, componentId, storyId) => {
1497
+ return this.baseHttpService.api({
1498
+ method: 'patch',
1499
+ url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories/${storyId}`,
1500
+ });
1501
+ };
1502
+ this.uploadStoryAttachments$ = (templateId, componentId, storyId, attachments) => {
1503
+ const formData = new FormData();
1504
+ if (attachments.html != null) {
1505
+ formData.append('html', new Blob([attachments.html]), 'story-template.html');
1506
+ }
1507
+ if (attachments.css != null) {
1508
+ formData.append('css', new Blob([attachments.css]), 'story-styles.css');
1509
+ }
1510
+ if (attachments.js != null) {
1511
+ formData.append('js', new Blob([attachments.js]), 'story-script.js');
1512
+ }
1513
+ if (attachments.json != null) {
1514
+ formData.append('json', new Blob([attachments.json]), 'story-section.json');
1515
+ }
1516
+ return this.baseHttpService.upload({
1517
+ method: 'post',
1518
+ url: `${this.serviceUrl}/${templateId}/components/${componentId}/stories/${storyId}/attachments`,
1519
+ body: formData,
1520
+ });
1521
+ };
1522
+ this.fetchComponentAttachments$ = (templateId, component) => {
1523
+ return forkJoin([
1524
+ this.fetchComponentAttachmentFile$(templateId, component.id, 'html'),
1525
+ this.fetchComponentAttachmentFile$(templateId, component.id, 'js'),
1526
+ this.fetchComponentAttachmentFile$(templateId, component.id, 'css'),
1527
+ this.fetchComponentAttachmentFile$(templateId, component.id, 'json'),
1528
+ ]).pipe(map$1(([html, js, css, json]) => ({ html, js, css, json })));
1529
+ };
1530
+ this.fetchComponentsAttachments$ = (templateId) => {
1531
+ return this.fetchComponents$(templateId).pipe(switchMap(components => {
1532
+ return forkJoin(components.map(component => this.fetchComponentAttachments$(templateId, component)));
1533
+ }));
1534
+ };
1535
+ this.fetchComponentAttachmentFile$ = (templateId, componentId, attachmentType) => {
1536
+ return this.baseHttpService
1537
+ .api({
1538
+ method: 'get',
1539
+ url: `${this.serviceUrl}/${templateId}/components/${componentId}/attachments/${attachmentType}/file`,
1540
+ responseType: 'text',
1541
+ errorHandler: noop,
1542
+ })
1543
+ .pipe(catchError$1(() => of('')));
1544
+ };
1545
+ this.uploadComponentAttachments$ = (templateId, componentId, attachments) => {
1546
+ const formData = new FormData();
1547
+ if (attachments.html != null) {
1548
+ formData.append('html', new Blob([attachments.html]), 'template.html');
1549
+ }
1550
+ if (attachments.css != null) {
1551
+ formData.append('css', new Blob([attachments.css]), 'styles.css');
1552
+ }
1553
+ if (attachments.js != null) {
1554
+ formData.append('js', new Blob([attachments.js]), 'script.js');
1555
+ }
1556
+ if (attachments.json != null) {
1557
+ formData.append('json', new Blob([attachments.json]), 'section.json');
1558
+ }
1559
+ return this.baseHttpService.upload({
1560
+ method: 'post',
1561
+ url: `${this.serviceUrl}/${templateId}/components/${componentId}/attachments`,
1562
+ body: formData,
1563
+ });
1564
+ };
1565
+ }
1566
+ getTemplateThumbnailUrl(templateId) {
1567
+ return `${this.serviceUrl}/${templateId}/thumbnail/file`;
1568
+ }
1569
+ attachTemplateThumbnail$(templateId, file) {
1570
+ const data = new FormData();
1571
+ data.append('thumb', file);
1572
+ return this.baseHttpService.upload({
1573
+ method: 'post',
1574
+ url: `${this.serviceUrl}/${templateId}/thumbnail`,
1575
+ body: data,
1576
+ });
1577
+ }
1578
+ removeTemplateThumbnail$(templateId) {
1579
+ return this.baseHttpService.api({
1580
+ method: 'delete',
1581
+ url: `${this.serviceUrl}/${templateId}/thumbnail`,
1582
+ });
1583
+ }
1584
+ }
1585
+ UITemplatesAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1586
+ UITemplatesAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesAdminApiService });
1587
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesAdminApiService, decorators: [{
1588
+ type: Injectable
1589
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1590
+
1591
+ class VeloceObjectsAdminApiService {
1592
+ constructor(baseHttpService) {
1593
+ this.baseHttpService = baseHttpService;
1594
+ this.serviceUrl = '/admin/v2/veloceobjects';
1595
+ this.updateCategory$ = (category) => {
1596
+ return this.baseHttpService.api({
1597
+ method: 'put',
1598
+ url: `${this.serviceUrl}/categories/${category.id}`,
1599
+ body: category,
1600
+ });
1601
+ };
1602
+ this.deleteCategory$ = (id) => {
1603
+ return this.baseHttpService.api({
1604
+ method: 'delete',
1605
+ url: `${this.serviceUrl}/categories/${id}`,
1606
+ });
1607
+ };
1608
+ this.searchObjects$ = (searchParams, expression) => {
1609
+ const params = new HttpParams({ fromObject: Object.assign({}, searchParams) });
1610
+ return this.baseHttpService.api({
1611
+ method: 'post',
1612
+ url: `${this.serviceUrl}/search`,
1613
+ params,
1614
+ body: expression || {},
1615
+ });
1616
+ };
1617
+ this.deleteObject$ = (id) => {
1618
+ return this.baseHttpService.api({
1619
+ method: 'delete',
1620
+ url: `${this.serviceUrl}/${id}`,
1621
+ });
1622
+ };
1623
+ this.duplicateObject$ = (body) => {
1624
+ return this.baseHttpService
1625
+ .api({
1626
+ method: 'post',
1627
+ url: `${this.serviceUrl}/${body.id}/clone`,
1628
+ body,
1629
+ })
1630
+ .pipe(map(response => response.clonedRecordId));
1631
+ };
1632
+ this.restoreObject$ = (id) => {
1633
+ return this.baseHttpService.api({
1634
+ method: 'patch',
1635
+ url: `${this.serviceUrl}/${id}/restore`,
1636
+ });
1637
+ };
1638
+ }
1639
+ fetchCategories$() {
1640
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/categories` });
1641
+ }
1642
+ createCategory$(category) {
1643
+ return this.baseHttpService.api({
1644
+ method: 'post',
1645
+ url: `${this.serviceUrl}/categories`,
1646
+ body: category,
1647
+ });
1648
+ }
1649
+ fetchObjects$() {
1650
+ return this.baseHttpService.api({ url: `${this.serviceUrl}` });
1651
+ }
1652
+ fetchObject$(id) {
1653
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
1654
+ }
1655
+ createObject$(object) {
1656
+ return this.baseHttpService.api({
1657
+ method: 'post',
1658
+ url: `${this.serviceUrl}`,
1659
+ body: object,
1660
+ });
1661
+ }
1662
+ updateObject$(object) {
1663
+ return this.baseHttpService.api({
1664
+ method: 'put',
1665
+ url: `${this.serviceUrl}/${object.id}`,
1666
+ body: object,
1667
+ });
1668
+ }
1669
+ }
1670
+ VeloceObjectsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1671
+ VeloceObjectsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsAdminApiService });
1672
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsAdminApiService, decorators: [{
1673
+ type: Injectable
1674
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1675
+
1676
+ class ApiV2Module {
1677
+ }
1678
+ ApiV2Module.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiV2Module, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1679
+ ApiV2Module.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ApiV2Module, imports: [HttpClientModule] });
1680
+ ApiV2Module.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiV2Module, providers: [
1681
+ BaseHttpService,
1682
+ CacheApiService,
1683
+ CatalogAdminApiService,
1684
+ CatalogApiService,
1685
+ ConfigurationProcessorsApiService,
1686
+ ConfigurationSettingsApiService,
1687
+ ContextDefinitionAdminApiService,
1688
+ DocumentAttachmentApiService,
1689
+ EndpointsAdminApiService,
1690
+ FlowsApiService,
1691
+ FunctionGroupsAdminApiService,
1692
+ OrchestrationsAdminApiService,
1693
+ OrchestrationsApiService,
1694
+ PCMApiService,
1695
+ PicklistsAdminApiService,
1696
+ ProductsAdminApiService,
1697
+ FunctionsAdminApiService,
1698
+ SalesforceApiService,
1699
+ SalesTransactionApiService,
1700
+ ShoppingCartSettingsApiService,
1701
+ ScriptsAdminApiService,
1702
+ UIDefinitionsAdminApiService,
1703
+ UITemplatesAdminApiService,
1704
+ VeloceObjectsAdminApiService,
1705
+ XrayService,
1706
+ ], imports: [HttpClientModule] });
1707
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiV2Module, decorators: [{
1708
+ type: NgModule,
1709
+ args: [{
1710
+ imports: [HttpClientModule],
1711
+ providers: [
1712
+ BaseHttpService,
1713
+ CacheApiService,
1714
+ CatalogAdminApiService,
1715
+ CatalogApiService,
1716
+ ConfigurationProcessorsApiService,
1717
+ ConfigurationSettingsApiService,
1718
+ ContextDefinitionAdminApiService,
1719
+ DocumentAttachmentApiService,
1720
+ EndpointsAdminApiService,
1721
+ FlowsApiService,
1722
+ FunctionGroupsAdminApiService,
1723
+ OrchestrationsAdminApiService,
1724
+ OrchestrationsApiService,
1725
+ PCMApiService,
1726
+ PicklistsAdminApiService,
1727
+ ProductsAdminApiService,
1728
+ FunctionsAdminApiService,
1729
+ SalesforceApiService,
1730
+ SalesTransactionApiService,
1731
+ ShoppingCartSettingsApiService,
1732
+ ScriptsAdminApiService,
1733
+ UIDefinitionsAdminApiService,
1734
+ UITemplatesAdminApiService,
1735
+ VeloceObjectsAdminApiService,
1736
+ XrayService,
1737
+ ],
1738
+ }]
1739
+ }] });
1740
+
1741
+ /**
1742
+ * Generated bundle index. Do not edit.
1743
+ */
1744
+
1745
+ export { ApiV2Module, CacheApiService, CatalogAdminApiService, CatalogApiService, ConfigurationProcessorsApiService, ConfigurationSettingsApiService, ContextDefinitionAdminApiService, DocumentAttachmentApiService, EndpointsAdminApiService, FlowsApiService, FunctionGroupsAdminApiService, FunctionsAdminApiService, OrchestrationsAdminApiService, OrchestrationsApiService, PCMApiService, PicklistsAdminApiService, ProductsAdminApiService, SalesTransactionApiService, SalesforceApiService, ScriptsAdminApiService, ShoppingCartSettingsApiService, UIDefinitionsAdminApiService, UITemplatesAdminApiService, VeloceObjectsAdminApiService };
1746
+ //# sourceMappingURL=veloceapps-api-v2.mjs.map