@veloceapps/api 7.0.0-9 → 7.0.1-0

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 (73) hide show
  1. package/{esm2015/lib/api.module.js → esm2020/lib/api.module.mjs} +6 -6
  2. package/esm2020/lib/services/account-api.service.mjs +80 -0
  3. package/esm2020/lib/services/catalog-admin-api.service.mjs +165 -0
  4. package/{esm2015/lib/services/catalog-api.service.js → esm2020/lib/services/catalog-api.service.mjs} +4 -4
  5. package/esm2020/lib/services/configuration-api.service.mjs +78 -0
  6. package/esm2020/lib/services/configuration-settings-api.service.mjs +96 -0
  7. package/{esm2015/lib/services/context-api.service.js → esm2020/lib/services/context-api.service.mjs} +4 -4
  8. package/{esm2015/lib/services/delta-api.service.js → esm2020/lib/services/delta-api.service.mjs} +4 -4
  9. package/{esm2015/lib/services/document-attachment-api.service.js → esm2020/lib/services/document-attachment-api.service.mjs} +4 -4
  10. package/esm2020/lib/services/document-templates-api.service.mjs +298 -0
  11. package/{esm2015/lib/services/endpoints-api.service.js → esm2020/lib/services/endpoints-api.service.mjs} +4 -4
  12. package/esm2020/lib/services/flows-api.service.mjs +24 -0
  13. package/esm2020/lib/services/guided-sellings-admin-api.service.mjs +65 -0
  14. package/esm2020/lib/services/guided-sellings-api.service.mjs +27 -0
  15. package/{esm2015/lib/services/offers-api.service.js → esm2020/lib/services/offers-api.service.mjs} +4 -4
  16. package/esm2020/lib/services/org-info-api.service.mjs +19 -0
  17. package/{esm2015/lib/services/picklists-api.service.js → esm2020/lib/services/picklists-api.service.mjs} +8 -5
  18. package/{esm2015/lib/services/price-api.service.js → esm2020/lib/services/price-api.service.mjs} +4 -4
  19. package/{esm2015/lib/services/procedures-api.service.js → esm2020/lib/services/procedures-api.service.mjs} +4 -4
  20. package/{esm2015/lib/services/product-api.service.js → esm2020/lib/services/product-api.service.mjs} +4 -4
  21. package/esm2020/lib/services/product-model-api.service.mjs +232 -0
  22. package/esm2020/lib/services/quote-api.service.mjs +58 -0
  23. package/esm2020/lib/services/ramp-api.service.mjs +31 -0
  24. package/{esm2015/lib/services/rule-groups-api.service.js → esm2020/lib/services/rule-groups-api.service.mjs} +4 -4
  25. package/{esm2015/lib/services/rules-api.service.js → esm2020/lib/services/rules-api.service.mjs} +4 -4
  26. package/esm2020/lib/services/salesforce-api.service.mjs +61 -0
  27. package/{esm2015/lib/services/scripts-api.service.js → esm2020/lib/services/scripts-api.service.mjs} +4 -4
  28. package/esm2020/lib/services/shopping-cart-settings-api.service.mjs +28 -0
  29. package/esm2020/lib/services/ui-templates-api.service.mjs +281 -0
  30. package/esm2020/lib/types/dto/configuration-settings-dto.types.mjs +22 -0
  31. package/fesm2015/{veloceapps-api.js → veloceapps-api.mjs} +100 -101
  32. package/fesm2015/veloceapps-api.mjs.map +1 -0
  33. package/fesm2020/veloceapps-api.mjs +2468 -0
  34. package/fesm2020/veloceapps-api.mjs.map +1 -0
  35. package/lib/services/catalog-admin-api.service.d.ts +2 -2
  36. package/lib/services/guided-sellings-admin-api.service.d.ts +2 -2
  37. package/lib/services/quote-api.service.d.ts +1 -1
  38. package/lib/services/ui-templates-api.service.d.ts +3 -3
  39. package/lib/types/dto/offers-dto.types.d.ts +2 -2
  40. package/lib/types/search-request.types.d.ts +1 -1
  41. package/package.json +26 -24
  42. package/bundles/veloceapps-api.umd.js +0 -2880
  43. package/bundles/veloceapps-api.umd.js.map +0 -1
  44. package/esm2015/lib/services/account-api.service.js +0 -50
  45. package/esm2015/lib/services/catalog-admin-api.service.js +0 -165
  46. package/esm2015/lib/services/configuration-api.service.js +0 -72
  47. package/esm2015/lib/services/configuration-settings-api.service.js +0 -61
  48. package/esm2015/lib/services/document-templates-api.service.js +0 -284
  49. package/esm2015/lib/services/flows-api.service.js +0 -24
  50. package/esm2015/lib/services/guided-sellings-admin-api.service.js +0 -65
  51. package/esm2015/lib/services/guided-sellings-api.service.js +0 -27
  52. package/esm2015/lib/services/org-info-api.service.js +0 -20
  53. package/esm2015/lib/services/product-model-api.service.js +0 -232
  54. package/esm2015/lib/services/quote-api.service.js +0 -48
  55. package/esm2015/lib/services/ramp-api.service.js +0 -21
  56. package/esm2015/lib/services/salesforce-api.service.js +0 -43
  57. package/esm2015/lib/services/shopping-cart-settings-api.service.js +0 -28
  58. package/esm2015/lib/services/ui-templates-api.service.js +0 -282
  59. package/esm2015/lib/types/dto/configuration-settings-dto.types.js +0 -22
  60. package/fesm2015/veloceapps-api.js.map +0 -1
  61. package/veloceapps-api.d.ts +0 -5
  62. /package/{esm2015/index.js → esm2020/index.mjs} +0 -0
  63. /package/{esm2015/lib/types/clone-request.types.js → esm2020/lib/types/clone-request.types.mjs} +0 -0
  64. /package/{esm2015/lib/types/delta-request.types.js → esm2020/lib/types/delta-request.types.mjs} +0 -0
  65. /package/{esm2015/lib/types/dto/offers-dto.types.js → esm2020/lib/types/dto/offers-dto.types.mjs} +0 -0
  66. /package/{esm2015/lib/types/dto/ui-template-dto.types.js → esm2020/lib/types/dto/ui-template-dto.types.mjs} +0 -0
  67. /package/{esm2015/lib/types/index.js → esm2020/lib/types/index.mjs} +0 -0
  68. /package/{esm2015/lib/types/org-info.types.js → esm2020/lib/types/org-info.types.mjs} +0 -0
  69. /package/{esm2015/lib/types/price.types.js → esm2020/lib/types/price.types.mjs} +0 -0
  70. /package/{esm2015/lib/types/ramp-request.types.js → esm2020/lib/types/ramp-request.types.mjs} +0 -0
  71. /package/{esm2015/lib/types/search-request.types.js → esm2020/lib/types/search-request.types.mjs} +0 -0
  72. /package/{esm2015/lib/utils/ui-template.utils.js → esm2020/lib/utils/ui-template.utils.mjs} +0 -0
  73. /package/{esm2015/veloceapps-api.js → esm2020/veloceapps-api.mjs} +0 -0
@@ -1,2880 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common/http'), require('@angular/core'), require('@veloceapps/core'), require('rxjs'), require('rxjs/operators'), require('primeng/api'), require('@angular/common'), require('lodash'), require('moment')) :
3
- typeof define === 'function' && define.amd ? define('@veloceapps/api', ['exports', '@angular/common/http', '@angular/core', '@veloceapps/core', 'rxjs', 'rxjs/operators', 'primeng/api', '@angular/common', 'lodash', 'moment'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.veloceapps = global.veloceapps || {}, global.veloceapps.api = {}), global.ng.common.http, global.ng.core, global["@veloceapps/core"], global.rxjs, global.rxjs.operators, global.i2, global.ng.common, global.lodash, global.moment));
5
- })(this, (function (exports, i4, i0, i1, rxjs, operators, i2, common, _, moment_) { 'use strict';
6
-
7
- function _interopNamespace(e) {
8
- if (e && e.__esModule) return e;
9
- var n = Object.create(null);
10
- if (e) {
11
- Object.keys(e).forEach(function (k) {
12
- if (k !== 'default') {
13
- var d = Object.getOwnPropertyDescriptor(e, k);
14
- Object.defineProperty(n, k, d.get ? d : {
15
- enumerable: true,
16
- get: function () { return e[k]; }
17
- });
18
- }
19
- });
20
- }
21
- n["default"] = e;
22
- return Object.freeze(n);
23
- }
24
-
25
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
26
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
27
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
28
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
29
- var ___namespace = /*#__PURE__*/_interopNamespace(_);
30
- var moment___namespace = /*#__PURE__*/_interopNamespace(moment_);
31
-
32
- var AccountApiService = /** @class */ (function () {
33
- function AccountApiService(httpService) {
34
- this.httpService = httpService;
35
- this.SERVICE_URL = '/accounts';
36
- }
37
- AccountApiService.prototype.getAccounts$ = function (options) {
38
- return this.httpService.api(Object.assign({ method: 'get', url: "" + this.SERVICE_URL }, options));
39
- };
40
- AccountApiService.prototype.searchAccounts$ = function (searchParams, options) {
41
- var params = new i4.HttpParams({ fromObject: searchParams });
42
- return this.httpService.api(Object.assign({ url: "" + this.SERVICE_URL, params: params }, options));
43
- };
44
- AccountApiService.prototype.getAccount$ = function (id, options) {
45
- return this.httpService.api(Object.assign({ url: this.SERVICE_URL + "/" + id }, options));
46
- };
47
- AccountApiService.prototype.getAssets = function (accountId, options) {
48
- return this.httpService.api(Object.assign({ url: this.SERVICE_URL + "/" + accountId + "/assets" }, options));
49
- };
50
- AccountApiService.prototype.getOrders = function (accountId, options) {
51
- return this.httpService.api(Object.assign({ url: this.SERVICE_URL + "/" + accountId + "/orders" }, options));
52
- };
53
- AccountApiService.prototype.getQuotes = function (accountId, options) {
54
- return this.httpService.api(Object.assign({ url: this.SERVICE_URL + "/" + accountId + "/quotes" }, options));
55
- };
56
- AccountApiService.prototype.getAsset = function (accountId, assetId, options) {
57
- return this.httpService.api(Object.assign({ url: this.SERVICE_URL + "/" + accountId + "/assets/" + assetId }, options));
58
- };
59
- AccountApiService.prototype.getOrder = function (accountId, orderId, options) {
60
- return this.httpService.api(Object.assign({ url: this.SERVICE_URL + "/" + accountId + "/orders/" + orderId }, options));
61
- };
62
- AccountApiService.prototype.getQuote = function (accountId, quoteId, options) {
63
- return this.httpService.api(Object.assign({ url: this.SERVICE_URL + "/" + accountId + "/quotes/" + quoteId }, options));
64
- };
65
- AccountApiService.prototype.quoteToOrder = function (accountId, quoteId, options) {
66
- return this.httpService.api(Object.assign({ url: this.SERVICE_URL + "/" + accountId + "/quotes/" + quoteId + "/to-order", method: 'post', body: { id: quoteId } }, options));
67
- };
68
- AccountApiService.prototype.orderToAsset = function (accountId, orderId, options) {
69
- return this.httpService.api(Object.assign({ url: this.SERVICE_URL + "/" + accountId + "/orders/" + orderId + "/to-asset", method: 'post', body: { id: orderId } }, options));
70
- };
71
- return AccountApiService;
72
- }());
73
- AccountApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AccountApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
74
- AccountApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AccountApiService });
75
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AccountApiService, decorators: [{
76
- type: i0.Injectable
77
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
78
-
79
- var CatalogAdminApiService = /** @class */ (function () {
80
- function CatalogAdminApiService(baseHttpService) {
81
- var _this = this;
82
- this.baseHttpService = baseHttpService;
83
- this.serviceUrl = '/catalogs';
84
- this.fetchCatalogs$ = function (searchParams) {
85
- var params = new i4.HttpParams({ fromObject: Object.assign({}, searchParams) });
86
- return _this.baseHttpService.api({ url: "" + _this.serviceUrl, params: params });
87
- };
88
- this.searchCatalogs$ = function (searchParams, expression) {
89
- var params = new i4.HttpParams({ fromObject: Object.assign({}, searchParams) });
90
- return _this.baseHttpService.api({
91
- method: 'post',
92
- url: _this.serviceUrl + "/search",
93
- params: params,
94
- body: expression || {},
95
- });
96
- };
97
- this.fetchCategories$ = function (catalogId) {
98
- return _this.baseHttpService.api({ url: _this.serviceUrl + "/" + catalogId + "/categories" });
99
- };
100
- this.searchProducts$ = function (catalogId, categoryId) {
101
- return _this.baseHttpService.api({
102
- method: 'post',
103
- url: _this.serviceUrl + "/" + catalogId + "/categories/" + categoryId + "/products/search",
104
- body: {},
105
- });
106
- };
107
- this.fetchAttributes$ = function (catalogId, categoryId) {
108
- return _this.baseHttpService.api({ url: _this.serviceUrl + "/" + catalogId + "/categories/" + categoryId + "/attributes" });
109
- };
110
- this.createNewCatalog$ = function (catalogData) {
111
- return _this.baseHttpService.api({
112
- url: "" + _this.serviceUrl,
113
- method: 'post',
114
- body: catalogData,
115
- });
116
- };
117
- this.duplicateCatalog$ = function (cloneRequest) {
118
- return _this.baseHttpService.api({
119
- url: _this.serviceUrl + "/" + cloneRequest.id + "/clone",
120
- method: 'post',
121
- body: cloneRequest,
122
- });
123
- };
124
- this.updateCatalog$ = function (data) {
125
- return _this.baseHttpService.api({
126
- url: _this.serviceUrl + "/" + data.id,
127
- method: 'put',
128
- body: data,
129
- });
130
- };
131
- this.removeCatalog$ = function (id) {
132
- return _this.baseHttpService.api({
133
- url: _this.serviceUrl + "/" + id,
134
- method: 'delete',
135
- });
136
- };
137
- this.restoreCatalog$ = function (id) {
138
- return _this.baseHttpService.api({
139
- url: _this.serviceUrl + "/" + id + "/restore",
140
- method: 'patch',
141
- });
142
- };
143
- this.createNewCategory$ = function (categoryData) {
144
- return _this.baseHttpService.api({
145
- url: _this.serviceUrl + "/" + categoryData.catalogId + "/categories",
146
- method: 'post',
147
- body: categoryData,
148
- });
149
- };
150
- this.updateCategory$ = function (category) {
151
- return _this.baseHttpService.api({
152
- url: _this.serviceUrl + "/" + category.catalogId + "/categories/" + category.id,
153
- method: 'put',
154
- body: category,
155
- });
156
- };
157
- this.duplicateCategory$ = function (catalogId, cloneRequest) {
158
- return _this.baseHttpService.api({
159
- url: _this.serviceUrl + "/" + catalogId + "/categories/" + cloneRequest.id + "/clone",
160
- method: 'post',
161
- body: cloneRequest,
162
- });
163
- };
164
- this.removeCategory$ = function (id, catalogId) {
165
- return _this.baseHttpService.api({
166
- url: _this.serviceUrl + "/" + catalogId + "/categories/" + id,
167
- method: 'delete',
168
- });
169
- };
170
- this.restoreCategory$ = function (id, catalogId) {
171
- return _this.baseHttpService.api({
172
- url: _this.serviceUrl + "/" + catalogId + "/categories/" + id + "/restore",
173
- method: 'patch',
174
- });
175
- };
176
- this.removeAttribute$ = function (_a) {
177
- var catalogId = _a.catalogId, categoryId = _a.categoryId, data = _a.data;
178
- return _this.baseHttpService.api({
179
- method: 'delete',
180
- url: _this.serviceUrl + "/" + catalogId + "/categories/" + categoryId + "/attributes/" + data.id,
181
- body: data,
182
- });
183
- };
184
- this.restoreAttribute$ = function (_a) {
185
- var catalogId = _a.catalogId, categoryId = _a.categoryId, data = _a.data;
186
- return _this.baseHttpService.api({
187
- url: _this.serviceUrl + "/" + catalogId + "/categories/" + categoryId + "/attributes/" + data.id + "/restore",
188
- method: 'patch',
189
- });
190
- };
191
- this.createNewAttribute$ = function (_a) {
192
- var catalogId = _a.catalogId, categoryId = _a.categoryId, data = _a.data;
193
- return _this.baseHttpService.api({
194
- method: 'post',
195
- url: _this.serviceUrl + "/" + catalogId + "/categories/" + categoryId + "/attributes",
196
- body: data,
197
- });
198
- };
199
- this.updateAttribute$ = function (_a) {
200
- var catalogId = _a.catalogId, categoryId = _a.categoryId, data = _a.data;
201
- return _this.baseHttpService.api({
202
- method: 'put',
203
- url: _this.serviceUrl + "/" + catalogId + "/categories/" + categoryId + "/attributes/" + data.id,
204
- body: data,
205
- });
206
- };
207
- this.searchProductCandidates$ = function (catalogId, categoryId, expression, searchParams) {
208
- var params = new i4.HttpParams({ fromObject: Object.assign({}, searchParams) });
209
- return _this.baseHttpService.api({
210
- method: 'post',
211
- url: _this.serviceUrl + "/" + catalogId + "/categories/" + categoryId + "/candidates/search",
212
- params: params,
213
- body: expression,
214
- });
215
- };
216
- this.addProduct$ = function (product, catalogId, categoryId) {
217
- return _this.baseHttpService.api({
218
- method: 'post',
219
- url: _this.serviceUrl + "/" + catalogId + "/categories/" + categoryId + "/products",
220
- body: product,
221
- });
222
- };
223
- this.updateProduct$ = function (product, catalogId, categoryId) {
224
- return _this.baseHttpService.api({
225
- method: 'put',
226
- url: _this.serviceUrl + "/" + catalogId + "/categories/" + categoryId + "/products/" + product.id,
227
- body: product,
228
- });
229
- };
230
- this.removeProduct$ = function (_a) {
231
- var catalogId = _a.catalogId, categoryId = _a.categoryId, data = _a.data;
232
- return _this.baseHttpService.api({
233
- method: 'delete',
234
- url: _this.serviceUrl + "/" + catalogId + "/categories/" + categoryId + "/products/" + data.id,
235
- });
236
- };
237
- }
238
- return CatalogAdminApiService;
239
- }());
240
- CatalogAdminApiService.MAX_RESULTS = 60;
241
- CatalogAdminApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CatalogAdminApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
242
- CatalogAdminApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CatalogAdminApiService });
243
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CatalogAdminApiService, decorators: [{
244
- type: i0.Injectable
245
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
246
-
247
- var CatalogApiService = /** @class */ (function () {
248
- function CatalogApiService(service) {
249
- this.service = service;
250
- this.serviceUrl = '/product-catalogs';
251
- }
252
- CatalogApiService.prototype.fetchCatalogs$ = function () {
253
- return this.service.api({
254
- method: 'get',
255
- url: "" + this.serviceUrl,
256
- });
257
- };
258
- CatalogApiService.prototype.searchCatalogs$ = function (searchParams, expression) {
259
- var params = new i4.HttpParams({ fromObject: searchParams });
260
- return this.service.api({
261
- method: 'post',
262
- url: this.serviceUrl + "/search",
263
- params: params,
264
- body: expression,
265
- });
266
- };
267
- CatalogApiService.prototype.getCatalog$ = function (id) {
268
- return this.service.api({
269
- method: 'get',
270
- url: this.serviceUrl + "/" + id,
271
- });
272
- };
273
- CatalogApiService.prototype.fetchCategories$ = function (catalogId) {
274
- return this.service.api({
275
- method: 'get',
276
- url: this.serviceUrl + "/" + catalogId + "/categories",
277
- });
278
- };
279
- CatalogApiService.prototype.fetchCatalogProducts$ = function (catalogId, searchParams, context) {
280
- var params = new i4.HttpParams({ fromObject: searchParams });
281
- return this.service.api({
282
- method: 'post',
283
- url: this.serviceUrl + "/" + catalogId + "/products",
284
- params: params,
285
- body: context,
286
- });
287
- };
288
- CatalogApiService.prototype.fetchCategoryProducts$ = function (catalogId, categoryId, searchParams, context) {
289
- var params = new i4.HttpParams({ fromObject: searchParams });
290
- return this.service.api({
291
- method: 'post',
292
- url: this.serviceUrl + "/" + catalogId + "/categories/" + categoryId + "/products",
293
- params: params,
294
- body: context,
295
- });
296
- };
297
- CatalogApiService.prototype.searchCategoryProducts$ = function (catalogId, categoryId, searchParams, searchCriteria, context) {
298
- var params = new i4.HttpParams({ fromObject: searchParams });
299
- return this.service.api({
300
- method: 'post',
301
- url: this.serviceUrl + "/" + catalogId + "/categories/" + categoryId + "/products/search",
302
- params: params,
303
- body: {
304
- configurationContext: context,
305
- request: { searchCriteria: searchCriteria },
306
- },
307
- });
308
- };
309
- CatalogApiService.prototype.fetchEligibleProducts$ = function (searchParams, context) {
310
- var params = new i4.HttpParams({ fromObject: searchParams });
311
- return this.service.api({
312
- method: 'post',
313
- url: this.serviceUrl + "/products",
314
- params: params,
315
- body: context,
316
- });
317
- };
318
- CatalogApiService.prototype.fetchProducts$ = function (searchParams) {
319
- var params = new i4.HttpParams({ fromObject: searchParams });
320
- return this.service.api({
321
- method: 'get',
322
- url: this.serviceUrl + "/products",
323
- params: params,
324
- });
325
- };
326
- return CatalogApiService;
327
- }());
328
- CatalogApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CatalogApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
329
- CatalogApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CatalogApiService });
330
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CatalogApiService, decorators: [{
331
- type: i0.Injectable
332
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
333
-
334
- /******************************************************************************
335
- Copyright (c) Microsoft Corporation.
336
-
337
- Permission to use, copy, modify, and/or distribute this software for any
338
- purpose with or without fee is hereby granted.
339
-
340
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
341
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
342
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
343
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
344
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
345
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
346
- PERFORMANCE OF THIS SOFTWARE.
347
- ***************************************************************************** */
348
- /* global Reflect, Promise */
349
- var extendStatics = function (d, b) {
350
- extendStatics = Object.setPrototypeOf ||
351
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
352
- function (d, b) { for (var p in b)
353
- if (Object.prototype.hasOwnProperty.call(b, p))
354
- d[p] = b[p]; };
355
- return extendStatics(d, b);
356
- };
357
- function __extends(d, b) {
358
- if (typeof b !== "function" && b !== null)
359
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
360
- extendStatics(d, b);
361
- function __() { this.constructor = d; }
362
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
363
- }
364
- var __assign = function () {
365
- __assign = Object.assign || function __assign(t) {
366
- for (var s, i = 1, n = arguments.length; i < n; i++) {
367
- s = arguments[i];
368
- for (var p in s)
369
- if (Object.prototype.hasOwnProperty.call(s, p))
370
- t[p] = s[p];
371
- }
372
- return t;
373
- };
374
- return __assign.apply(this, arguments);
375
- };
376
- function __rest(s, e) {
377
- var t = {};
378
- for (var p in s)
379
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
380
- t[p] = s[p];
381
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
382
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
383
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
384
- t[p[i]] = s[p[i]];
385
- }
386
- return t;
387
- }
388
- function __decorate(decorators, target, key, desc) {
389
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
390
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
391
- r = Reflect.decorate(decorators, target, key, desc);
392
- else
393
- for (var i = decorators.length - 1; i >= 0; i--)
394
- if (d = decorators[i])
395
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
396
- return c > 3 && r && Object.defineProperty(target, key, r), r;
397
- }
398
- function __param(paramIndex, decorator) {
399
- return function (target, key) { decorator(target, key, paramIndex); };
400
- }
401
- function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
402
- function accept(f) { if (f !== void 0 && typeof f !== "function")
403
- throw new TypeError("Function expected"); return f; }
404
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
405
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
406
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
407
- var _, done = false;
408
- for (var i = decorators.length - 1; i >= 0; i--) {
409
- var context = {};
410
- for (var p in contextIn)
411
- context[p] = p === "access" ? {} : contextIn[p];
412
- for (var p in contextIn.access)
413
- context.access[p] = contextIn.access[p];
414
- context.addInitializer = function (f) { if (done)
415
- throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
416
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
417
- if (kind === "accessor") {
418
- if (result === void 0)
419
- continue;
420
- if (result === null || typeof result !== "object")
421
- throw new TypeError("Object expected");
422
- if (_ = accept(result.get))
423
- descriptor.get = _;
424
- if (_ = accept(result.set))
425
- descriptor.set = _;
426
- if (_ = accept(result.init))
427
- initializers.push(_);
428
- }
429
- else if (_ = accept(result)) {
430
- if (kind === "field")
431
- initializers.push(_);
432
- else
433
- descriptor[key] = _;
434
- }
435
- }
436
- if (target)
437
- Object.defineProperty(target, contextIn.name, descriptor);
438
- done = true;
439
- }
440
- ;
441
- function __runInitializers(thisArg, initializers, value) {
442
- var useValue = arguments.length > 2;
443
- for (var i = 0; i < initializers.length; i++) {
444
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
445
- }
446
- return useValue ? value : void 0;
447
- }
448
- ;
449
- function __propKey(x) {
450
- return typeof x === "symbol" ? x : "".concat(x);
451
- }
452
- ;
453
- function __setFunctionName(f, name, prefix) {
454
- if (typeof name === "symbol")
455
- name = name.description ? "[".concat(name.description, "]") : "";
456
- return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
457
- }
458
- ;
459
- function __metadata(metadataKey, metadataValue) {
460
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
461
- return Reflect.metadata(metadataKey, metadataValue);
462
- }
463
- function __awaiter(thisArg, _arguments, P, generator) {
464
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
465
- return new (P || (P = Promise))(function (resolve, reject) {
466
- function fulfilled(value) { try {
467
- step(generator.next(value));
468
- }
469
- catch (e) {
470
- reject(e);
471
- } }
472
- function rejected(value) { try {
473
- step(generator["throw"](value));
474
- }
475
- catch (e) {
476
- reject(e);
477
- } }
478
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
479
- step((generator = generator.apply(thisArg, _arguments || [])).next());
480
- });
481
- }
482
- function __generator(thisArg, body) {
483
- var _ = { label: 0, sent: function () { if (t[0] & 1)
484
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
485
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
486
- function verb(n) { return function (v) { return step([n, v]); }; }
487
- function step(op) {
488
- if (f)
489
- throw new TypeError("Generator is already executing.");
490
- while (g && (g = 0, op[0] && (_ = 0)), _)
491
- try {
492
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
493
- return t;
494
- if (y = 0, t)
495
- op = [op[0] & 2, t.value];
496
- switch (op[0]) {
497
- case 0:
498
- case 1:
499
- t = op;
500
- break;
501
- case 4:
502
- _.label++;
503
- return { value: op[1], done: false };
504
- case 5:
505
- _.label++;
506
- y = op[1];
507
- op = [0];
508
- continue;
509
- case 7:
510
- op = _.ops.pop();
511
- _.trys.pop();
512
- continue;
513
- default:
514
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
515
- _ = 0;
516
- continue;
517
- }
518
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
519
- _.label = op[1];
520
- break;
521
- }
522
- if (op[0] === 6 && _.label < t[1]) {
523
- _.label = t[1];
524
- t = op;
525
- break;
526
- }
527
- if (t && _.label < t[2]) {
528
- _.label = t[2];
529
- _.ops.push(op);
530
- break;
531
- }
532
- if (t[2])
533
- _.ops.pop();
534
- _.trys.pop();
535
- continue;
536
- }
537
- op = body.call(thisArg, _);
538
- }
539
- catch (e) {
540
- op = [6, e];
541
- y = 0;
542
- }
543
- finally {
544
- f = t = 0;
545
- }
546
- if (op[0] & 5)
547
- throw op[1];
548
- return { value: op[0] ? op[1] : void 0, done: true };
549
- }
550
- }
551
- var __createBinding = Object.create ? (function (o, m, k, k2) {
552
- if (k2 === undefined)
553
- k2 = k;
554
- var desc = Object.getOwnPropertyDescriptor(m, k);
555
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
556
- desc = { enumerable: true, get: function () { return m[k]; } };
557
- }
558
- Object.defineProperty(o, k2, desc);
559
- }) : (function (o, m, k, k2) {
560
- if (k2 === undefined)
561
- k2 = k;
562
- o[k2] = m[k];
563
- });
564
- function __exportStar(m, o) {
565
- for (var p in m)
566
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
567
- __createBinding(o, m, p);
568
- }
569
- function __values(o) {
570
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
571
- if (m)
572
- return m.call(o);
573
- if (o && typeof o.length === "number")
574
- return {
575
- next: function () {
576
- if (o && i >= o.length)
577
- o = void 0;
578
- return { value: o && o[i++], done: !o };
579
- }
580
- };
581
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
582
- }
583
- function __read(o, n) {
584
- var m = typeof Symbol === "function" && o[Symbol.iterator];
585
- if (!m)
586
- return o;
587
- var i = m.call(o), r, ar = [], e;
588
- try {
589
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
590
- ar.push(r.value);
591
- }
592
- catch (error) {
593
- e = { error: error };
594
- }
595
- finally {
596
- try {
597
- if (r && !r.done && (m = i["return"]))
598
- m.call(i);
599
- }
600
- finally {
601
- if (e)
602
- throw e.error;
603
- }
604
- }
605
- return ar;
606
- }
607
- /** @deprecated */
608
- function __spread() {
609
- for (var ar = [], i = 0; i < arguments.length; i++)
610
- ar = ar.concat(__read(arguments[i]));
611
- return ar;
612
- }
613
- /** @deprecated */
614
- function __spreadArrays() {
615
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
616
- s += arguments[i].length;
617
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
618
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
619
- r[k] = a[j];
620
- return r;
621
- }
622
- function __spreadArray(to, from, pack) {
623
- if (pack || arguments.length === 2)
624
- for (var i = 0, l = from.length, ar; i < l; i++) {
625
- if (ar || !(i in from)) {
626
- if (!ar)
627
- ar = Array.prototype.slice.call(from, 0, i);
628
- ar[i] = from[i];
629
- }
630
- }
631
- return to.concat(ar || Array.prototype.slice.call(from));
632
- }
633
- function __await(v) {
634
- return this instanceof __await ? (this.v = v, this) : new __await(v);
635
- }
636
- function __asyncGenerator(thisArg, _arguments, generator) {
637
- if (!Symbol.asyncIterator)
638
- throw new TypeError("Symbol.asyncIterator is not defined.");
639
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
640
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
641
- function verb(n) { if (g[n])
642
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
643
- function resume(n, v) { try {
644
- step(g[n](v));
645
- }
646
- catch (e) {
647
- settle(q[0][3], e);
648
- } }
649
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
650
- function fulfill(value) { resume("next", value); }
651
- function reject(value) { resume("throw", value); }
652
- function settle(f, v) { if (f(v), q.shift(), q.length)
653
- resume(q[0][0], q[0][1]); }
654
- }
655
- function __asyncDelegator(o) {
656
- var i, p;
657
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
658
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
659
- }
660
- function __asyncValues(o) {
661
- if (!Symbol.asyncIterator)
662
- throw new TypeError("Symbol.asyncIterator is not defined.");
663
- var m = o[Symbol.asyncIterator], i;
664
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
665
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
666
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
667
- }
668
- function __makeTemplateObject(cooked, raw) {
669
- if (Object.defineProperty) {
670
- Object.defineProperty(cooked, "raw", { value: raw });
671
- }
672
- else {
673
- cooked.raw = raw;
674
- }
675
- return cooked;
676
- }
677
- ;
678
- var __setModuleDefault = Object.create ? (function (o, v) {
679
- Object.defineProperty(o, "default", { enumerable: true, value: v });
680
- }) : function (o, v) {
681
- o["default"] = v;
682
- };
683
- function __importStar(mod) {
684
- if (mod && mod.__esModule)
685
- return mod;
686
- var result = {};
687
- if (mod != null)
688
- for (var k in mod)
689
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
690
- __createBinding(result, mod, k);
691
- __setModuleDefault(result, mod);
692
- return result;
693
- }
694
- function __importDefault(mod) {
695
- return (mod && mod.__esModule) ? mod : { default: mod };
696
- }
697
- function __classPrivateFieldGet(receiver, state, kind, f) {
698
- if (kind === "a" && !f)
699
- throw new TypeError("Private accessor was defined without a getter");
700
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
701
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
702
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
703
- }
704
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
705
- if (kind === "m")
706
- throw new TypeError("Private method is not writable");
707
- if (kind === "a" && !f)
708
- throw new TypeError("Private accessor was defined without a setter");
709
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
710
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
711
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
712
- }
713
- function __classPrivateFieldIn(state, receiver) {
714
- if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
715
- throw new TypeError("Cannot use 'in' operator on non-object");
716
- return typeof state === "function" ? receiver === state : state.has(receiver);
717
- }
718
-
719
- var ConfigurationApiService = /** @class */ (function () {
720
- function ConfigurationApiService(httpService) {
721
- this.httpService = httpService;
722
- this.SERVICE_URL = '/configuration';
723
- }
724
- ConfigurationApiService.prototype.configureLineItem = function (_d) {
725
- var _this = this;
726
- var configurationRequest = _d.configurationRequest, runtimeModel = _d.runtimeModel, pricingEnabled = _d.pricingEnabled;
727
- return this.httpService
728
- .api({
729
- method: 'post',
730
- url: "" + this.SERVICE_URL + (pricingEnabled ? '/price' : ''),
731
- body: configurationRequest,
732
- errorHandler: function (e) { return rxjs.throwError(e); },
733
- })
734
- .pipe(operators.map(function (configurePrice) {
735
- if (runtimeModel) {
736
- return Object.assign(Object.assign({}, configurePrice), { lineItem: _this.updatePortDomains(configurePrice.lineItem, runtimeModel) });
737
- }
738
- else {
739
- return configurePrice;
740
- }
741
- }));
742
- };
743
- ConfigurationApiService.prototype.getRuntimeDataByProductId = function (productId, offeringId) {
744
- return this.httpService
745
- .api({
746
- method: 'get',
747
- url: this.SERVICE_URL + "/" + productId + "/model" + ((offeringId && "/" + offeringId) || ''),
748
- })
749
- .pipe(operators.map(function (runtimeData) {
750
- runtimeData.uiDefinitions = JSON.parse(runtimeData.uiDefinitionsSource);
751
- runtimeData.uiDefinitions.forEach(function (uiDefinition) {
752
- i1.ModelTranslatorUtils.toLocalUIDefinition(uiDefinition);
753
- });
754
- return runtimeData;
755
- }));
756
- };
757
- ConfigurationApiService.prototype.getRuntimeDataByModelId = function (modelId) {
758
- return this.httpService
759
- .api({
760
- method: 'get',
761
- url: this.SERVICE_URL + "/" + modelId + "/model-test",
762
- })
763
- .pipe(operators.map(function (runtimeData) {
764
- runtimeData.uiDefinitions = [];
765
- return runtimeData;
766
- }));
767
- };
768
- ConfigurationApiService.prototype.updatePortDomains = function (lineItem, runtimeModel) {
769
- var e_1, _d;
770
- var _this = this;
771
- var _a, _b, _c;
772
- var type = runtimeModel.components.get(lineItem.type);
773
- var portDomains = Object.assign({}, lineItem.portDomains);
774
- try {
775
- for (var _e = __values((_a = type === null || type === void 0 ? void 0 : type.ports) !== null && _a !== void 0 ? _a : []), _f = _e.next(); !_f.done; _f = _e.next()) {
776
- var port = _f.value;
777
- var portDomain = portDomains[port.name];
778
- if (((_b = portDomain === null || portDomain === void 0 ? void 0 : portDomain.properties) === null || _b === void 0 ? void 0 : _b.domainComputation) === 'false') {
779
- portDomain.domainTypes = port.domainTypes;
780
- }
781
- }
782
- }
783
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
784
- finally {
785
- try {
786
- if (_f && !_f.done && (_d = _e.return)) _d.call(_e);
787
- }
788
- finally { if (e_1) throw e_1.error; }
789
- }
790
- return Object.assign(Object.assign({}, lineItem), { lineItems: (_c = lineItem.lineItems) === null || _c === void 0 ? void 0 : _c.map(function (i) { return _this.updatePortDomains(i, runtimeModel); }), portDomains: portDomains });
791
- };
792
- return ConfigurationApiService;
793
- }());
794
- ConfigurationApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ConfigurationApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
795
- ConfigurationApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ConfigurationApiService });
796
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ConfigurationApiService, decorators: [{
797
- type: i0.Injectable
798
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
799
-
800
- var ConfigurationSettingsDTO = /** @class */ (function () {
801
- function ConfigurationSettingsDTO(id, key, value) {
802
- this.id = id;
803
- this.key = key;
804
- this.value = value;
805
- }
806
- ConfigurationSettingsDTO.fromDTO = function (dto, key) {
807
- return {
808
- id: dto === null || dto === void 0 ? void 0 : dto.id,
809
- key: (dto === null || dto === void 0 ? void 0 : dto.key) || key || '',
810
- value: dto === null || dto === void 0 ? void 0 : dto.value,
811
- };
812
- };
813
- ConfigurationSettingsDTO.toDTO = function (data) {
814
- return {
815
- id: data.id,
816
- key: data.key,
817
- value: data.value,
818
- };
819
- };
820
- return ConfigurationSettingsDTO;
821
- }());
822
-
823
- var ConfigurationSettingsApiService = /** @class */ (function () {
824
- function ConfigurationSettingsApiService(httpService, messageService) {
825
- this.httpService = httpService;
826
- this.messageService = messageService;
827
- this.SERVICE_URL = '/configuration-settings';
828
- }
829
- ConfigurationSettingsApiService.prototype.fetchSettings = function (options) {
830
- return this.httpService
831
- .api(Object.assign({ url: "" + this.SERVICE_URL, method: 'get' }, options))
832
- .pipe(operators.map(function (settings) { return settings.map(function (setting) { return ConfigurationSettingsDTO.fromDTO(setting); }); }));
833
- };
834
- ConfigurationSettingsApiService.prototype.fetchSetting = function (settingsKey, options) {
835
- var _this = this;
836
- return this.httpService
837
- .api(Object.assign(Object.assign({ url: this.SERVICE_URL + "/byKey/" + settingsKey, method: 'get' }, options), { skipErrorHandler: true }))
838
- .pipe(operators.map(function (setting) { return ConfigurationSettingsDTO.fromDTO(setting, settingsKey); }), operators.catchError(function (err) {
839
- if (err instanceof i4.HttpErrorResponse && err.status === 404) {
840
- if (!(options === null || options === void 0 ? void 0 : options.skipErrorHandler)) {
841
- _this.messageService.add({
842
- severity: 'error',
843
- summary: "Configuration Setting \"" + settingsKey + "\" is not found",
844
- sticky: true,
845
- });
846
- }
847
- return rxjs.of(null);
848
- }
849
- throw err;
850
- }));
851
- };
852
- ConfigurationSettingsApiService.prototype.createSetting = function (setting, options) {
853
- var request = ConfigurationSettingsDTO.toDTO(setting);
854
- return this.httpService.api(Object.assign({ url: "" + this.SERVICE_URL, method: 'post', body: Object.assign({}, request) }, options));
855
- };
856
- ConfigurationSettingsApiService.prototype.updateSetting = function (setting, options) {
857
- var request = ConfigurationSettingsDTO.toDTO(setting);
858
- return this.httpService.api(Object.assign({ url: this.SERVICE_URL + "/" + request.id, method: 'put', body: Object.assign({}, request) }, options));
859
- };
860
- ConfigurationSettingsApiService.prototype.removeSetting = function (setting, options) {
861
- var request = ConfigurationSettingsDTO.toDTO(setting);
862
- return this.httpService.api(Object.assign({ url: this.SERVICE_URL + "/" + request.id, method: 'delete' }, options));
863
- };
864
- ConfigurationSettingsApiService.prototype.restoreSetting = function (settingId, options) {
865
- return this.httpService.api(Object.assign({ url: this.SERVICE_URL + "/" + settingId + "/restore", method: 'patch' }, options));
866
- };
867
- ConfigurationSettingsApiService.prototype.clear = function (name, options) {
868
- return this.httpService.api(Object.assign({ method: 'get', url: '/cache/evict/' + name }, options));
869
- };
870
- return ConfigurationSettingsApiService;
871
- }());
872
- ConfigurationSettingsApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ConfigurationSettingsApiService, deps: [{ token: i1__namespace.BaseHttpService }, { token: i2__namespace.MessageService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
873
- ConfigurationSettingsApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ConfigurationSettingsApiService });
874
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ConfigurationSettingsApiService, decorators: [{
875
- type: i0.Injectable
876
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }, { type: i2__namespace.MessageService }]; } });
877
-
878
- var ContextApiService = /** @class */ (function () {
879
- function ContextApiService(httpService) {
880
- this.httpService = httpService;
881
- this.SERVICE_URL = '/context';
882
- }
883
- ContextApiService.prototype.getContext = function (headerId, mode) {
884
- return this.httpService.api({
885
- method: 'post',
886
- body: {
887
- headerId: headerId,
888
- contextMode: i1.ConfigurationContextMode[mode],
889
- },
890
- url: "" + this.SERVICE_URL,
891
- });
892
- };
893
- return ContextApiService;
894
- }());
895
- ContextApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ContextApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
896
- ContextApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ContextApiService });
897
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ContextApiService, decorators: [{
898
- type: i0.Injectable
899
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
900
-
901
- var DeltaApiService = /** @class */ (function () {
902
- function DeltaApiService(httpService) {
903
- this.httpService = httpService;
904
- this.SERVICE_URL = '/delta';
905
- }
906
- DeltaApiService.prototype.calculate$ = function (request) {
907
- return this.httpService.api({
908
- method: 'post',
909
- url: this.SERVICE_URL + "/calculate",
910
- body: request,
911
- skipErrorHandler: true,
912
- });
913
- };
914
- return DeltaApiService;
915
- }());
916
- DeltaApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DeltaApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
917
- DeltaApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DeltaApiService });
918
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DeltaApiService, decorators: [{
919
- type: i0.Injectable
920
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
921
-
922
- var DocumentAttachmentApiService = /** @class */ (function () {
923
- function DocumentAttachmentApiService(httpService, fileDownloadService) {
924
- this.httpService = httpService;
925
- this.fileDownloadService = fileDownloadService;
926
- this.SERVICE_URL = '/attachments';
927
- }
928
- DocumentAttachmentApiService.prototype.getAttachments = function (searchRequest) {
929
- return this.httpService.api({
930
- url: this.SERVICE_URL + "/search",
931
- method: 'post',
932
- body: searchRequest,
933
- });
934
- };
935
- DocumentAttachmentApiService.prototype.createAttachment = function (attachment, file, reportProgress) {
936
- var formData = new FormData();
937
- if (file) {
938
- formData.append('file', file, file.name);
939
- }
940
- formData.append('attachment', new Blob([JSON.stringify(attachment)], {
941
- type: 'application/json',
942
- }));
943
- return this.httpService.upload({
944
- url: "" + this.SERVICE_URL,
945
- body: formData,
946
- method: 'post',
947
- observe: reportProgress ? 'events' : undefined,
948
- reportProgress: reportProgress,
949
- });
950
- };
951
- DocumentAttachmentApiService.prototype.updateAttachment = function (id, attachment) {
952
- return this.httpService.api({
953
- url: this.SERVICE_URL + "/" + id,
954
- body: attachment,
955
- method: 'put',
956
- });
957
- };
958
- DocumentAttachmentApiService.prototype.getAttachmentFile = function (id, isPreventDownload) {
959
- var _this = this;
960
- return this.httpService
961
- .api({
962
- url: this.SERVICE_URL + "/" + id + "/file",
963
- responseType: isPreventDownload ? 'arraybuffer' : 'blob',
964
- observe: isPreventDownload ? 'body' : 'response',
965
- })
966
- .pipe(operators.tap(function (response) {
967
- if (!isPreventDownload) {
968
- _this.fileDownloadService.processDownload(response);
969
- }
970
- }), operators.map(function (response) { return (isPreventDownload ? new Blob([response.body || response]) : response.body || response); }));
971
- };
972
- DocumentAttachmentApiService.prototype.removeAttachment = function (id) {
973
- return this.httpService.api({
974
- url: this.SERVICE_URL + "/" + id,
975
- method: 'delete',
976
- });
977
- };
978
- return DocumentAttachmentApiService;
979
- }());
980
- DocumentAttachmentApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DocumentAttachmentApiService, deps: [{ token: i1__namespace.BaseHttpService }, { token: i1__namespace.FileDownloadService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
981
- DocumentAttachmentApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DocumentAttachmentApiService });
982
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DocumentAttachmentApiService, decorators: [{
983
- type: i0.Injectable
984
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }, { type: i1__namespace.FileDownloadService }]; } });
985
-
986
- var SalesforceApiService = /** @class */ (function () {
987
- function SalesforceApiService(httpService) {
988
- this.httpService = httpService;
989
- this.SERVICE_URL = '/proxy';
990
- }
991
- SalesforceApiService.prototype.query = function (searchRequest, objectName, options) {
992
- 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));
993
- };
994
- SalesforceApiService.prototype.queryObjects = function (search, options) {
995
- var params = new i4.HttpParams();
996
- if (search) {
997
- params = params.append('search', search);
998
- }
999
- return this.httpService.api(Object.assign({ url: this.SERVICE_URL + "/query", params: params }, options));
1000
- };
1001
- SalesforceApiService.prototype.search = function (req, options) {
1002
- return this.httpService.api(Object.assign({ url: this.SERVICE_URL + "/rest/search", params: { q: req.searchString } }, options));
1003
- };
1004
- SalesforceApiService.prototype.describe = function (objectName, fieldName, options) {
1005
- var methodUrl = this.SERVICE_URL + "/describe/" + objectName + "/fields" + (fieldName ? "/" + fieldName : '');
1006
- return this.httpService.api(Object.assign({ url: methodUrl }, options));
1007
- };
1008
- SalesforceApiService.prototype.describe2 = function (objectName, fields, options) {
1009
- var methodUrl = this.SERVICE_URL + "/describe/" + objectName + "/fields";
1010
- return this.httpService.api(Object.assign({ method: 'post', url: methodUrl, body: fields }, options));
1011
- };
1012
- SalesforceApiService.prototype.apexGetRequest = function (path, params, options) {
1013
- return this.httpService.api(Object.assign({ url: this.SERVICE_URL + "/apex" + path, params: params }, options));
1014
- };
1015
- SalesforceApiService.prototype.apexPostRequest = function (path, body, options) {
1016
- return this.httpService.api(Object.assign({ method: 'post', body: body, url: this.SERVICE_URL + "/apex" + path }, options));
1017
- };
1018
- return SalesforceApiService;
1019
- }());
1020
- SalesforceApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SalesforceApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1021
- SalesforceApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SalesforceApiService });
1022
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SalesforceApiService, decorators: [{
1023
- type: i0.Injectable
1024
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
1025
-
1026
- var moment = moment___namespace;
1027
- var DocumentTemplatesApiService = /** @class */ (function () {
1028
- function DocumentTemplatesApiService(service, salesforceApiService, fileDownloadService, documentAttachmentService, http) {
1029
- this.service = service;
1030
- this.salesforceApiService = salesforceApiService;
1031
- this.fileDownloadService = fileDownloadService;
1032
- this.documentAttachmentService = documentAttachmentService;
1033
- this.http = http;
1034
- this.DOCGEN_TAG = 'docgen';
1035
- this.SERVICE_URL = '/templates';
1036
- this.DOC_GEN_URL_FALLBACK = 'https://dev-dp1.velocpq.com/docgen';
1037
- this.mapSfQueryResult = function (limit) { return operators.map(function (records) {
1038
- if (!records.length) {
1039
- return { _result: 'No Records Found' };
1040
- }
1041
- if (limit === 1) {
1042
- return records[0];
1043
- }
1044
- return records;
1045
- }); };
1046
- this.mapBooleanIfAplicable = function (value) {
1047
- if (value === 'true') {
1048
- return true;
1049
- }
1050
- if (value === 'false') {
1051
- return false;
1052
- }
1053
- return value;
1054
- };
1055
- if (window.VELO_DOCGEN_API) {
1056
- this.DOC_GEN_URL = window.VELO_DOCGEN_API;
1057
- }
1058
- else {
1059
- console.log("window.VELO_DOCGEN_API not set, will use fallback \"" + this.DOC_GEN_URL_FALLBACK + "\"");
1060
- this.DOC_GEN_URL = this.DOC_GEN_URL_FALLBACK;
1061
- }
1062
- }
1063
- DocumentTemplatesApiService.prototype.getTemplates = function (tag) {
1064
- return this.service.api({
1065
- url: "" + this.SERVICE_URL,
1066
- method: 'get',
1067
- params: Object.assign({}, (tag && { tag: tag })),
1068
- });
1069
- };
1070
- DocumentTemplatesApiService.prototype.getTemplate = function (id) {
1071
- return this.service.api({
1072
- url: this.SERVICE_URL + "/" + id,
1073
- method: 'get',
1074
- });
1075
- };
1076
- DocumentTemplatesApiService.prototype.upsertTemplate = function (template, file, reportProgress) {
1077
- var formData = new FormData();
1078
- if (file) {
1079
- formData.append('file', file, file.name);
1080
- }
1081
- formData.append('template', new Blob([JSON.stringify(template)], {
1082
- type: 'application/json',
1083
- }));
1084
- var url = "" + this.SERVICE_URL;
1085
- if (template.id) {
1086
- url += "/" + template.id;
1087
- }
1088
- return this.service.upload({
1089
- url: url,
1090
- body: formData,
1091
- method: template.id ? 'put' : 'post',
1092
- reportProgress: reportProgress,
1093
- });
1094
- };
1095
- DocumentTemplatesApiService.prototype.removeTemplate = function (id) {
1096
- return this.service.api({
1097
- url: this.SERVICE_URL + "/" + id,
1098
- method: 'delete',
1099
- });
1100
- };
1101
- DocumentTemplatesApiService.prototype.restoreTemplate = function (id) {
1102
- return this.service.api({
1103
- url: this.SERVICE_URL + "/" + id + "/restore",
1104
- method: 'patch',
1105
- });
1106
- };
1107
- DocumentTemplatesApiService.prototype.cloneTemplate = function (id, propertiesToOverride) {
1108
- if (propertiesToOverride === void 0) { propertiesToOverride = {}; }
1109
- return this.service.api({
1110
- url: this.SERVICE_URL + "/clone/" + id,
1111
- method: 'post',
1112
- body: {
1113
- id: id,
1114
- propertiesToOverride: propertiesToOverride,
1115
- },
1116
- });
1117
- };
1118
- DocumentTemplatesApiService.prototype.getTemplateFile = function (id) {
1119
- return this.service.api({
1120
- method: 'get',
1121
- url: this.SERVICE_URL + "/" + id + "/file",
1122
- responseType: 'arraybuffer',
1123
- });
1124
- };
1125
- DocumentTemplatesApiService.prototype.downloadTemplateFile = function (id) {
1126
- var _this = this;
1127
- return this.service
1128
- .api({
1129
- url: this.SERVICE_URL + "/" + id + "/file",
1130
- responseType: 'blob',
1131
- observe: 'response',
1132
- })
1133
- .pipe(operators.tap(function (response) {
1134
- _this.fileDownloadService.processDownload(response);
1135
- }), operators.map(function (response) { return response.body || response; }));
1136
- };
1137
- DocumentTemplatesApiService.prototype.mergeDocuments = function (document, attachments) {
1138
- var body = new FormData();
1139
- attachments.forEach(function (attachment) {
1140
- body.append('attachments', new Blob([attachment]));
1141
- });
1142
- body.append('orderform', document);
1143
- return this.http.post(this.DOC_GEN_URL + "/documents/merge", body, {
1144
- responseType: 'arraybuffer',
1145
- });
1146
- };
1147
- DocumentTemplatesApiService.prototype.getAttachments = function (searchRequest) {
1148
- return this.documentAttachmentService.getAttachments(searchRequest);
1149
- };
1150
- DocumentTemplatesApiService.prototype.getAttachmentFile = function (id) {
1151
- return this.documentAttachmentService.getAttachmentFile(id);
1152
- };
1153
- DocumentTemplatesApiService.prototype.createAttachment = function (attachment, file, reportProgress) {
1154
- return this.documentAttachmentService.createAttachment(attachment, file, reportProgress);
1155
- };
1156
- DocumentTemplatesApiService.prototype.removeAttachment = function (id) {
1157
- return this.documentAttachmentService.removeAttachment(id);
1158
- };
1159
- DocumentTemplatesApiService.prototype.generateDocumentData = function (template, object, params) {
1160
- var _this = this;
1161
- if (params === void 0) { params = {}; }
1162
- var _a;
1163
- if (i1.isLegacyDocumentTemplate(template)) {
1164
- return this.generateDocumentDataLegacy(template, object, params);
1165
- }
1166
- var templateProperties = (_a = template.properties) === null || _a === void 0 ? void 0 : _a.reduce(function (acc, _g) {
1167
- var _h;
1168
- var name = _g.name, value = _g.value;
1169
- return (Object.assign(Object.assign({}, acc), (_h = {}, _h[name] = _this.mapBooleanIfAplicable(value), _h)));
1170
- }, {});
1171
- /*
1172
- Resolve quote and template properties for now
1173
- When procedures are ready, whey will replace template scripts.
1174
-
1175
- TODO: run procedure to resolve document data
1176
- */
1177
- return rxjs.of(Object.assign(Object.assign({}, (typeof object === 'object' ? object : { object: object })), templateProperties));
1178
- };
1179
- DocumentTemplatesApiService.prototype.generateDocument = function (template, object, params) {
1180
- var _this = this;
1181
- if (params === void 0) { params = {}; }
1182
- var documentData$ = this.generateDocumentData(template, object, Object.assign(Object.assign({}, params), { shouldPreventDownload: true }));
1183
- return rxjs.zip(this.getTemplateFile(template.id), documentData$, this.resolveAttachments$(template)).pipe(operators.switchMap(function (_g) {
1184
- var _h = __read(_g, 3), templateFile = _h[0], data = _h[1], attachments = _h[2];
1185
- var _a, _b, _c, _d, _e, _f;
1186
- var document = i1.DocxTemplater.generate(templateFile, data);
1187
- var properties = (_c = (_b = (_a = object === null || object === void 0 ? void 0 : object.context) === null || _a === void 0 ? void 0 : _a.properties) !== null && _b !== void 0 ? _b : object === null || object === void 0 ? void 0 : object.properties) !== null && _c !== void 0 ? _c : {};
1188
- var documentName = properties.Name || template.name;
1189
- var documentFormat = (_d = params.documentFormat) !== null && _d !== void 0 ? _d : (_f = (_e = template.properties) === null || _e === void 0 ? void 0 : _e.find(function (p) { return p.name === 'documentFormat'; })) === null || _f === void 0 ? void 0 : _f.value;
1190
- if (documentFormat === 'DOCX') {
1191
- _this.fileDownloadService.processDownload(document, documentName);
1192
- return rxjs.of(document);
1193
- }
1194
- return _this.mergeDocuments(document, attachments).pipe(operators.switchMap(function (pdf) {
1195
- if (params.attachToQuote && i1.QuoteDraft.isQuote(object)) {
1196
- var file = new File([pdf], documentName + ".pdf");
1197
- return _this.documentAttachmentService
1198
- .createAttachment({
1199
- linkedEntityId: object.quoteId,
1200
- fileName: documentName,
1201
- fileExtension: 'pdf',
1202
- tags: _this.DOCGEN_TAG,
1203
- }, file)
1204
- .pipe(operators.map(function () { return pdf; }));
1205
- }
1206
- return rxjs.of(pdf);
1207
- }), operators.map(function (pdf) {
1208
- var blob = new Blob([pdf]);
1209
- if (!params.shouldPreventDownload) {
1210
- _this.fileDownloadService.processDownload(blob, documentName + ".pdf");
1211
- }
1212
- return blob;
1213
- }));
1214
- }));
1215
- };
1216
- DocumentTemplatesApiService.prototype.generateDocumentDataLegacy = function (template, object, params) {
1217
- var _this = this;
1218
- if (params === void 0) { params = {}; }
1219
- var _a, _b, _c, _d;
1220
- var shouldPreventDownload = params.shouldPreventDownload;
1221
- var allQueries = __spreadArray([], __read(((_a = template === null || template === void 0 ? void 0 : template.queries) !== null && _a !== void 0 ? _a : [])));
1222
- var properties = (_d = (_c = (_b = object === null || object === void 0 ? void 0 : object.context) === null || _b === void 0 ? void 0 : _b.properties) !== null && _c !== void 0 ? _c : object === null || object === void 0 ? void 0 : object.properties) !== null && _d !== void 0 ? _d : {};
1223
- var accountId = properties === null || properties === void 0 ? void 0 : properties.AccountId;
1224
- var userId = properties === null || properties === void 0 ? void 0 : properties.UserId;
1225
- if (accountId) {
1226
- allQueries.push({
1227
- queryName: 'QuoteAccountQuery',
1228
- objectName: 'Account',
1229
- resultObjectName: 'account',
1230
- statement: "Id ='" + accountId + "'",
1231
- fields: [],
1232
- });
1233
- }
1234
- if (userId) {
1235
- allQueries.push({
1236
- queryName: 'QuoteUserQuery',
1237
- objectName: 'User',
1238
- resultObjectName: 'agent',
1239
- statement: "Id ='" + userId + "'",
1240
- fields: [],
1241
- });
1242
- }
1243
- var queries = allQueries.map(function (query) { return _this.queryObject(query, { properties: properties }); }) || [];
1244
- return rxjs.forkJoin(__spreadArray([], __read(queries))).pipe(operators.defaultIfEmpty([]), operators.map(function (results) {
1245
- var _a, _b, _c, _d;
1246
- var queriesResult = ___namespace.chain(results)
1247
- .reduce(function (acc, r) {
1248
- if (r) {
1249
- return Object.assign(Object.assign({}, acc), r);
1250
- }
1251
- return acc;
1252
- }, {})
1253
- .value();
1254
- var templateProperties = ((template === null || template === void 0 ? void 0 : template.properties) || []).reduce(function (trunk, _g) {
1255
- var _h;
1256
- var name = _g.name, value = _g.value;
1257
- return Object.assign(Object.assign({}, trunk), (_h = {}, _h[name] = _this.mapBooleanIfAplicable(value), _h));
1258
- }, {});
1259
- var data = Object.assign(Object.assign(Object.assign({}, (typeof object === 'object' ? object : { object: object })), queriesResult), templateProperties);
1260
- if (template.script && template.script.trim().length) {
1261
- var currencyFormat_1 = ((_b = (_a = template.properties) === null || _a === void 0 ? void 0 : _a.find(function (_g) {
1262
- var name = _g.name;
1263
- return name === 'currencyFormat';
1264
- })) === null || _b === void 0 ? void 0 : _b.value) || '1.2-2';
1265
- var dateFormat_1 = ((_d = (_c = template.properties) === null || _c === void 0 ? void 0 : _c.find(function (_g) {
1266
- var name = _g.name;
1267
- return name === 'dateFormat';
1268
- })) === null || _d === void 0 ? void 0 : _d.value) || 'D/MMM/YYYY';
1269
- var formatDate = function (value) {
1270
- return value ? moment(value).format(dateFormat_1) : value;
1271
- };
1272
- var transform = new Function("return " + template.script)();
1273
- var transformedData = transform(Object.assign(Object.assign({}, data), { utils: {
1274
- lodash: ___namespace,
1275
- currency: function (value) { return new common.CurrencyPipe('en-US').transform(value, 'USD', 'symbol', currencyFormat_1); },
1276
- date: formatDate,
1277
- }, ToDay: formatDate(Date.now()) }));
1278
- if (!shouldPreventDownload) {
1279
- var blob = new Blob([JSON.stringify(transformedData)]);
1280
- _this.fileDownloadService.processDownload(blob, 'data.json');
1281
- }
1282
- return transformedData;
1283
- }
1284
- return data;
1285
- }));
1286
- };
1287
- DocumentTemplatesApiService.prototype.resolveAttachments$ = function (template) {
1288
- var _this = this;
1289
- var _a, _b;
1290
- var attachmentIds = (_b = (_a = template.attachments) === null || _a === void 0 ? void 0 : _a.map(function (_g) {
1291
- var id = _g.id;
1292
- return id;
1293
- }).filter(Boolean)) !== null && _b !== void 0 ? _b : [];
1294
- if (!attachmentIds.length) {
1295
- return rxjs.of([]);
1296
- }
1297
- return rxjs.forkJoin(attachmentIds.map(function (id) { return _this.documentAttachmentService.getAttachmentFile(id, true); }));
1298
- };
1299
- DocumentTemplatesApiService.prototype.queryObject = function (_g, _h) {
1300
- var objectName = _g.objectName, resultObjectName = _g.resultObjectName, fields = _g.fields, statement = _g.statement;
1301
- var properties = _h.properties;
1302
- var _a;
1303
- var patternLimit = /(\s*limit\s\d*)/i;
1304
- var limit = 1;
1305
- if (statement && patternLimit.test(statement)) {
1306
- var limitStr = (_a = statement === null || statement === void 0 ? void 0 : statement.match(patternLimit)) === null || _a === void 0 ? void 0 : _a[1].trim().substring(5).trim();
1307
- if (limitStr) {
1308
- limit = Number.parseInt(limitStr, 10);
1309
- }
1310
- statement = statement.replace(patternLimit, '');
1311
- }
1312
- var resolvedStatement = statement
1313
- ? i1.StringUtils.fillPlaceholders(statement, properties, /:\s*(\w[\w\d_.]+)/i)
1314
- : undefined;
1315
- var searchRequest = Object.assign({ skip: 0, count: limit, rawCondition: resolvedStatement }, ((fields === null || fields === void 0 ? void 0 : fields.length) && !!fields[0] && { fields: fields }));
1316
- return this.salesforceApiService.query(searchRequest, objectName).pipe(this.mapSfQueryResult(limit), operators.map(function (value) {
1317
- var _g;
1318
- return (_g = {}, _g[resultObjectName] = value, _g);
1319
- }));
1320
- };
1321
- return DocumentTemplatesApiService;
1322
- }());
1323
- DocumentTemplatesApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DocumentTemplatesApiService, deps: [{ token: i1__namespace.BaseHttpService }, { token: SalesforceApiService }, { token: i1__namespace.FileDownloadService }, { token: DocumentAttachmentApiService }, { token: i4__namespace.HttpClient }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1324
- DocumentTemplatesApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DocumentTemplatesApiService });
1325
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DocumentTemplatesApiService, decorators: [{
1326
- type: i0.Injectable
1327
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }, { type: SalesforceApiService }, { type: i1__namespace.FileDownloadService }, { type: DocumentAttachmentApiService }, { type: i4__namespace.HttpClient }]; } });
1328
-
1329
- var EndpointsApiService = /** @class */ (function () {
1330
- function EndpointsApiService(baseHttpService) {
1331
- this.baseHttpService = baseHttpService;
1332
- this.adminServiceUrl = '/admin/api-endpoints';
1333
- this.serviceUrl = '/api-endpoints';
1334
- }
1335
- EndpointsApiService.prototype.fetchEndpoints$ = function () {
1336
- return this.searchEndpoints$(new i1.Expression(), 0, -1);
1337
- };
1338
- EndpointsApiService.prototype.searchEndpoints$ = function (expression, skip, count) {
1339
- var params = new i4.HttpParams();
1340
- params = params.set('skip', '' + skip);
1341
- params = params.set('count', '' + count);
1342
- return this.baseHttpService.api({
1343
- method: 'post',
1344
- url: this.adminServiceUrl + "/search",
1345
- params: params,
1346
- body: expression,
1347
- });
1348
- };
1349
- EndpointsApiService.prototype.removeEndpoint$ = function (id) {
1350
- return this.baseHttpService.api({
1351
- url: this.adminServiceUrl + "/" + id,
1352
- method: 'delete',
1353
- });
1354
- };
1355
- EndpointsApiService.prototype.restoreEndpoint$ = function (id) {
1356
- return this.baseHttpService.api({
1357
- url: this.adminServiceUrl + "/" + id + "/restore",
1358
- method: 'patch',
1359
- });
1360
- };
1361
- EndpointsApiService.prototype.fetchEndpoint$ = function (id) {
1362
- return this.baseHttpService.api({
1363
- url: this.adminServiceUrl + "/" + id,
1364
- method: 'get',
1365
- });
1366
- };
1367
- EndpointsApiService.prototype.createEndpoint$ = function (body) {
1368
- return this.baseHttpService.api({
1369
- url: "" + this.adminServiceUrl,
1370
- method: 'post',
1371
- body: body,
1372
- });
1373
- };
1374
- EndpointsApiService.prototype.updateEndpoint$ = function (body) {
1375
- return this.baseHttpService.api({
1376
- url: this.adminServiceUrl + "/" + body.id,
1377
- method: 'put',
1378
- body: body,
1379
- });
1380
- };
1381
- EndpointsApiService.prototype.duplicateEndpoint$ = function (cloneRequest) {
1382
- return this.baseHttpService.api({
1383
- url: this.adminServiceUrl + "/" + cloneRequest.id + "/clone",
1384
- method: 'post',
1385
- body: cloneRequest,
1386
- });
1387
- };
1388
- EndpointsApiService.prototype.executeEndpoint$ = function (body) {
1389
- return this.baseHttpService.api({
1390
- url: this.serviceUrl + "/execute",
1391
- method: 'post',
1392
- body: body,
1393
- responseType: 'text',
1394
- skipErrorHandler: true,
1395
- });
1396
- };
1397
- return EndpointsApiService;
1398
- }());
1399
- EndpointsApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: EndpointsApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1400
- EndpointsApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: EndpointsApiService });
1401
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: EndpointsApiService, decorators: [{
1402
- type: i0.Injectable
1403
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
1404
-
1405
- var FlowsApiService = /** @class */ (function () {
1406
- function FlowsApiService(configurationSettingsApiService) {
1407
- this.configurationSettingsApiService = configurationSettingsApiService;
1408
- this.flowsKey = 'flows';
1409
- }
1410
- FlowsApiService.prototype.getFlow = function (id) {
1411
- return this.fetchFlows().pipe(operators.map(function (flows) { return flows.find(function (flow) { return flow.id == id; }); }));
1412
- };
1413
- FlowsApiService.prototype.fetchFlows = function () {
1414
- return this.configurationSettingsApiService
1415
- .fetchSetting(this.flowsKey)
1416
- .pipe(operators.map(function (flow) { return ((flow === null || flow === void 0 ? void 0 : flow.value) ? JSON.parse(flow.value) : []); }));
1417
- };
1418
- return FlowsApiService;
1419
- }());
1420
- FlowsApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1421
- FlowsApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowsApiService });
1422
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowsApiService, decorators: [{
1423
- type: i0.Injectable
1424
- }], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
1425
-
1426
- var GuidedSellingsAdminApiService = /** @class */ (function () {
1427
- function GuidedSellingsAdminApiService(baseHttpService) {
1428
- var _this = this;
1429
- this.baseHttpService = baseHttpService;
1430
- this.serviceUrl = '/admin/guided-selling';
1431
- this.fetchGuidedSellings$ = function (searchParams) {
1432
- return _this.searchGuidedSellings$(searchParams);
1433
- };
1434
- this.searchGuidedSellings$ = function (searchParams, expression) {
1435
- var params = new i4.HttpParams({ fromObject: Object.assign({}, searchParams) });
1436
- return _this.baseHttpService.api({
1437
- method: 'post',
1438
- url: _this.serviceUrl + "/search",
1439
- params: params,
1440
- body: expression || {},
1441
- });
1442
- };
1443
- this.fetchGuidedSelling$ = function (id) {
1444
- return _this.baseHttpService.api({ url: _this.serviceUrl + "/" + id });
1445
- };
1446
- this.createNewGuidedSelling$ = function (guidedSelling) {
1447
- return _this.baseHttpService.api({
1448
- url: "" + _this.serviceUrl,
1449
- method: 'post',
1450
- body: guidedSelling,
1451
- });
1452
- };
1453
- this.duplicateGuidedSelling$ = function (cloneRequest) {
1454
- return _this.baseHttpService.api({
1455
- url: _this.serviceUrl + "/" + cloneRequest.id + "/clone",
1456
- method: 'post',
1457
- body: cloneRequest,
1458
- });
1459
- };
1460
- this.updateGuidedSelling$ = function (data) {
1461
- return _this.baseHttpService.api({
1462
- url: _this.serviceUrl + "/" + data.id,
1463
- method: 'put',
1464
- body: data,
1465
- });
1466
- };
1467
- this.removeGuidedSelling$ = function (id) {
1468
- return _this.baseHttpService.api({
1469
- url: _this.serviceUrl + "/" + id,
1470
- method: 'delete',
1471
- });
1472
- };
1473
- this.restoreGuidedSelling$ = function (id) {
1474
- return _this.baseHttpService.api({
1475
- url: _this.serviceUrl + "/" + id + "/restore",
1476
- method: 'patch',
1477
- });
1478
- };
1479
- }
1480
- return GuidedSellingsAdminApiService;
1481
- }());
1482
- GuidedSellingsAdminApiService.MAX_RESULTS = 60;
1483
- GuidedSellingsAdminApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: GuidedSellingsAdminApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1484
- GuidedSellingsAdminApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: GuidedSellingsAdminApiService });
1485
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: GuidedSellingsAdminApiService, decorators: [{
1486
- type: i0.Injectable
1487
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
1488
-
1489
- var GuidedSellingApiService = /** @class */ (function () {
1490
- function GuidedSellingApiService(http) {
1491
- this.http = http;
1492
- this.serviceUrl = '/guided-selling';
1493
- }
1494
- GuidedSellingApiService.prototype.searchByName$ = function (name, searchParams) {
1495
- var params = new i4.HttpParams({ fromObject: Object.assign({}, searchParams) });
1496
- var expression = new i1.Expression(undefined, [{ key: 'name', operator: i1.Operator.EQ, value: name }]);
1497
- return this.http.api({
1498
- method: 'post',
1499
- url: this.serviceUrl + "/search",
1500
- params: params,
1501
- body: expression || {},
1502
- });
1503
- };
1504
- return GuidedSellingApiService;
1505
- }());
1506
- GuidedSellingApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: GuidedSellingApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1507
- GuidedSellingApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: GuidedSellingApiService });
1508
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: GuidedSellingApiService, decorators: [{
1509
- type: i0.Injectable
1510
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
1511
-
1512
- var OffersApiService = /** @class */ (function () {
1513
- function OffersApiService(baseHttpService) {
1514
- this.baseHttpService = baseHttpService;
1515
- this.serviceUrl = '/admin/offers';
1516
- }
1517
- OffersApiService.prototype.createOffer$ = function (body) {
1518
- return this.baseHttpService.api({
1519
- url: "" + this.serviceUrl,
1520
- method: 'post',
1521
- body: body,
1522
- });
1523
- };
1524
- OffersApiService.prototype.fetchOffers$ = function () {
1525
- return this.baseHttpService.api({
1526
- url: "" + this.serviceUrl,
1527
- });
1528
- };
1529
- OffersApiService.prototype.fetchOffer$ = function (id) {
1530
- return this.baseHttpService.api({
1531
- url: this.serviceUrl + "/" + id,
1532
- });
1533
- };
1534
- OffersApiService.prototype.updateOffer$ = function (offer) {
1535
- return this.baseHttpService.api({
1536
- url: this.serviceUrl + "/" + offer.id,
1537
- method: 'put',
1538
- body: offer,
1539
- });
1540
- };
1541
- OffersApiService.prototype.removeOffer$ = function (id) {
1542
- return this.baseHttpService.api({
1543
- url: this.serviceUrl + "/" + id,
1544
- method: 'delete',
1545
- });
1546
- };
1547
- OffersApiService.prototype.searchOffers$ = function (expression, skip, count) {
1548
- var params = new i4.HttpParams();
1549
- params = params.set('skip', '' + skip);
1550
- params = params.set('count', '' + count);
1551
- return this.baseHttpService.api({
1552
- method: 'post',
1553
- url: this.serviceUrl + "/search",
1554
- params: params,
1555
- body: expression,
1556
- });
1557
- };
1558
- OffersApiService.prototype.fetchOfferProducts$ = function (id) {
1559
- return this.baseHttpService
1560
- .api({
1561
- url: this.serviceUrl + "/" + id + "/products",
1562
- })
1563
- .pipe(rxjs.map(function (response) { return response.products; }));
1564
- };
1565
- OffersApiService.prototype.upsertOfferProducts$ = function (id, products) {
1566
- var request = { products: products };
1567
- return this.baseHttpService
1568
- .api({
1569
- url: this.serviceUrl + "/" + id + "/products",
1570
- method: 'put',
1571
- body: request,
1572
- })
1573
- .pipe(rxjs.map(function (response) { return response.products; }));
1574
- };
1575
- return OffersApiService;
1576
- }());
1577
- OffersApiService.MAX_RESULTS = 60;
1578
- OffersApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: OffersApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1579
- OffersApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: OffersApiService });
1580
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: OffersApiService, decorators: [{
1581
- type: i0.Injectable
1582
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
1583
-
1584
- var OrgInfoApiService = /** @class */ (function () {
1585
- function OrgInfoApiService(http) {
1586
- var _a;
1587
- this.http = http;
1588
- this.CANVAS_URL_FALLBACK = 'https://canvas.velocpq.com';
1589
- this.hostUrl = (_a = window.VELO_CANVAS_API) !== null && _a !== void 0 ? _a : this.CANVAS_URL_FALLBACK;
1590
- }
1591
- OrgInfoApiService.prototype.getOrgInfo$ = function (organizationId) {
1592
- return this.http.get(this.hostUrl + "/org-info/" + organizationId);
1593
- };
1594
- return OrgInfoApiService;
1595
- }());
1596
- OrgInfoApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: OrgInfoApiService, deps: [{ token: i4__namespace.HttpClient }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1597
- OrgInfoApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: OrgInfoApiService });
1598
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: OrgInfoApiService, decorators: [{
1599
- type: i0.Injectable
1600
- }], ctorParameters: function () { return [{ type: i4__namespace.HttpClient }]; } });
1601
-
1602
- var PicklistsApiService = /** @class */ (function () {
1603
- function PicklistsApiService(baseHttpService) {
1604
- var _this = this;
1605
- this.baseHttpService = baseHttpService;
1606
- this.serviceUrl = '/admin';
1607
- this.fetchAllPicklists$ = function () { return _this.baseHttpService.api({ url: _this.serviceUrl + "/picklists" }); };
1608
- this.fetchPicklist$ = function (code) { return _this.baseHttpService.api({ url: _this.serviceUrl + "/picklists/" + code }); };
1609
- this.createPicklist$ = function (picklist) {
1610
- return _this.baseHttpService.api({ method: 'post', url: _this.serviceUrl + "/picklists", body: picklist });
1611
- };
1612
- this.updatePicklist$ = function (picklist) {
1613
- return _this.baseHttpService.api({
1614
- method: 'put',
1615
- url: _this.serviceUrl + "/picklists/" + picklist.id,
1616
- body: picklist,
1617
- });
1618
- };
1619
- this.removePicklist$ = function (id) { return _this.baseHttpService.api({ method: 'delete', url: _this.serviceUrl + "/picklists/" + id }); };
1620
- this.restorePicklist$ = function (id) {
1621
- return _this.baseHttpService.api({
1622
- url: _this.serviceUrl + "/picklists/" + id + "/restore",
1623
- method: 'patch',
1624
- });
1625
- };
1626
- this.addPicklistValue$ = function (picklist, value) {
1627
- var data = Object.assign(Object.assign({}, picklist), { values: __spreadArray(__spreadArray([], __read(picklist.values)), [value]) });
1628
- return _this.baseHttpService.api({ method: 'put', url: _this.serviceUrl + "/picklists/" + picklist.id, body: data });
1629
- };
1630
- }
1631
- return PicklistsApiService;
1632
- }());
1633
- PicklistsApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: PicklistsApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1634
- PicklistsApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: PicklistsApiService });
1635
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: PicklistsApiService, decorators: [{
1636
- type: i0.Injectable
1637
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
1638
-
1639
- var PriceApiService = /** @class */ (function () {
1640
- function PriceApiService(httpService) {
1641
- this.httpService = httpService;
1642
- this.SERVICE_URL = '/price';
1643
- }
1644
- PriceApiService.prototype.calculate = function (request) {
1645
- return this.httpService.api({
1646
- method: 'post',
1647
- url: this.SERVICE_URL + "/calculate",
1648
- body: request,
1649
- skipErrorHandler: true,
1650
- });
1651
- };
1652
- PriceApiService.prototype.getPriceLists = function () {
1653
- return this.httpService.api({
1654
- method: 'get',
1655
- url: '/price-lists',
1656
- });
1657
- };
1658
- PriceApiService.prototype.getPriceList = function (id) {
1659
- return this.httpService.api({
1660
- method: 'get',
1661
- url: "/price-lists/" + id,
1662
- });
1663
- };
1664
- PriceApiService.prototype.getSellingTermByEndDate = function (planId, offeringId, startDate, endDate, frequencyUnit, frequencyDuration) {
1665
- return this.httpService.api({
1666
- method: 'post',
1667
- url: this.SERVICE_URL + "/selling-term-by-end-date",
1668
- body: {
1669
- planId: planId,
1670
- offeringId: offeringId,
1671
- startDate: startDate,
1672
- endDate: endDate,
1673
- frequencyUnit: frequencyUnit,
1674
- frequencyDuration: frequencyDuration,
1675
- },
1676
- });
1677
- };
1678
- PriceApiService.prototype.getSellingTermByTerm = function (planId, offeringId, startDate, term, frequencyUnit, frequencyDuration) {
1679
- return this.httpService.api({
1680
- method: 'post',
1681
- url: this.SERVICE_URL + "/selling-term-by-term",
1682
- body: {
1683
- planId: planId,
1684
- offeringId: offeringId,
1685
- startDate: startDate,
1686
- term: term,
1687
- frequencyUnit: frequencyUnit,
1688
- frequencyDuration: frequencyDuration,
1689
- },
1690
- });
1691
- };
1692
- return PriceApiService;
1693
- }());
1694
- PriceApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: PriceApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1695
- PriceApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: PriceApiService });
1696
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: PriceApiService, decorators: [{
1697
- type: i0.Injectable
1698
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
1699
-
1700
- var ProceduresApiService = /** @class */ (function () {
1701
- function ProceduresApiService(baseHttpService) {
1702
- var _this = this;
1703
- this.baseHttpService = baseHttpService;
1704
- this.ADMIN_SERVICE_URL = '/admin/procedures';
1705
- this.SERVICE_URL = '/procedures';
1706
- this.fetchProcedures$ = function () {
1707
- return _this.searchProcedures$(new i1.Expression(), 0, 100);
1708
- };
1709
- this.searchProcedures$ = function (expression, skip, count) {
1710
- var params = new i4.HttpParams();
1711
- params = params.set('skip', '' + skip);
1712
- params = params.set('count', '' + count);
1713
- return _this.baseHttpService.api({
1714
- method: 'post',
1715
- url: _this.ADMIN_SERVICE_URL + "/search",
1716
- params: params,
1717
- body: expression,
1718
- });
1719
- };
1720
- this.createProcedure$ = function (newProcedure) {
1721
- return _this.baseHttpService.api({
1722
- url: "" + _this.ADMIN_SERVICE_URL,
1723
- method: 'post',
1724
- body: newProcedure,
1725
- });
1726
- };
1727
- this.updateProcedure$ = function (procedure) {
1728
- return _this.baseHttpService.api({
1729
- url: _this.ADMIN_SERVICE_URL + "/" + procedure.id,
1730
- method: 'put',
1731
- body: procedure,
1732
- });
1733
- };
1734
- this.duplicateProcedure$ = function (body) {
1735
- return _this.baseHttpService
1736
- .api({
1737
- url: _this.ADMIN_SERVICE_URL + "/" + body.id + "/clone",
1738
- method: 'post',
1739
- body: body,
1740
- })
1741
- .pipe(operators.map(function (response) { return response.clonedRecordId; }));
1742
- };
1743
- this.removeProcedure$ = function (id) {
1744
- return _this.baseHttpService.api({
1745
- url: _this.ADMIN_SERVICE_URL + "/" + id,
1746
- method: 'delete',
1747
- });
1748
- };
1749
- this.restoreProcedure$ = function (id) {
1750
- return _this.baseHttpService.api({
1751
- url: _this.ADMIN_SERVICE_URL + "/" + id + "/restore",
1752
- method: 'patch',
1753
- });
1754
- };
1755
- }
1756
- ProceduresApiService.prototype.fetchProcedure$ = function (id) {
1757
- return this.baseHttpService.api({
1758
- url: this.ADMIN_SERVICE_URL + "/" + id,
1759
- method: 'get',
1760
- });
1761
- };
1762
- ProceduresApiService.prototype.execute$ = function (body) {
1763
- return this.baseHttpService.api({
1764
- url: this.SERVICE_URL + "/execute",
1765
- method: 'post',
1766
- body: body,
1767
- });
1768
- };
1769
- /**
1770
- * Run active procedure against QuoteDraft
1771
- * @param body
1772
- * @returns
1773
- */
1774
- ProceduresApiService.prototype.apply$ = function (body) {
1775
- return this.baseHttpService.api({
1776
- url: this.SERVICE_URL + "/apply",
1777
- method: 'post',
1778
- body: body,
1779
- });
1780
- };
1781
- return ProceduresApiService;
1782
- }());
1783
- ProceduresApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ProceduresApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1784
- ProceduresApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ProceduresApiService });
1785
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ProceduresApiService, decorators: [{
1786
- type: i0.Injectable
1787
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
1788
-
1789
- var ProductApiService = /** @class */ (function () {
1790
- function ProductApiService(baseHttpService) {
1791
- var _this = this;
1792
- this.baseHttpService = baseHttpService;
1793
- this.serviceUrl = '/products';
1794
- this.fetchProducts$ = function (payload) {
1795
- var params = new i4.HttpParams();
1796
- params = params.append('count', payload.count);
1797
- params = params.append('skip', payload.skip);
1798
- if (payload.name) {
1799
- params = params.append('name', payload.name);
1800
- }
1801
- return _this.baseHttpService.api({ url: "" + _this.serviceUrl, params: params });
1802
- };
1803
- this.searchProducts$ = function (expression, skip, count) {
1804
- var params = new i4.HttpParams();
1805
- params = params.set('skip', '' + skip);
1806
- params = params.set('count', '' + count);
1807
- return _this.baseHttpService.api({
1808
- method: 'post',
1809
- url: _this.serviceUrl + "/search",
1810
- params: params,
1811
- body: expression,
1812
- });
1813
- };
1814
- this.fetchProduct$ = function (id) { return _this.baseHttpService.api({ url: _this.serviceUrl + "/" + id }); };
1815
- this.fetchAttributes$ = function () {
1816
- return _this.baseHttpService.api({ url: _this.serviceUrl + "/attributes/definition" });
1817
- };
1818
- this.searchAttributes$ = function (expression, skip, count) {
1819
- var params = new i4.HttpParams();
1820
- params = params.set('skip', '' + skip);
1821
- params = params.set('count', '' + count);
1822
- return _this.baseHttpService.api({
1823
- method: 'post',
1824
- url: _this.serviceUrl + "/attributes/definition/search",
1825
- params: params,
1826
- body: expression,
1827
- });
1828
- };
1829
- this.fetchAttributesByModel = function (modelId) {
1830
- return _this.baseHttpService.api({ url: _this.serviceUrl + "/attributes/definition/forModel/" + modelId });
1831
- };
1832
- this.createNewProduct$ = function (productData) {
1833
- return _this.baseHttpService.api({
1834
- url: "" + _this.serviceUrl,
1835
- method: 'post',
1836
- body: productData,
1837
- });
1838
- };
1839
- this.updateProduct$ = function (body) {
1840
- return _this.baseHttpService.api({
1841
- url: _this.serviceUrl + "/" + body.id,
1842
- method: 'put',
1843
- body: body,
1844
- });
1845
- };
1846
- this.removeProduct$ = function (id) {
1847
- return _this.baseHttpService.api({
1848
- url: _this.serviceUrl + "/" + id,
1849
- method: 'delete',
1850
- });
1851
- };
1852
- this.restoreProduct$ = function (id) {
1853
- return _this.baseHttpService.api({
1854
- url: _this.serviceUrl + "/" + id + "/restore",
1855
- method: 'patch',
1856
- });
1857
- };
1858
- this.createProductAttribute$ = function (attributeData) {
1859
- return _this.baseHttpService.api({
1860
- url: _this.serviceUrl + "/attributes",
1861
- method: 'post',
1862
- body: attributeData,
1863
- });
1864
- };
1865
- this.updateProductAttribute$ = function (attributeData) {
1866
- return _this.baseHttpService.api({
1867
- url: _this.serviceUrl + "/attributes/" + attributeData.id,
1868
- method: 'put',
1869
- body: attributeData,
1870
- });
1871
- };
1872
- this.removeProductAttribute$ = function (id) {
1873
- return _this.baseHttpService.api({
1874
- url: _this.serviceUrl + "/attributes/" + id,
1875
- method: 'delete',
1876
- });
1877
- };
1878
- this.createNewAttribute$ = function (attributeData) {
1879
- return _this.baseHttpService.api({
1880
- url: _this.serviceUrl + "/attributes/definition",
1881
- method: 'post',
1882
- body: attributeData,
1883
- });
1884
- };
1885
- this.updateAttribute$ = function (body) {
1886
- return _this.baseHttpService.api({
1887
- url: _this.serviceUrl + "/attributes/definition/" + body.id,
1888
- method: 'put',
1889
- body: body,
1890
- });
1891
- };
1892
- this.removeAttribute$ = function (id) {
1893
- return _this.baseHttpService.api({
1894
- url: _this.serviceUrl + "/attributes/definition/" + id,
1895
- method: 'delete',
1896
- });
1897
- };
1898
- this.restoreAttribute$ = function (id) {
1899
- return _this.baseHttpService.api({
1900
- url: _this.serviceUrl + "/attributes/definition/" + id + "/restore",
1901
- method: 'patch',
1902
- });
1903
- };
1904
- }
1905
- ProductApiService.prototype.attachImage$ = function (productId, file) {
1906
- var data = new FormData();
1907
- data.append('image', file);
1908
- return this.baseHttpService.upload({
1909
- method: 'post',
1910
- url: this.serviceUrl + "/" + productId + "/image",
1911
- body: data,
1912
- });
1913
- };
1914
- ProductApiService.prototype.removeImage$ = function (productId) {
1915
- return this.baseHttpService.api({
1916
- method: 'delete',
1917
- url: this.serviceUrl + "/" + productId + "/image",
1918
- });
1919
- };
1920
- ProductApiService.prototype.fetchImage$ = function (productId) {
1921
- return this.baseHttpService.api({
1922
- url: this.getImageUrl(productId),
1923
- method: 'get',
1924
- responseType: 'blob',
1925
- errorHandler: rxjs.noop,
1926
- });
1927
- };
1928
- ProductApiService.prototype.getImageUrl = function (productId) {
1929
- return this.serviceUrl + "/" + productId + "/image";
1930
- };
1931
- return ProductApiService;
1932
- }());
1933
- ProductApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ProductApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1934
- ProductApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ProductApiService });
1935
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ProductApiService, decorators: [{
1936
- type: i0.Injectable
1937
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
1938
-
1939
- var ProductModelApiService = /** @class */ (function () {
1940
- function ProductModelApiService(httpService) {
1941
- this.httpService = httpService;
1942
- this.SERVICE_URL = '/models';
1943
- }
1944
- ProductModelApiService.prototype.addModel = function (model) {
1945
- return this.httpService
1946
- .api({
1947
- method: 'post',
1948
- url: this.SERVICE_URL,
1949
- body: model,
1950
- errorHandler: this.httpService.handleValidationError,
1951
- })
1952
- .pipe(operators.map(function (result) {
1953
- if (result.successful) {
1954
- return result;
1955
- }
1956
- else {
1957
- throw new Error(result.message);
1958
- }
1959
- }));
1960
- };
1961
- ProductModelApiService.prototype.releaseModel = function (model) {
1962
- return this.httpService
1963
- .api({
1964
- method: 'put',
1965
- url: this.SERVICE_URL + "/" + model.id + "/release",
1966
- body: model,
1967
- errorHandler: this.httpService.handleValidationError,
1968
- })
1969
- .pipe(operators.map(function (result) {
1970
- if (result.successful) {
1971
- return '';
1972
- }
1973
- else {
1974
- throw new Error(result.message);
1975
- }
1976
- }));
1977
- };
1978
- ProductModelApiService.prototype.removeModel = function (modelId, successFn, failureFn) {
1979
- var observable = this.httpService
1980
- .api({
1981
- method: 'delete',
1982
- url: this.SERVICE_URL + "/" + modelId,
1983
- errorHandler: this.httpService.handleValidationError,
1984
- })
1985
- .pipe(operators.map(function (result) {
1986
- if (result.successful) {
1987
- return '';
1988
- }
1989
- else {
1990
- throw new Error(result.message);
1991
- }
1992
- }));
1993
- observable.subscribe(function () {
1994
- successFn && successFn.apply();
1995
- }, function () {
1996
- failureFn && failureFn.apply();
1997
- });
1998
- };
1999
- ProductModelApiService.prototype.getModelVersions = function (modelId, count, skip) {
2000
- if (count === void 0) { count = 100; }
2001
- if (skip === void 0) { skip = 0; }
2002
- return this.httpService.api({
2003
- method: 'post',
2004
- url: this.SERVICE_URL + "/" + modelId + "/versions",
2005
- body: {
2006
- skipCount: skip,
2007
- count: count,
2008
- },
2009
- });
2010
- };
2011
- ProductModelApiService.prototype.getModel = function (id, version) {
2012
- var url = this.SERVICE_URL + "/" + id;
2013
- if (version) {
2014
- url += "/versions/" + version;
2015
- }
2016
- return this.httpService.api({ url: url });
2017
- };
2018
- ProductModelApiService.prototype.getModels = function (skipCount, searchText) {
2019
- return this.httpService.api({
2020
- method: 'post',
2021
- url: this.SERVICE_URL + "/search",
2022
- body: {
2023
- nameRegex: searchText,
2024
- skipCount: skipCount.toString(),
2025
- count: ProductModelApiService.MAX_RESULTS,
2026
- },
2027
- });
2028
- };
2029
- ProductModelApiService.prototype.getLinkedModels = function (id, version) {
2030
- var url = this.SERVICE_URL + "/" + id;
2031
- if (version) {
2032
- url += "/versions/" + version;
2033
- }
2034
- url += '/linked';
2035
- return this.httpService.api({ url: url }).pipe(operators.map(function (linkedModels) {
2036
- if (linkedModels) {
2037
- linkedModels.forEach(function (model) { return i1.ModelTranslatorUtils.toLocalModel(model); });
2038
- }
2039
- return linkedModels;
2040
- }));
2041
- };
2042
- ProductModelApiService.prototype.load = function (id, version) {
2043
- return rxjs.forkJoin([this.getModel(id, version), this.getLinkedModels(id, version)]).pipe(operators.map(function (_a) {
2044
- var _b = __read(_a, 2), model = _b[0], linkedModels = _b[1];
2045
- var container = new i1.ProductModelsContainer(model, linkedModels !== null && linkedModels !== void 0 ? linkedModels : []);
2046
- i1.ModelUtils.override(container.main, container.linked);
2047
- i1.ModelTranslatorUtils.toLocalModel(container.main, container.linked);
2048
- return container;
2049
- }));
2050
- };
2051
- ProductModelApiService.prototype.getPML = function (modelId, version) {
2052
- var url = this.SERVICE_URL + "/" + modelId + "/pml/" + version;
2053
- if (version) {
2054
- url += "/versions/" + version;
2055
- }
2056
- return this.httpService.api({
2057
- url: url,
2058
- responseType: 'text',
2059
- });
2060
- };
2061
- ProductModelApiService.prototype.savePML = function (modelId, pml, comment) {
2062
- return this.httpService
2063
- .api({
2064
- method: 'put',
2065
- url: this.SERVICE_URL + "/" + modelId + "/pml",
2066
- body: {
2067
- id: modelId,
2068
- pml: pml,
2069
- comment: comment,
2070
- },
2071
- })
2072
- .pipe(operators.map(function (result) {
2073
- if (result.successful) {
2074
- return '';
2075
- }
2076
- else {
2077
- throw new Error(result.message);
2078
- }
2079
- }), operators.catchError(this.httpService.handleValidationError));
2080
- };
2081
- ProductModelApiService.prototype.generateProducts = function (modelId) {
2082
- return this.httpService.api({
2083
- url: this.SERVICE_URL + "/" + modelId + "/generate-products",
2084
- });
2085
- };
2086
- ProductModelApiService.prototype.saveModel = function (productModel, comment) {
2087
- var model = i1.EntityUtil.clone(productModel);
2088
- model.comment = comment;
2089
- i1.ModelTranslatorUtils.toServerModel(model);
2090
- return this.httpService
2091
- .api({
2092
- method: 'put',
2093
- url: this.SERVICE_URL + "/" + model.id,
2094
- body: model,
2095
- })
2096
- .pipe(operators.map(function (result) {
2097
- if (result.successful) {
2098
- return '';
2099
- }
2100
- else {
2101
- throw new Error(result.message);
2102
- }
2103
- }), operators.catchError(this.httpService.handleValidationError));
2104
- };
2105
- ProductModelApiService.prototype.validateModel = function (productModel) {
2106
- return this.httpService
2107
- .api({
2108
- method: 'post',
2109
- url: this.SERVICE_URL + "/validate",
2110
- body: productModel,
2111
- errorHandler: this.httpService.handleValidationError,
2112
- })
2113
- .pipe(operators.map(function (result) {
2114
- if (result.successful) {
2115
- return '';
2116
- }
2117
- else {
2118
- throw new Error(result.message);
2119
- }
2120
- }));
2121
- };
2122
- ProductModelApiService.prototype.renameModel = function (productModel, name) {
2123
- var model = i1.EntityUtil.clone(productModel);
2124
- model.name = name;
2125
- i1.ModelTranslatorUtils.toServerModel(model);
2126
- return this.httpService
2127
- .api({
2128
- method: 'patch',
2129
- url: this.SERVICE_URL + "/" + model.id,
2130
- body: model,
2131
- })
2132
- .pipe(operators.catchError(this.httpService.handleValidationError));
2133
- };
2134
- ProductModelApiService.prototype.uploadPmlFile = function (file, modelId) {
2135
- var formData = new FormData();
2136
- formData.append('file', file, file.name);
2137
- return this.httpService.upload({
2138
- url: this.SERVICE_URL + "/" + modelId + "/pml/upload",
2139
- body: formData,
2140
- });
2141
- };
2142
- ProductModelApiService.prototype.runPml = function (modelId, pml, rootType, configurationMode) {
2143
- return this.httpService.api({
2144
- method: 'post',
2145
- url: this.SERVICE_URL + "/" + modelId + "/pml/run",
2146
- body: {
2147
- pml: pml,
2148
- rootType: rootType,
2149
- configurationMode: configurationMode,
2150
- },
2151
- responseType: 'text',
2152
- });
2153
- };
2154
- ProductModelApiService.prototype.evictAllCache = function () {
2155
- return this.httpService.api({
2156
- method: 'get',
2157
- url: '/cache/evict/environment-variables',
2158
- });
2159
- };
2160
- return ProductModelApiService;
2161
- }());
2162
- ProductModelApiService.MAX_RESULTS = 200;
2163
- ProductModelApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ProductModelApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
2164
- ProductModelApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ProductModelApiService });
2165
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ProductModelApiService, decorators: [{
2166
- type: i0.Injectable
2167
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
2168
-
2169
- var QuoteApiService = /** @class */ (function () {
2170
- function QuoteApiService(httpService) {
2171
- this.httpService = httpService;
2172
- this.SERVICE_URL = '/quotes';
2173
- /**
2174
- * @deprecated
2175
- * Will be removed in next major release
2176
- * Use `getQuoteDraft` instead
2177
- */
2178
- // eslint-disable-next-line @typescript-eslint/member-ordering
2179
- this.getQuote = this.getQuoteDraft;
2180
- }
2181
- // request quoteId | accountId | opportunityId | orderId
2182
- QuoteApiService.prototype.getQuoteDraft = function (objectId, params, errorHandler) {
2183
- return this.httpService.api({
2184
- method: 'get',
2185
- url: this.SERVICE_URL + "/" + objectId,
2186
- params: params,
2187
- errorHandler: errorHandler,
2188
- });
2189
- };
2190
- QuoteApiService.prototype.upsertQuote = function (request, options) {
2191
- return this.httpService.api(Object.assign({ method: 'post', url: "" + this.SERVICE_URL, body: request }, options));
2192
- };
2193
- QuoteApiService.prototype.submitQuote = function (request, options) {
2194
- return this.httpService.api(Object.assign({ method: 'post', url: this.SERVICE_URL + "/submit", body: request }, options));
2195
- };
2196
- QuoteApiService.prototype.attachDocument = function (id, documentName, data) {
2197
- var formData = new FormData();
2198
- var blob = new Blob([data]);
2199
- formData.append('file', blob, documentName);
2200
- return this.httpService.upload({
2201
- url: this.SERVICE_URL + "/" + id + "/attach-document",
2202
- responseType: 'arraybuffer',
2203
- method: 'post',
2204
- body: formData,
2205
- });
2206
- };
2207
- return QuoteApiService;
2208
- }());
2209
- QuoteApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: QuoteApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
2210
- QuoteApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: QuoteApiService });
2211
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: QuoteApiService, decorators: [{
2212
- type: i0.Injectable
2213
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
2214
-
2215
- var RampApiService = /** @class */ (function () {
2216
- function RampApiService(httpService) {
2217
- this.httpService = httpService;
2218
- this.SERVICE_URL = '/ramp';
2219
- }
2220
- RampApiService.prototype.next = function (request, options) {
2221
- return this.httpService.api(Object.assign({ method: 'post', url: this.SERVICE_URL + "/next", body: request }, options));
2222
- };
2223
- RampApiService.prototype.renew = function (request, options) {
2224
- return this.httpService.api(Object.assign({ method: 'post', url: this.SERVICE_URL + "/renew", body: request }, options));
2225
- };
2226
- return RampApiService;
2227
- }());
2228
- RampApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RampApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
2229
- RampApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RampApiService });
2230
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RampApiService, decorators: [{
2231
- type: i0.Injectable
2232
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
2233
-
2234
- var RuleGroupsApiService = /** @class */ (function () {
2235
- function RuleGroupsApiService(baseHttpService) {
2236
- var _this = this;
2237
- this.baseHttpService = baseHttpService;
2238
- this.serviceUrl = '/admin/rule-groups';
2239
- this.fetchRuleGroups$ = function () {
2240
- return _this.searchRuleGroups$(new i1.Expression(), 0, 100);
2241
- };
2242
- this.searchRuleGroups$ = function (expression, skip, count) {
2243
- var params = new i4.HttpParams();
2244
- params = params.set('skip', '' + skip);
2245
- params = params.set('count', '' + count);
2246
- return _this.baseHttpService.api({ method: 'post', url: _this.serviceUrl + "/search", params: params, body: expression });
2247
- };
2248
- this.createRuleGroup$ = function (ruleGroup) {
2249
- return _this.baseHttpService.api({
2250
- url: "" + _this.serviceUrl,
2251
- method: 'post',
2252
- body: ruleGroup,
2253
- });
2254
- };
2255
- this.updateRuleGroup$ = function (ruleGroup) {
2256
- return _this.baseHttpService.api({
2257
- url: _this.serviceUrl + "/" + ruleGroup.id,
2258
- method: 'post',
2259
- body: ruleGroup,
2260
- });
2261
- };
2262
- this.duplicateRuleGroup$ = function (body) {
2263
- return _this.baseHttpService
2264
- .api({
2265
- url: _this.serviceUrl + "/" + body.id + "/clone",
2266
- method: 'post',
2267
- body: body,
2268
- })
2269
- .pipe(rxjs.map(function (response) { return response.clonedRecordId; }));
2270
- };
2271
- this.removeRuleGroup$ = function (id) {
2272
- return _this.baseHttpService.api({
2273
- url: _this.serviceUrl + "/" + id,
2274
- method: 'delete',
2275
- });
2276
- };
2277
- this.restoreRuleGroup$ = function (id) {
2278
- return _this.baseHttpService.api({
2279
- url: _this.serviceUrl + "/" + id + "/restore",
2280
- method: 'patch',
2281
- });
2282
- };
2283
- }
2284
- return RuleGroupsApiService;
2285
- }());
2286
- RuleGroupsApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RuleGroupsApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
2287
- RuleGroupsApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RuleGroupsApiService });
2288
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RuleGroupsApiService, decorators: [{
2289
- type: i0.Injectable
2290
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
2291
-
2292
- var RulesApiService = /** @class */ (function () {
2293
- function RulesApiService(baseHttpService) {
2294
- var _this = this;
2295
- this.baseHttpService = baseHttpService;
2296
- this.serviceUrl = '/admin/rules';
2297
- this.fetchRules$ = function () {
2298
- return _this.searchRules$(new i1.Expression(), 0, 100);
2299
- };
2300
- this.searchRules$ = function (expression, skip, count) {
2301
- var params = new i4.HttpParams();
2302
- params = params.set('skip', '' + skip);
2303
- params = params.set('count', '' + count);
2304
- return _this.baseHttpService.api({ method: 'post', url: _this.serviceUrl + "/search", params: params, body: expression });
2305
- };
2306
- this.createRule$ = function (rule) {
2307
- return _this.baseHttpService.api({
2308
- url: "" + _this.serviceUrl,
2309
- method: 'post',
2310
- body: rule,
2311
- });
2312
- };
2313
- this.updateRule$ = function (rule) {
2314
- return _this.baseHttpService.api({
2315
- url: _this.serviceUrl + "/" + rule.id,
2316
- method: 'put',
2317
- body: rule,
2318
- });
2319
- };
2320
- this.duplicateRule$ = function (body) {
2321
- return _this.baseHttpService
2322
- .api({
2323
- url: _this.serviceUrl + "/" + body.id + "/clone",
2324
- method: 'post',
2325
- body: body,
2326
- })
2327
- .pipe(operators.map(function (response) { return response.clonedRecordId; }));
2328
- };
2329
- this.removeRule$ = function (id) {
2330
- return _this.baseHttpService.api({
2331
- url: _this.serviceUrl + "/" + id,
2332
- method: 'delete',
2333
- });
2334
- };
2335
- this.restoreRule$ = function (id) {
2336
- return _this.baseHttpService.api({
2337
- url: _this.serviceUrl + "/" + id + "/restore",
2338
- method: 'patch',
2339
- });
2340
- };
2341
- }
2342
- RulesApiService.prototype.fetchRule$ = function (id) {
2343
- return this.baseHttpService.api({
2344
- url: this.serviceUrl + "/" + id,
2345
- method: 'get',
2346
- });
2347
- };
2348
- RulesApiService.prototype.fetchHeaderFields$ = function () {
2349
- return this.baseHttpService.api({
2350
- url: this.serviceUrl + "/describe/Header",
2351
- method: 'get',
2352
- });
2353
- };
2354
- RulesApiService.prototype.execute$ = function (body) {
2355
- var url = body.rule.ruleGroupType === i1.RuleGroupTypes.eligibility ? '/rules/eligibility/execute' : '/rules/execute';
2356
- return this.baseHttpService.api({
2357
- url: url,
2358
- method: 'post',
2359
- body: body,
2360
- });
2361
- };
2362
- return RulesApiService;
2363
- }());
2364
- RulesApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RulesApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
2365
- RulesApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RulesApiService });
2366
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RulesApiService, decorators: [{
2367
- type: i0.Injectable
2368
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
2369
-
2370
- var ScriptsApiService = /** @class */ (function () {
2371
- function ScriptsApiService(baseHttpService) {
2372
- var _this = this;
2373
- this.baseHttpService = baseHttpService;
2374
- this.serviceUrl = '/admin/scripts';
2375
- this.fetchScripts$ = function () {
2376
- return _this.baseHttpService.api({ url: "" + _this.serviceUrl });
2377
- };
2378
- this.searchScripts$ = function (expression, skip, count) {
2379
- var params = new i4.HttpParams();
2380
- params = params.set('skip', '' + skip);
2381
- params = params.set('count', '' + count);
2382
- return _this.baseHttpService.api({ method: 'post', url: _this.serviceUrl + "/search", params: params, body: expression });
2383
- };
2384
- this.fetchScript$ = function (id) {
2385
- return _this.baseHttpService.api({ url: _this.serviceUrl + "/" + id });
2386
- };
2387
- this.createScript$ = function (script) {
2388
- return _this.baseHttpService.api({
2389
- url: "" + _this.serviceUrl,
2390
- method: 'post',
2391
- body: script,
2392
- });
2393
- };
2394
- this.updateScriptMeta$ = function (script) {
2395
- return _this.baseHttpService.api({
2396
- url: _this.serviceUrl + "/" + script.id,
2397
- method: 'put',
2398
- body: script,
2399
- });
2400
- };
2401
- this.updateScriptDetails$ = function (script) {
2402
- return _this.baseHttpService.api({
2403
- url: _this.serviceUrl + "/" + script.id,
2404
- method: 'put',
2405
- body: script,
2406
- });
2407
- };
2408
- this.cloneScript$ = function (cloneRequest) {
2409
- return _this.baseHttpService.api({
2410
- url: _this.serviceUrl + "/" + cloneRequest.id + "/clone",
2411
- method: 'post',
2412
- body: cloneRequest,
2413
- });
2414
- };
2415
- this.removeScript$ = function (id) {
2416
- return _this.baseHttpService.api({
2417
- url: _this.serviceUrl + "/" + id,
2418
- method: 'delete',
2419
- });
2420
- };
2421
- this.restoreScript$ = function (id) {
2422
- return _this.baseHttpService.api({
2423
- url: _this.serviceUrl + "/" + id + "/restore",
2424
- method: 'patch',
2425
- });
2426
- };
2427
- this.execute$ = function (body) {
2428
- return _this.baseHttpService.api({
2429
- url: "/scripts/execute",
2430
- method: 'post',
2431
- body: body,
2432
- errorHandler: function () { return null; },
2433
- });
2434
- };
2435
- }
2436
- return ScriptsApiService;
2437
- }());
2438
- ScriptsApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ScriptsApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
2439
- ScriptsApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ScriptsApiService });
2440
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ScriptsApiService, decorators: [{
2441
- type: i0.Injectable
2442
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
2443
-
2444
- var ShoppingCartSettingsApiService = /** @class */ (function () {
2445
- function ShoppingCartSettingsApiService(configurationSettingsApiService) {
2446
- this.configurationSettingsApiService = configurationSettingsApiService;
2447
- this.shoppingCartSettingsKey = 'shopping-cart';
2448
- }
2449
- ShoppingCartSettingsApiService.prototype.getSetting = function (id) {
2450
- return this.fetchSettings().pipe(operators.map(function (settings) { return i1.parseJsonSafely(settings === null || settings === void 0 ? void 0 : settings.value, []); }), operators.map(function (settings) { return settings.find(function (setting) { return setting.id == id; }); }));
2451
- };
2452
- ShoppingCartSettingsApiService.prototype.fetchSettings = function () {
2453
- return this.configurationSettingsApiService.fetchSetting(this.shoppingCartSettingsKey, { skipErrorHandler: true });
2454
- };
2455
- ShoppingCartSettingsApiService.prototype.getSettingsMap = function () {
2456
- return this.fetchSettings().pipe(operators.map(function (settings) { return i1.parseJsonSafely(settings === null || settings === void 0 ? void 0 : settings.value, []); }), operators.map(function (settings) { return settings.reduce(function (acc, setting) {
2457
- var _a;
2458
- return Object.assign(Object.assign({}, acc), (_a = {}, _a[setting.id] = setting.properties, _a));
2459
- }, {}); }));
2460
- };
2461
- return ShoppingCartSettingsApiService;
2462
- }());
2463
- ShoppingCartSettingsApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ShoppingCartSettingsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
2464
- ShoppingCartSettingsApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ShoppingCartSettingsApiService });
2465
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ShoppingCartSettingsApiService, decorators: [{
2466
- type: i0.Injectable
2467
- }], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
2468
-
2469
- var fromUIComponentStoryDTO = function (dto, attachments) {
2470
- return {
2471
- id: dto.id,
2472
- name: dto.name,
2473
- uiComponentId: dto.uiComponentId,
2474
- description: dto.description,
2475
- section: attachments.json,
2476
- template: attachments.html,
2477
- script: attachments.js,
2478
- styles: attachments.css,
2479
- };
2480
- };
2481
-
2482
- var UITemplatesApiService = /** @class */ (function () {
2483
- function UITemplatesApiService(baseHttpService) {
2484
- var _this = this;
2485
- this.baseHttpService = baseHttpService;
2486
- this.serviceUrl = '/uitemplates';
2487
- this.fetchTemplates$ = function (name) {
2488
- var params = new i4.HttpParams();
2489
- if (name) {
2490
- params = params.append('name', name);
2491
- }
2492
- return _this.baseHttpService.api({ url: "" + _this.serviceUrl, params: params });
2493
- };
2494
- this.createTemplate$ = function (template) {
2495
- return _this.baseHttpService.api({
2496
- method: 'post',
2497
- url: "" + _this.serviceUrl,
2498
- body: template,
2499
- });
2500
- };
2501
- this.updateTemplate$ = function (template) {
2502
- return _this.baseHttpService.api({
2503
- method: 'put',
2504
- url: _this.serviceUrl + "/" + template.id,
2505
- body: template,
2506
- });
2507
- };
2508
- this.duplicateTemplate$ = function (template, cloneRequest) {
2509
- return _this.baseHttpService
2510
- .api({
2511
- url: _this.serviceUrl + "/" + template.id + "/clone",
2512
- method: 'post',
2513
- body: cloneRequest,
2514
- })
2515
- .pipe(rxjs.map(function (response) { return response.clonedRecordId; }));
2516
- };
2517
- this.removeTemplate$ = function (id) {
2518
- return _this.baseHttpService.api({
2519
- method: 'delete',
2520
- url: _this.serviceUrl + "/" + id,
2521
- });
2522
- };
2523
- this.restoreTemplate$ = function (id) {
2524
- return _this.baseHttpService.api({
2525
- method: 'patch',
2526
- url: _this.serviceUrl + "/" + id,
2527
- });
2528
- };
2529
- this.searchTemplates$ = function (data) {
2530
- return _this.baseHttpService.api({
2531
- method: 'post',
2532
- url: _this.serviceUrl + "/search",
2533
- params: data.params,
2534
- body: data.expression,
2535
- });
2536
- };
2537
- this.fetchComponents$ = function (templateId, name) {
2538
- var params = new i4.HttpParams();
2539
- if (name) {
2540
- params = params.append('name', name);
2541
- }
2542
- return _this.baseHttpService.api({
2543
- url: _this.serviceUrl + "/" + templateId + "/components",
2544
- params: params,
2545
- });
2546
- };
2547
- this.fetchComponent$ = function (templateId, componentId) {
2548
- return _this.baseHttpService.api({
2549
- url: _this.serviceUrl + "/" + templateId + "/components/" + componentId,
2550
- });
2551
- };
2552
- this.createComponent$ = function (component) {
2553
- return _this.baseHttpService.api({
2554
- method: 'post',
2555
- url: _this.serviceUrl + "/" + component.uiTemplateId + "/components",
2556
- body: component,
2557
- });
2558
- };
2559
- this.updateComponent$ = function (component) {
2560
- return _this.baseHttpService.api({
2561
- method: 'put',
2562
- url: _this.serviceUrl + "/" + component.uiTemplateId + "/components/" + component.id,
2563
- body: component,
2564
- });
2565
- };
2566
- this.duplicateComponent$ = function (component, cloneRequest) {
2567
- return _this.baseHttpService
2568
- .api({
2569
- url: _this.serviceUrl + "/" + component.uiTemplateId + "/components/" + component.id + "/clone",
2570
- method: 'post',
2571
- body: cloneRequest,
2572
- })
2573
- .pipe(rxjs.map(function (response) { return response.clonedRecordId; }));
2574
- };
2575
- this.removeComponent$ = function (templateId, componentId) {
2576
- return _this.baseHttpService.api({
2577
- method: 'delete',
2578
- url: _this.serviceUrl + "/" + templateId + "/components/" + componentId,
2579
- });
2580
- };
2581
- this.restoreComponent$ = function (templateId, componentId) {
2582
- return _this.baseHttpService.api({
2583
- method: 'patch',
2584
- url: _this.serviceUrl + "/" + templateId + "/components/" + componentId,
2585
- });
2586
- };
2587
- this.searchComponents$ = function (templateId, data) {
2588
- return _this.baseHttpService.api({
2589
- method: 'post',
2590
- url: _this.serviceUrl + "/" + templateId + "/components/search",
2591
- params: data.params,
2592
- body: data.expression,
2593
- });
2594
- };
2595
- this.fetchStoryAttachment = function (templateId, componentId, storyId, type) {
2596
- return _this.baseHttpService
2597
- .api({
2598
- url: _this.serviceUrl + "/" + templateId + "/components/" + componentId + "/stories/" + storyId + "/attachments/" + type + "/file",
2599
- responseType: 'text',
2600
- errorHandler: rxjs.noop,
2601
- })
2602
- .pipe(rxjs.catchError(function () { return rxjs.of(''); }));
2603
- };
2604
- this.convertToComponentStory$ = function (templateId, componentId, storyDto) {
2605
- return rxjs.forkJoin([
2606
- _this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'html'),
2607
- _this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'js'),
2608
- _this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'css'),
2609
- _this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'json'),
2610
- ]).pipe(rxjs.map(function (_a) {
2611
- var _b = __read(_a, 4), html = _b[0], js = _b[1], css = _b[2], json = _b[3];
2612
- return ({ html: html, js: js, css: css, json: json });
2613
- }), rxjs.map(function (attachments) { return fromUIComponentStoryDTO(storyDto, attachments); }));
2614
- };
2615
- this.fetchStories$ = function (templateId, componentId, name) {
2616
- var params = new i4.HttpParams();
2617
- if (name) {
2618
- params = params.append('name', name);
2619
- }
2620
- return _this.baseHttpService
2621
- .api({
2622
- url: _this.serviceUrl + "/" + templateId + "/components/" + componentId + "/stories",
2623
- params: params,
2624
- })
2625
- .pipe(rxjs.switchMap(function (dtos) {
2626
- if (!dtos.length) {
2627
- return rxjs.of([]);
2628
- }
2629
- return rxjs.forkJoin(dtos.map(function (dto) { return _this.convertToComponentStory$(templateId, componentId, dto); }));
2630
- }));
2631
- };
2632
- this.fetchStory$ = function (templateId, componentId, storyId) {
2633
- return _this.baseHttpService
2634
- .api({
2635
- url: _this.serviceUrl + "/" + templateId + "/components/" + componentId + "/stories/" + storyId,
2636
- })
2637
- .pipe(rxjs.switchMap(function (dto) { return _this.convertToComponentStory$(templateId, componentId, dto); }));
2638
- };
2639
- this.createComponentStory$ = function (templateId, story) {
2640
- return _this.baseHttpService.api({
2641
- method: 'post',
2642
- url: _this.serviceUrl + "/" + templateId + "/components/" + story.uiComponentId + "/stories",
2643
- body: story,
2644
- });
2645
- };
2646
- this.updateComponentStory$ = function (templateId, story) {
2647
- var script = story.script, template = story.template, styles = story.styles, section = story.section, rest = __rest(story, ["script", "template", "styles", "section"]);
2648
- return _this.baseHttpService
2649
- .api({
2650
- method: 'put',
2651
- url: _this.serviceUrl + "/" + templateId + "/components/" + story.uiComponentId + "/stories/" + story.id,
2652
- body: rest,
2653
- })
2654
- .pipe(rxjs.map(function (dto) { return fromUIComponentStoryDTO(dto, { html: template, js: script, css: styles, json: section }); }));
2655
- };
2656
- this.duplicateComponentStory$ = function (story, cloneRequest) {
2657
- return _this.baseHttpService
2658
- .api({
2659
- url: _this.serviceUrl + "/" + story.template + "/components/" + story.uiComponentId + "/stories/" + story.id + "/clone",
2660
- method: 'post',
2661
- body: cloneRequest,
2662
- })
2663
- .pipe(rxjs.map(function (response) { return response.clonedRecordId; }));
2664
- };
2665
- this.deleteComponentStory$ = function (templateId, componentId, storyId) {
2666
- return _this.baseHttpService.api({
2667
- method: 'delete',
2668
- url: _this.serviceUrl + "/" + templateId + "/components/" + componentId + "/stories/" + storyId,
2669
- });
2670
- };
2671
- this.restoreComponentStory$ = function (templateId, componentId, storyId) {
2672
- return _this.baseHttpService.api({
2673
- method: 'patch',
2674
- url: _this.serviceUrl + "/" + templateId + "/components/" + componentId + "/stories/" + storyId,
2675
- });
2676
- };
2677
- this.uploadStoryAttachments$ = function (templateId, componentId, storyId, attachments) {
2678
- var formData = new FormData();
2679
- if (attachments.html != null) {
2680
- formData.append('html', new Blob([attachments.html]), 'story-template.html');
2681
- }
2682
- if (attachments.css != null) {
2683
- formData.append('css', new Blob([attachments.css]), 'story-styles.css');
2684
- }
2685
- if (attachments.js != null) {
2686
- formData.append('js', new Blob([attachments.js]), 'story-script.js');
2687
- }
2688
- if (attachments.json != null) {
2689
- formData.append('json', new Blob([attachments.json]), 'story-section.json');
2690
- }
2691
- return _this.baseHttpService.upload({
2692
- method: 'post',
2693
- url: _this.serviceUrl + "/" + templateId + "/components/" + componentId + "/stories/" + storyId + "/attachments",
2694
- body: formData,
2695
- });
2696
- };
2697
- this.fetchComponentAttachments$ = function (templateId, component) {
2698
- return rxjs.forkJoin([
2699
- _this.fetchComponentAttachmentFile$(templateId, component.id, 'html'),
2700
- _this.fetchComponentAttachmentFile$(templateId, component.id, 'js'),
2701
- _this.fetchComponentAttachmentFile$(templateId, component.id, 'css'),
2702
- _this.fetchComponentAttachmentFile$(templateId, component.id, 'json'),
2703
- ]).pipe(rxjs.map(function (_a) {
2704
- var _b = __read(_a, 4), html = _b[0], js = _b[1], css = _b[2], json = _b[3];
2705
- return ({ html: html, js: js, css: css, json: json });
2706
- }));
2707
- };
2708
- this.fetchComponentAttachmentFile$ = function (templateId, componentId, attachmentType) {
2709
- return _this.baseHttpService
2710
- .api({
2711
- method: 'get',
2712
- url: _this.serviceUrl + "/" + templateId + "/components/" + componentId + "/attachments/" + attachmentType + "/file",
2713
- responseType: 'text',
2714
- errorHandler: rxjs.noop,
2715
- })
2716
- .pipe(rxjs.catchError(function () { return rxjs.of(''); }));
2717
- };
2718
- this.uploadComponentAttachments$ = function (templateId, componentId, attachments) {
2719
- var formData = new FormData();
2720
- if (attachments.html != null) {
2721
- formData.append('html', new Blob([attachments.html]), 'template.html');
2722
- }
2723
- if (attachments.css != null) {
2724
- formData.append('css', new Blob([attachments.css]), 'styles.css');
2725
- }
2726
- if (attachments.js != null) {
2727
- formData.append('js', new Blob([attachments.js]), 'script.js');
2728
- }
2729
- if (attachments.json != null) {
2730
- formData.append('json', new Blob([attachments.json]), 'section.json');
2731
- }
2732
- return _this.baseHttpService.upload({
2733
- method: 'post',
2734
- url: _this.serviceUrl + "/" + templateId + "/components/" + componentId + "/attachments",
2735
- body: formData,
2736
- });
2737
- };
2738
- }
2739
- UITemplatesApiService.prototype.getTemplateThumbnailUrl = function (templateId) {
2740
- return this.serviceUrl + "/" + templateId + "/thumbnail/file";
2741
- };
2742
- UITemplatesApiService.prototype.attachTemplateThumbnail$ = function (templateId, file) {
2743
- var data = new FormData();
2744
- data.append('thumb', file);
2745
- return this.baseHttpService.upload({
2746
- method: 'post',
2747
- url: this.serviceUrl + "/" + templateId + "/thumbnail",
2748
- body: data,
2749
- });
2750
- };
2751
- UITemplatesApiService.prototype.removeTemplateThumbnail$ = function (templateId) {
2752
- return this.baseHttpService.api({
2753
- method: 'delete',
2754
- url: this.serviceUrl + "/" + templateId + "/thumbnail",
2755
- });
2756
- };
2757
- return UITemplatesApiService;
2758
- }());
2759
- UITemplatesApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: UITemplatesApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
2760
- UITemplatesApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: UITemplatesApiService });
2761
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: UITemplatesApiService, decorators: [{
2762
- type: i0.Injectable
2763
- }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
2764
-
2765
- var ApiModule = /** @class */ (function () {
2766
- function ApiModule() {
2767
- }
2768
- return ApiModule;
2769
- }());
2770
- ApiModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ApiModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2771
- ApiModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ApiModule, imports: [i4.HttpClientModule] });
2772
- ApiModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ApiModule, providers: [
2773
- i1.BaseHttpService,
2774
- i1.XrayService,
2775
- ConfigurationApiService,
2776
- ConfigurationSettingsApiService,
2777
- ContextApiService,
2778
- DocumentAttachmentApiService,
2779
- PriceApiService,
2780
- ProductModelApiService,
2781
- ProceduresApiService,
2782
- QuoteApiService,
2783
- DocumentTemplatesApiService,
2784
- RampApiService,
2785
- SalesforceApiService,
2786
- UITemplatesApiService,
2787
- ScriptsApiService,
2788
- RulesApiService,
2789
- RuleGroupsApiService,
2790
- FlowsApiService,
2791
- GuidedSellingsAdminApiService,
2792
- ShoppingCartSettingsApiService,
2793
- ProductApiService,
2794
- CatalogAdminApiService,
2795
- GuidedSellingApiService,
2796
- CatalogApiService,
2797
- DeltaApiService,
2798
- AccountApiService,
2799
- PicklistsApiService,
2800
- EndpointsApiService,
2801
- OrgInfoApiService,
2802
- OffersApiService,
2803
- ], imports: [[i4.HttpClientModule]] });
2804
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ApiModule, decorators: [{
2805
- type: i0.NgModule,
2806
- args: [{
2807
- imports: [i4.HttpClientModule],
2808
- providers: [
2809
- i1.BaseHttpService,
2810
- i1.XrayService,
2811
- ConfigurationApiService,
2812
- ConfigurationSettingsApiService,
2813
- ContextApiService,
2814
- DocumentAttachmentApiService,
2815
- PriceApiService,
2816
- ProductModelApiService,
2817
- ProceduresApiService,
2818
- QuoteApiService,
2819
- DocumentTemplatesApiService,
2820
- RampApiService,
2821
- SalesforceApiService,
2822
- UITemplatesApiService,
2823
- ScriptsApiService,
2824
- RulesApiService,
2825
- RuleGroupsApiService,
2826
- FlowsApiService,
2827
- GuidedSellingsAdminApiService,
2828
- ShoppingCartSettingsApiService,
2829
- ProductApiService,
2830
- CatalogAdminApiService,
2831
- GuidedSellingApiService,
2832
- CatalogApiService,
2833
- DeltaApiService,
2834
- AccountApiService,
2835
- PicklistsApiService,
2836
- EndpointsApiService,
2837
- OrgInfoApiService,
2838
- OffersApiService,
2839
- ],
2840
- }]
2841
- }] });
2842
-
2843
- /**
2844
- * Generated bundle index. Do not edit.
2845
- */
2846
-
2847
- exports.AccountApiService = AccountApiService;
2848
- exports.ApiModule = ApiModule;
2849
- exports.CatalogAdminApiService = CatalogAdminApiService;
2850
- exports.CatalogApiService = CatalogApiService;
2851
- exports.ConfigurationApiService = ConfigurationApiService;
2852
- exports.ConfigurationSettingsApiService = ConfigurationSettingsApiService;
2853
- exports.ContextApiService = ContextApiService;
2854
- exports.DeltaApiService = DeltaApiService;
2855
- exports.DocumentAttachmentApiService = DocumentAttachmentApiService;
2856
- exports.DocumentTemplatesApiService = DocumentTemplatesApiService;
2857
- exports.EndpointsApiService = EndpointsApiService;
2858
- exports.FlowsApiService = FlowsApiService;
2859
- exports.GuidedSellingApiService = GuidedSellingApiService;
2860
- exports.GuidedSellingsAdminApiService = GuidedSellingsAdminApiService;
2861
- exports.OffersApiService = OffersApiService;
2862
- exports.OrgInfoApiService = OrgInfoApiService;
2863
- exports.PicklistsApiService = PicklistsApiService;
2864
- exports.PriceApiService = PriceApiService;
2865
- exports.ProceduresApiService = ProceduresApiService;
2866
- exports.ProductApiService = ProductApiService;
2867
- exports.ProductModelApiService = ProductModelApiService;
2868
- exports.QuoteApiService = QuoteApiService;
2869
- exports.RampApiService = RampApiService;
2870
- exports.RuleGroupsApiService = RuleGroupsApiService;
2871
- exports.RulesApiService = RulesApiService;
2872
- exports.SalesforceApiService = SalesforceApiService;
2873
- exports.ScriptsApiService = ScriptsApiService;
2874
- exports.ShoppingCartSettingsApiService = ShoppingCartSettingsApiService;
2875
- exports.UITemplatesApiService = UITemplatesApiService;
2876
-
2877
- Object.defineProperty(exports, '__esModule', { value: true });
2878
-
2879
- }));
2880
- //# sourceMappingURL=veloceapps-api.umd.js.map