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