@veloceapps/api 11.0.0-6 → 11.0.0-61

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