@veloceapps/api 11.0.0-28 → 11.0.0-29
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 -10
- package/esm2020/src/lib/api.module.mjs +1 -28
- package/esm2020/v2/api-v2.module.mjs +36 -20
- package/esm2020/v2/services/cache-api.service.mjs +22 -0
- package/esm2020/v2/services/configuration-processors-api.service.mjs +2 -2
- package/esm2020/v2/services/configuration-settings-api.service.mjs +89 -0
- package/esm2020/v2/services/context-definition-admin-api.service.mjs +65 -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/function-groups-admin-api.service.mjs +62 -0
- package/esm2020/v2/services/functions-admin-api.service.mjs +97 -0
- package/esm2020/v2/services/index.mjs +18 -10
- 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 +29 -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 +2 -2
- package/esm2020/v2/services/salesforce-api.service.mjs +83 -0
- package/esm2020/v2/services/scripts-admin-api.service.mjs +10 -2
- package/esm2020/v2/services/shopping-cart-settings-api.service.mjs +28 -0
- package/esm2020/v2/services/ui-definitions-admin-api.service.mjs +68 -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/dto/configuration-settings-dto.types.mjs +22 -0
- package/esm2020/v2/types/index.mjs +2 -1
- package/esm2020/v2/types/pcm.types.mjs +2 -0
- package/esm2020/v2/types/search-request.types.mjs +2 -0
- package/fesm2015/veloceapps-api-v2.mjs +647 -189
- package/fesm2015/veloceapps-api-v2.mjs.map +1 -1
- package/fesm2015/veloceapps-api.mjs +16 -585
- package/fesm2015/veloceapps-api.mjs.map +1 -1
- package/fesm2020/veloceapps-api-v2.mjs +706 -192
- package/fesm2020/veloceapps-api-v2.mjs.map +1 -1
- package/fesm2020/veloceapps-api.mjs +16 -641
- package/fesm2020/veloceapps-api.mjs.map +1 -1
- package/package.json +1 -1
- package/src/index.d.ts +0 -9
- package/v2/services/cache-api.service.d.ts +11 -0
- 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} +3 -3
- package/{src/lib/services/endpoints-api.service.d.ts → v2/services/endpoints-admin-api.service.d.ts} +3 -4
- package/v2/services/function-groups-admin-api.service.d.ts +18 -0
- package/v2/services/functions-admin-api.service.d.ts +22 -0
- package/v2/services/index.d.ts +17 -9
- package/v2/services/orchestrations-admin-api.service.d.ts +21 -0
- package/v2/services/orchestrations-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/scripts-admin-api.service.d.ts +2 -1
- package/v2/services/{ui-definitions-api.service.d.ts → ui-definitions-admin-api.service.d.ts} +3 -3
- 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/index.d.ts +1 -0
- package/v2/types/search-request.types.d.ts +8 -0
- package/esm2020/src/lib/services/configuration-settings-api.service.mjs +0 -96
- 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/pcm-api.service.mjs +0 -29
- package/esm2020/src/lib/services/picklists-api.service.mjs +0 -41
- package/esm2020/src/lib/services/product-api.service.mjs +0 -153
- package/esm2020/src/lib/services/salesforce-api.service.mjs +0 -83
- 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/dto/configuration-settings-dto.types.mjs +0 -22
- package/esm2020/src/lib/types/pcm.types.mjs +0 -2
- package/esm2020/v2/services/context-definition-api.service.mjs +0 -65
- 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 -95
- package/esm2020/v2/services/rules-api.service.mjs +0 -36
- package/esm2020/v2/services/scripts-api.service.mjs +0 -23
- package/esm2020/v2/services/ui-definitions-api.service.mjs +0 -68
- package/esm2020/v2/services/ui-templates-api.service.mjs +0 -286
- package/src/lib/services/product-api.service.d.ts +0 -31
- 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-api.service.d.ts +0 -11
- /package/{src/lib → v2}/services/flows-api.service.d.ts +0 -0
- /package/{src/lib → v2}/services/pcm-api.service.d.ts +0 -0
- /package/{src/lib → v2}/services/salesforce-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/dto/configuration-settings-dto.types.d.ts +0 -0
- /package/{src/lib → v2}/types/pcm.types.d.ts +0 -0
@@ -1,15 +1,35 @@
|
|
1
|
-
import { HttpParams, HttpClientModule } from '@angular/common/http';
|
1
|
+
import { HttpErrorResponse, HttpParams, HttpClientModule } from '@angular/common/http';
|
2
2
|
import * as i0 from '@angular/core';
|
3
3
|
import { Injectable, NgModule } from '@angular/core';
|
4
4
|
import * as i1 from '@veloceapps/core';
|
5
|
-
import { Expression, RuleGroupTypes, parseJsonStringAsObject, BaseHttpService, XrayService } from '@veloceapps/core';
|
6
|
-
import { of, map as map$1, noop, catchError as catchError$1, forkJoin, switchMap } from 'rxjs';
|
7
|
-
import {
|
5
|
+
import { Expression, RuleGroupTypes, parseJsonSafely, parseJsonStringAsObject, BaseHttpService, XrayService } from '@veloceapps/core';
|
6
|
+
import { of, map as map$1, tap, noop, catchError as catchError$1, forkJoin, switchMap } from 'rxjs';
|
7
|
+
import { map, catchError } 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 = '/services/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 }]; } });
|
8
28
|
|
9
29
|
class ConfigurationProcessorsApiService {
|
10
30
|
constructor(baseHttpService) {
|
11
31
|
this.baseHttpService = baseHttpService;
|
12
|
-
this.serviceUrl = '/v2/configuration/processors/owners';
|
32
|
+
this.serviceUrl = '/services/v2/configuration/processors/owners';
|
13
33
|
this.fetchConfigurationProcessors$ = (ownerId) => {
|
14
34
|
return this.baseHttpService.api({ url: `${this.serviceUrl}/${ownerId}` });
|
15
35
|
};
|
@@ -41,10 +61,113 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
41
61
|
type: Injectable
|
42
62
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
43
63
|
|
44
|
-
class
|
64
|
+
class ConfigurationSettingsDTO {
|
65
|
+
static fromDTO(dto, key) {
|
66
|
+
return {
|
67
|
+
id: dto?.id,
|
68
|
+
key: dto?.key || key || '',
|
69
|
+
value: dto?.value,
|
70
|
+
};
|
71
|
+
}
|
72
|
+
static toDTO(data) {
|
73
|
+
return {
|
74
|
+
id: data.id,
|
75
|
+
key: data.key,
|
76
|
+
value: data.value,
|
77
|
+
};
|
78
|
+
}
|
79
|
+
constructor(id, key, value) {
|
80
|
+
this.id = id;
|
81
|
+
this.key = key;
|
82
|
+
this.value = value;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
class ConfigurationSettingsApiService {
|
87
|
+
constructor(httpService, messageService) {
|
88
|
+
this.httpService = httpService;
|
89
|
+
this.messageService = messageService;
|
90
|
+
this.SERVICE_URL = '/services/v2/settings';
|
91
|
+
}
|
92
|
+
fetchSettings(options) {
|
93
|
+
return this.httpService
|
94
|
+
.api({
|
95
|
+
url: `${this.SERVICE_URL}`,
|
96
|
+
method: 'get',
|
97
|
+
...options,
|
98
|
+
})
|
99
|
+
.pipe(map((settings) => settings.map(setting => ConfigurationSettingsDTO.fromDTO(setting))));
|
100
|
+
}
|
101
|
+
fetchSetting(settingsKey, options) {
|
102
|
+
return this.httpService
|
103
|
+
.api({
|
104
|
+
url: `${this.SERVICE_URL}/byKey/${settingsKey}`,
|
105
|
+
method: 'get',
|
106
|
+
...options,
|
107
|
+
skipErrorHandler: true,
|
108
|
+
})
|
109
|
+
.pipe(map((setting) => ConfigurationSettingsDTO.fromDTO(setting, settingsKey)), catchError(err => {
|
110
|
+
if (err instanceof HttpErrorResponse && err.status === 404) {
|
111
|
+
if (!options?.skipErrorHandler) {
|
112
|
+
this.messageService.add({
|
113
|
+
severity: 'error',
|
114
|
+
summary: `Configuration Setting "${settingsKey}" is not found`,
|
115
|
+
sticky: true,
|
116
|
+
});
|
117
|
+
}
|
118
|
+
return of(null);
|
119
|
+
}
|
120
|
+
throw err;
|
121
|
+
}));
|
122
|
+
}
|
123
|
+
createSetting(setting, options) {
|
124
|
+
const request = ConfigurationSettingsDTO.toDTO(setting);
|
125
|
+
return this.httpService.api({
|
126
|
+
url: `${this.SERVICE_URL}`,
|
127
|
+
method: 'post',
|
128
|
+
body: {
|
129
|
+
...request,
|
130
|
+
},
|
131
|
+
...options,
|
132
|
+
});
|
133
|
+
}
|
134
|
+
updateSetting(setting, options) {
|
135
|
+
const request = ConfigurationSettingsDTO.toDTO(setting);
|
136
|
+
return this.httpService.api({
|
137
|
+
url: `${this.SERVICE_URL}/${request.id}`,
|
138
|
+
method: 'put',
|
139
|
+
body: {
|
140
|
+
...request,
|
141
|
+
},
|
142
|
+
...options,
|
143
|
+
});
|
144
|
+
}
|
145
|
+
removeSetting(setting, options) {
|
146
|
+
const request = ConfigurationSettingsDTO.toDTO(setting);
|
147
|
+
return this.httpService.api({
|
148
|
+
url: `${this.SERVICE_URL}/${request.id}`,
|
149
|
+
method: 'delete',
|
150
|
+
...options,
|
151
|
+
});
|
152
|
+
}
|
153
|
+
restoreSetting(settingId, options) {
|
154
|
+
return this.httpService.api({
|
155
|
+
url: `${this.SERVICE_URL}/${settingId}/restore`,
|
156
|
+
method: 'patch',
|
157
|
+
...options,
|
158
|
+
});
|
159
|
+
}
|
160
|
+
}
|
161
|
+
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 });
|
162
|
+
ConfigurationSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService });
|
163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService, decorators: [{
|
164
|
+
type: Injectable
|
165
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i2.MessageService }]; } });
|
166
|
+
|
167
|
+
class ContextDefinitionAdminApiService {
|
45
168
|
constructor(baseHttpService) {
|
46
169
|
this.baseHttpService = baseHttpService;
|
47
|
-
this.serviceUrl = '/v2/context-definition';
|
170
|
+
this.serviceUrl = '/admin/v2/context-definition';
|
48
171
|
}
|
49
172
|
fetchContextDefinitions$() {
|
50
173
|
return this.baseHttpService.api({ url: `${this.serviceUrl}`, skipErrorHandler: true }).pipe(catchError(() => {
|
@@ -95,157 +218,139 @@ class ContextDefinitionApiService {
|
|
95
218
|
});
|
96
219
|
}
|
97
220
|
}
|
98
|
-
|
99
|
-
|
100
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type:
|
221
|
+
ContextDefinitionAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextDefinitionAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
222
|
+
ContextDefinitionAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextDefinitionAdminApiService });
|
223
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextDefinitionAdminApiService, decorators: [{
|
101
224
|
type: Injectable
|
102
225
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
103
226
|
|
104
|
-
class
|
227
|
+
class EndpointsAdminApiService {
|
105
228
|
constructor(baseHttpService) {
|
106
229
|
this.baseHttpService = baseHttpService;
|
107
|
-
this.
|
108
|
-
this.fetchProcedures$ = () => {
|
109
|
-
return this.searchProcedures$(new Expression(), 0, 100);
|
110
|
-
};
|
111
|
-
this.searchProcedures$ = (expression, skip, count) => {
|
112
|
-
let params = new HttpParams();
|
113
|
-
params = params.set('skip', '' + skip);
|
114
|
-
params = params.set('count', '' + count);
|
115
|
-
return this.baseHttpService.api({
|
116
|
-
method: 'post',
|
117
|
-
url: `${this.SERVICE_URL}/search`,
|
118
|
-
params,
|
119
|
-
body: expression,
|
120
|
-
});
|
121
|
-
};
|
122
|
-
this.createProcedure$ = (newProcedure) => {
|
123
|
-
return this.baseHttpService.api({
|
124
|
-
url: `${this.SERVICE_URL}`,
|
125
|
-
method: 'post',
|
126
|
-
body: newProcedure,
|
127
|
-
});
|
128
|
-
};
|
129
|
-
this.updateProcedure$ = (procedure) => {
|
130
|
-
return this.baseHttpService.api({
|
131
|
-
url: `${this.SERVICE_URL}/${procedure.id}`,
|
132
|
-
method: 'put',
|
133
|
-
body: procedure,
|
134
|
-
});
|
135
|
-
};
|
136
|
-
this.duplicateProcedure$ = (body) => {
|
137
|
-
return this.baseHttpService
|
138
|
-
.api({
|
139
|
-
url: `${this.SERVICE_URL}/${body.id}/clone`,
|
140
|
-
method: 'post',
|
141
|
-
body,
|
142
|
-
})
|
143
|
-
.pipe(map$1(response => response.clonedRecordId));
|
144
|
-
};
|
145
|
-
this.removeProcedure$ = (id) => {
|
146
|
-
return this.baseHttpService.api({
|
147
|
-
url: `${this.SERVICE_URL}/${id}`,
|
148
|
-
method: 'delete',
|
149
|
-
});
|
150
|
-
};
|
151
|
-
this.restoreProcedure$ = (id) => {
|
152
|
-
return this.baseHttpService.api({
|
153
|
-
url: `${this.SERVICE_URL}/${id}/restore`,
|
154
|
-
method: 'patch',
|
155
|
-
});
|
156
|
-
};
|
230
|
+
this.serviceUrl = '/admin/v2/api-endpoints';
|
157
231
|
}
|
158
|
-
|
232
|
+
fetchEndpoints$() {
|
233
|
+
return this.searchEndpoints$(new Expression(), 0, -1);
|
234
|
+
}
|
235
|
+
searchEndpoints$(expression, skip, count) {
|
236
|
+
let params = new HttpParams();
|
237
|
+
params = params.set('skip', '' + skip);
|
238
|
+
params = params.set('count', '' + count);
|
159
239
|
return this.baseHttpService.api({
|
160
|
-
|
161
|
-
|
240
|
+
method: 'post',
|
241
|
+
url: `${this.serviceUrl}/search`,
|
242
|
+
params,
|
243
|
+
body: expression,
|
162
244
|
});
|
163
245
|
}
|
164
|
-
|
165
|
-
* @deprecated
|
166
|
-
*/
|
167
|
-
fetchDefaultPricingSteps$() {
|
246
|
+
removeEndpoint$(id) {
|
168
247
|
return this.baseHttpService.api({
|
169
|
-
url:
|
170
|
-
method: '
|
248
|
+
url: `${this.serviceUrl}/${id}`,
|
249
|
+
method: 'delete',
|
171
250
|
});
|
172
251
|
}
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
179
|
-
|
180
|
-
class ProceduresApiService {
|
181
|
-
constructor(baseHttpService) {
|
182
|
-
this.baseHttpService = baseHttpService;
|
183
|
-
this.SERVICE_URL = '/v2/procedures';
|
252
|
+
restoreEndpoint$(id) {
|
253
|
+
return this.baseHttpService.api({
|
254
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
255
|
+
method: 'patch',
|
256
|
+
});
|
184
257
|
}
|
185
|
-
|
258
|
+
fetchEndpoint$(id) {
|
186
259
|
return this.baseHttpService.api({
|
187
|
-
url: `${this.
|
188
|
-
method: '
|
189
|
-
body: request,
|
190
|
-
...options,
|
260
|
+
url: `${this.serviceUrl}/${id}`,
|
261
|
+
method: 'get',
|
191
262
|
});
|
192
263
|
}
|
193
|
-
|
264
|
+
createEndpoint$(body) {
|
194
265
|
return this.baseHttpService.api({
|
195
|
-
url: `${this.
|
266
|
+
url: `${this.serviceUrl}`,
|
196
267
|
method: 'post',
|
197
268
|
body,
|
198
269
|
});
|
199
270
|
}
|
200
|
-
|
271
|
+
updateEndpoint$(body) {
|
201
272
|
return this.baseHttpService.api({
|
202
|
-
url: `${this.
|
203
|
-
method: '
|
273
|
+
url: `${this.serviceUrl}/${body.id}`,
|
274
|
+
method: 'put',
|
204
275
|
body,
|
205
276
|
});
|
206
277
|
}
|
207
|
-
|
278
|
+
duplicateEndpoint$(cloneRequest) {
|
279
|
+
return this.baseHttpService.api({
|
280
|
+
url: `${this.serviceUrl}/${cloneRequest.id}/clone`,
|
281
|
+
method: 'post',
|
282
|
+
body: cloneRequest,
|
283
|
+
});
|
284
|
+
}
|
285
|
+
executeEndpoint$(body) {
|
208
286
|
return this.baseHttpService.api({
|
209
|
-
url: `${this.
|
287
|
+
url: `${this.serviceUrl}/execute`,
|
210
288
|
method: 'post',
|
211
289
|
body,
|
290
|
+
responseType: 'text',
|
291
|
+
skipErrorHandler: true,
|
212
292
|
});
|
213
293
|
}
|
214
294
|
}
|
215
|
-
|
216
|
-
|
217
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type:
|
295
|
+
EndpointsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
296
|
+
EndpointsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsAdminApiService });
|
297
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsAdminApiService, decorators: [{
|
218
298
|
type: Injectable
|
219
299
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
220
300
|
|
221
|
-
class
|
301
|
+
class FlowsApiService {
|
302
|
+
constructor(configurationSettingsApiService) {
|
303
|
+
this.configurationSettingsApiService = configurationSettingsApiService;
|
304
|
+
this.flowsKey = 'flows';
|
305
|
+
}
|
306
|
+
getFlow(id) {
|
307
|
+
return this.fetchFlows().pipe(map(flows => flows.find(flow => flow.id == id)), map(flow => {
|
308
|
+
if (!flow) {
|
309
|
+
throw new Error(`Flow with flowId=${id} is not defined`);
|
310
|
+
}
|
311
|
+
return flow;
|
312
|
+
}));
|
313
|
+
}
|
314
|
+
fetchFlows() {
|
315
|
+
return this.configurationSettingsApiService
|
316
|
+
.fetchSetting(this.flowsKey)
|
317
|
+
.pipe(map((setting) => (setting?.value ? JSON.parse(setting.value) : [])));
|
318
|
+
}
|
319
|
+
}
|
320
|
+
FlowsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
321
|
+
FlowsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService });
|
322
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, decorators: [{
|
323
|
+
type: Injectable
|
324
|
+
}], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
|
325
|
+
|
326
|
+
class FunctionGroupsAdminApiService {
|
222
327
|
constructor(baseHttpService) {
|
223
328
|
this.baseHttpService = baseHttpService;
|
224
|
-
this.serviceUrl = '/v2/
|
225
|
-
this.
|
226
|
-
return this.
|
329
|
+
this.serviceUrl = '/admin/v2/functions/groups';
|
330
|
+
this.fetchAll$ = () => {
|
331
|
+
return this.search$(new Expression(), 0, 100);
|
227
332
|
};
|
228
|
-
this.
|
333
|
+
this.search$ = (expression, skip, count) => {
|
229
334
|
let params = new HttpParams();
|
230
335
|
params = params.set('skip', '' + skip);
|
231
336
|
params = params.set('count', '' + count);
|
232
337
|
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
233
338
|
};
|
234
|
-
this.
|
339
|
+
this.create$ = (ruleGroup) => {
|
235
340
|
return this.baseHttpService.api({
|
236
341
|
url: `${this.serviceUrl}`,
|
237
342
|
method: 'post',
|
238
343
|
body: ruleGroup,
|
239
344
|
});
|
240
345
|
};
|
241
|
-
this.
|
346
|
+
this.update$ = (ruleGroup) => {
|
242
347
|
return this.baseHttpService.api({
|
243
348
|
url: `${this.serviceUrl}/${ruleGroup.id}`,
|
244
349
|
method: 'post',
|
245
350
|
body: ruleGroup,
|
246
351
|
});
|
247
352
|
};
|
248
|
-
this.
|
353
|
+
this.duplicate$ = (body) => {
|
249
354
|
return this.baseHttpService
|
250
355
|
.api({
|
251
356
|
url: `${this.serviceUrl}/${body.id}/clone`,
|
@@ -254,13 +359,13 @@ class RuleGroupsAdminApiService {
|
|
254
359
|
})
|
255
360
|
.pipe(map$1(response => response.clonedRecordId));
|
256
361
|
};
|
257
|
-
this.
|
362
|
+
this.remove$ = (id) => {
|
258
363
|
return this.baseHttpService.api({
|
259
364
|
url: `${this.serviceUrl}/${id}`,
|
260
365
|
method: 'delete',
|
261
366
|
});
|
262
367
|
};
|
263
|
-
this.
|
368
|
+
this.restore$ = (id) => {
|
264
369
|
return this.baseHttpService.api({
|
265
370
|
url: `${this.serviceUrl}/${id}/restore`,
|
266
371
|
method: 'patch',
|
@@ -268,20 +373,20 @@ class RuleGroupsAdminApiService {
|
|
268
373
|
};
|
269
374
|
}
|
270
375
|
}
|
271
|
-
|
272
|
-
|
273
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type:
|
376
|
+
FunctionGroupsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FunctionGroupsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
377
|
+
FunctionGroupsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FunctionGroupsAdminApiService });
|
378
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FunctionGroupsAdminApiService, decorators: [{
|
274
379
|
type: Injectable
|
275
380
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
276
381
|
|
277
|
-
class
|
382
|
+
class FunctionsAdminApiService {
|
278
383
|
constructor(baseHttpService) {
|
279
384
|
this.baseHttpService = baseHttpService;
|
280
|
-
this.serviceUrl = '/v2/
|
281
|
-
this.
|
282
|
-
return this.
|
385
|
+
this.serviceUrl = '/admin/v2/functions/rules';
|
386
|
+
this.fetchAll$ = () => {
|
387
|
+
return this.search$(new Expression(), 0, 100);
|
283
388
|
};
|
284
|
-
this.
|
389
|
+
this.search$ = (expression, skip, count) => {
|
285
390
|
let params = new HttpParams();
|
286
391
|
if (typeof skip === 'number') {
|
287
392
|
params = params.set('skip', '' + skip);
|
@@ -291,21 +396,21 @@ class RulesAdminApiService {
|
|
291
396
|
}
|
292
397
|
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
293
398
|
};
|
294
|
-
this.
|
399
|
+
this.create$ = (rule) => {
|
295
400
|
return this.baseHttpService.api({
|
296
401
|
url: `${this.serviceUrl}`,
|
297
402
|
method: 'post',
|
298
403
|
body: rule,
|
299
404
|
});
|
300
405
|
};
|
301
|
-
this.
|
406
|
+
this.update$ = (rule) => {
|
302
407
|
return this.baseHttpService.api({
|
303
408
|
url: `${this.serviceUrl}/${rule.id}`,
|
304
409
|
method: 'put',
|
305
410
|
body: rule,
|
306
411
|
});
|
307
412
|
};
|
308
|
-
this.
|
413
|
+
this.duplicate$ = (body) => {
|
309
414
|
return this.baseHttpService
|
310
415
|
.api({
|
311
416
|
url: `${this.serviceUrl}/${body.id}/clone`,
|
@@ -314,20 +419,20 @@ class RulesAdminApiService {
|
|
314
419
|
})
|
315
420
|
.pipe(map$1(response => response.clonedRecordId));
|
316
421
|
};
|
317
|
-
this.
|
422
|
+
this.remove$ = (id) => {
|
318
423
|
return this.baseHttpService.api({
|
319
424
|
url: `${this.serviceUrl}/${id}`,
|
320
425
|
method: 'delete',
|
321
426
|
});
|
322
427
|
};
|
323
|
-
this.
|
428
|
+
this.restore$ = (id) => {
|
324
429
|
return this.baseHttpService.api({
|
325
430
|
url: `${this.serviceUrl}/${id}/restore`,
|
326
431
|
method: 'patch',
|
327
432
|
});
|
328
433
|
};
|
329
434
|
}
|
330
|
-
|
435
|
+
fetch$(id) {
|
331
436
|
return this.baseHttpService.api({
|
332
437
|
url: `${this.serviceUrl}/${id}`,
|
333
438
|
method: 'get',
|
@@ -348,57 +453,354 @@ class RulesAdminApiService {
|
|
348
453
|
});
|
349
454
|
}
|
350
455
|
getExecuteRuleUrl(ruleGroupType) {
|
351
|
-
|
352
|
-
|
456
|
+
switch (ruleGroupType) {
|
457
|
+
case RuleGroupTypes.eligibility:
|
458
|
+
return `${this.serviceUrl}/eligibility/execute`;
|
459
|
+
case RuleGroupTypes.rlmContextBased:
|
460
|
+
case RuleGroupTypes.generalContextBased:
|
461
|
+
return `${this.serviceUrl}/execute`;
|
462
|
+
default:
|
463
|
+
return `${this.serviceUrl}/legacy/execute`;
|
353
464
|
}
|
354
|
-
if (ruleGroupType === RuleGroupTypes.rlmContextBased || ruleGroupType === RuleGroupTypes.generalContextBased) {
|
355
|
-
return '/v2/rules/rlm/execute';
|
356
|
-
}
|
357
|
-
return '/v2/rules/execute';
|
358
465
|
}
|
359
466
|
}
|
360
|
-
|
361
|
-
|
362
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type:
|
467
|
+
FunctionsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FunctionsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
468
|
+
FunctionsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FunctionsAdminApiService });
|
469
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FunctionsAdminApiService, decorators: [{
|
363
470
|
type: Injectable
|
364
471
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
365
472
|
|
366
|
-
class
|
473
|
+
class OrchestrationsAdminApiService {
|
367
474
|
constructor(baseHttpService) {
|
368
475
|
this.baseHttpService = baseHttpService;
|
369
|
-
this.
|
476
|
+
this.SERVICE_URL = '/admin/v2/orchestrations';
|
477
|
+
this.fetchAll$ = () => {
|
478
|
+
return this.search$(new Expression(), 0, 100);
|
479
|
+
};
|
480
|
+
this.search$ = (expression, skip, count) => {
|
481
|
+
let params = new HttpParams();
|
482
|
+
params = params.set('skip', '' + skip);
|
483
|
+
params = params.set('count', '' + count);
|
484
|
+
return this.baseHttpService.api({
|
485
|
+
method: 'post',
|
486
|
+
url: `${this.SERVICE_URL}/search`,
|
487
|
+
params,
|
488
|
+
body: expression,
|
489
|
+
});
|
490
|
+
};
|
491
|
+
this.create$ = (newProcedure) => {
|
492
|
+
return this.baseHttpService.api({
|
493
|
+
url: `${this.SERVICE_URL}`,
|
494
|
+
method: 'post',
|
495
|
+
body: newProcedure,
|
496
|
+
});
|
497
|
+
};
|
498
|
+
this.update$ = (procedure) => {
|
499
|
+
return this.baseHttpService.api({
|
500
|
+
url: `${this.SERVICE_URL}/${procedure.id}`,
|
501
|
+
method: 'put',
|
502
|
+
body: procedure,
|
503
|
+
});
|
504
|
+
};
|
505
|
+
this.duplicate$ = (body) => {
|
506
|
+
return this.baseHttpService
|
507
|
+
.api({
|
508
|
+
url: `${this.SERVICE_URL}/${body.id}/clone`,
|
509
|
+
method: 'post',
|
510
|
+
body,
|
511
|
+
})
|
512
|
+
.pipe(map$1(response => response.clonedRecordId));
|
513
|
+
};
|
514
|
+
this.remove$ = (id) => {
|
515
|
+
return this.baseHttpService.api({
|
516
|
+
url: `${this.SERVICE_URL}/${id}`,
|
517
|
+
method: 'delete',
|
518
|
+
});
|
519
|
+
};
|
520
|
+
this.restore$ = (id) => {
|
521
|
+
return this.baseHttpService.api({
|
522
|
+
url: `${this.SERVICE_URL}/${id}/restore`,
|
523
|
+
method: 'patch',
|
524
|
+
});
|
525
|
+
};
|
526
|
+
}
|
527
|
+
fetch$(id) {
|
528
|
+
return this.baseHttpService.api({
|
529
|
+
url: `${this.SERVICE_URL}/${id}`,
|
530
|
+
method: 'get',
|
531
|
+
});
|
370
532
|
}
|
371
533
|
execute$(body) {
|
372
|
-
const url = this.getExecuteRuleUrl(body.rule.ruleGroupType);
|
373
534
|
return this.baseHttpService.api({
|
374
|
-
url
|
535
|
+
url: `${this.SERVICE_URL}/execute`,
|
375
536
|
method: 'post',
|
376
537
|
body,
|
377
538
|
});
|
378
539
|
}
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
540
|
+
catalogExecute$(body) {
|
541
|
+
return this.baseHttpService.api({
|
542
|
+
url: `${this.SERVICE_URL}/catalog/execute`,
|
543
|
+
method: 'post',
|
544
|
+
body,
|
545
|
+
});
|
546
|
+
}
|
547
|
+
}
|
548
|
+
OrchestrationsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrchestrationsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
549
|
+
OrchestrationsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrchestrationsAdminApiService });
|
550
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrchestrationsAdminApiService, decorators: [{
|
551
|
+
type: Injectable
|
552
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
553
|
+
|
554
|
+
class OrchestrationsApiService {
|
555
|
+
constructor(baseHttpService) {
|
556
|
+
this.baseHttpService = baseHttpService;
|
557
|
+
this.SERVICE_URL = '/services/v2/orchestrations';
|
558
|
+
}
|
559
|
+
apply$(request, options) {
|
560
|
+
return this.baseHttpService.api({
|
561
|
+
url: `${this.SERVICE_URL}/apply`,
|
562
|
+
method: 'post',
|
563
|
+
body: request,
|
564
|
+
...options,
|
565
|
+
});
|
566
|
+
}
|
567
|
+
}
|
568
|
+
OrchestrationsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrchestrationsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
569
|
+
OrchestrationsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrchestrationsApiService });
|
570
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrchestrationsApiService, decorators: [{
|
571
|
+
type: Injectable
|
572
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
573
|
+
|
574
|
+
class SalesforceApiService {
|
575
|
+
constructor(httpService) {
|
576
|
+
this.httpService = httpService;
|
577
|
+
this.SERVICE_URL = '/services/v2/proxy';
|
578
|
+
}
|
579
|
+
query(searchRequest, objectName, options) {
|
580
|
+
return this.httpService.api({
|
581
|
+
method: 'post',
|
582
|
+
body: { ...searchRequest, count: searchRequest.count || 100 },
|
583
|
+
url: `${this.SERVICE_URL}/query/${objectName}`,
|
584
|
+
...options,
|
585
|
+
});
|
586
|
+
}
|
587
|
+
queryObjects(search, options) {
|
588
|
+
let params = new HttpParams();
|
589
|
+
if (search) {
|
590
|
+
params = params.append('search', search);
|
388
591
|
}
|
389
|
-
return
|
592
|
+
return this.httpService.api({
|
593
|
+
url: `${this.SERVICE_URL}/query`,
|
594
|
+
params,
|
595
|
+
...options,
|
596
|
+
});
|
597
|
+
}
|
598
|
+
search(req, options) {
|
599
|
+
return this.httpService.api({
|
600
|
+
url: `${this.SERVICE_URL}/rest/search`,
|
601
|
+
params: { q: req.searchString },
|
602
|
+
...options,
|
603
|
+
});
|
604
|
+
}
|
605
|
+
describeObject(objectName, options) {
|
606
|
+
const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields`;
|
607
|
+
return this.httpService.api({ url: methodUrl, ...options });
|
608
|
+
}
|
609
|
+
describeField(objectName, fieldName, options) {
|
610
|
+
const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields/${fieldName}`;
|
611
|
+
return this.httpService.api({ url: methodUrl, ...options });
|
612
|
+
}
|
613
|
+
describe2(objectName, fields, options) {
|
614
|
+
const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields`;
|
615
|
+
return this.httpService.api({ method: 'post', url: methodUrl, body: fields, ...options });
|
616
|
+
}
|
617
|
+
apexGetRequest(path, params, options) {
|
618
|
+
// this line is needed because HttpParams instance from Integration behaves wrong in studio instance of Angular
|
619
|
+
const httpParams = new HttpParams({ fromString: params.toString() });
|
620
|
+
return this.httpService.api({ url: `${this.SERVICE_URL}/apex${path}`, params: httpParams, ...options });
|
621
|
+
}
|
622
|
+
apexPostRequest(path, body, options) {
|
623
|
+
return this.httpService.api({
|
624
|
+
method: 'post',
|
625
|
+
body,
|
626
|
+
url: `${this.SERVICE_URL}/apex${path}`,
|
627
|
+
...options,
|
628
|
+
});
|
629
|
+
}
|
630
|
+
restGetRequest(path, params, options) {
|
631
|
+
const httpParams = new HttpParams({ fromString: params.toString() });
|
632
|
+
return this.httpService.api({ url: `${this.SERVICE_URL}/rest${path}`, params: httpParams, ...options });
|
633
|
+
}
|
634
|
+
getGlobalPicklists() {
|
635
|
+
return this.httpService.api({
|
636
|
+
method: 'get',
|
637
|
+
url: `${this.SERVICE_URL}/globalvalueset`,
|
638
|
+
});
|
639
|
+
}
|
640
|
+
getGlobalPicklistValues(id) {
|
641
|
+
return this.httpService.api({
|
642
|
+
method: 'get',
|
643
|
+
url: `${this.SERVICE_URL}/globalvalueset/${id}/values`,
|
644
|
+
});
|
645
|
+
}
|
646
|
+
}
|
647
|
+
SalesforceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
648
|
+
SalesforceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService });
|
649
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, decorators: [{
|
650
|
+
type: Injectable
|
651
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
652
|
+
|
653
|
+
class PCMApiService {
|
654
|
+
constructor(sfApiService) {
|
655
|
+
this.sfApiService = sfApiService;
|
656
|
+
}
|
657
|
+
fetchPCMByProductId(productId) {
|
658
|
+
return this.sfApiService.restGetRequest(`/connect/pcm/products/${productId}`, new HttpParams()).pipe(tap(response => {
|
659
|
+
if (response.status.code !== '200') {
|
660
|
+
throw new Error(response.status.message);
|
661
|
+
}
|
662
|
+
}), map$1(response => {
|
663
|
+
const pcm = response.products[0];
|
664
|
+
if (!pcm) {
|
665
|
+
throw new Error('PCM product is not found');
|
666
|
+
}
|
667
|
+
return pcm;
|
668
|
+
}));
|
669
|
+
}
|
670
|
+
}
|
671
|
+
PCMApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PCMApiService, deps: [{ token: SalesforceApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
672
|
+
PCMApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PCMApiService });
|
673
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PCMApiService, decorators: [{
|
674
|
+
type: Injectable
|
675
|
+
}], ctorParameters: function () { return [{ type: SalesforceApiService }]; } });
|
676
|
+
|
677
|
+
class PicklistsAdminApiService {
|
678
|
+
constructor(baseHttpService) {
|
679
|
+
this.baseHttpService = baseHttpService;
|
680
|
+
this.serviceUrl = '/admin/v2/picklists';
|
681
|
+
this.fetchAllPicklists$ = () => this.baseHttpService.api({ url: `${this.serviceUrl}` });
|
682
|
+
this.fetchPicklist$ = (code) => this.baseHttpService.api({ url: `${this.serviceUrl}/${code}` });
|
683
|
+
this.createPicklist$ = (picklist) => {
|
684
|
+
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}`, body: picklist });
|
685
|
+
};
|
686
|
+
this.updatePicklist$ = (picklist) => {
|
687
|
+
return this.baseHttpService.api({
|
688
|
+
method: 'put',
|
689
|
+
url: `${this.serviceUrl}/${picklist.id}`,
|
690
|
+
body: picklist,
|
691
|
+
});
|
692
|
+
};
|
693
|
+
this.removePicklist$ = (id) => this.baseHttpService.api({ method: 'delete', url: `${this.serviceUrl}/${id}` });
|
694
|
+
this.restorePicklist$ = (id) => {
|
695
|
+
return this.baseHttpService.api({
|
696
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
697
|
+
method: 'patch',
|
698
|
+
});
|
699
|
+
};
|
700
|
+
this.addPicklistValue$ = (picklist, value) => {
|
701
|
+
const data = {
|
702
|
+
...picklist,
|
703
|
+
values: [...picklist.values, value],
|
704
|
+
};
|
705
|
+
return this.baseHttpService.api({ method: 'put', url: `${this.serviceUrl}/${picklist.id}`, body: data });
|
706
|
+
};
|
707
|
+
}
|
708
|
+
}
|
709
|
+
PicklistsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
710
|
+
PicklistsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsAdminApiService });
|
711
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsAdminApiService, decorators: [{
|
712
|
+
type: Injectable
|
713
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
714
|
+
|
715
|
+
class ProductsAdminApiService {
|
716
|
+
constructor(baseHttpService) {
|
717
|
+
this.baseHttpService = baseHttpService;
|
718
|
+
this.serviceUrl = '/admin/v2/products';
|
719
|
+
this.fetchProducts$ = (payload) => {
|
720
|
+
let params = new HttpParams();
|
721
|
+
params = params.append('count', payload.count);
|
722
|
+
params = params.append('skip', payload.skip);
|
723
|
+
if (payload.name) {
|
724
|
+
params = params.append('name', payload.name);
|
725
|
+
}
|
726
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}`, params });
|
727
|
+
};
|
728
|
+
this.searchProducts$ = (expression, skip, count) => {
|
729
|
+
let params = new HttpParams();
|
730
|
+
params = params.set('skip', '' + skip);
|
731
|
+
params = params.set('count', '' + count);
|
732
|
+
return this.baseHttpService.api({
|
733
|
+
method: 'post',
|
734
|
+
url: `${this.serviceUrl}/search`,
|
735
|
+
params: params,
|
736
|
+
body: expression,
|
737
|
+
});
|
738
|
+
};
|
739
|
+
this.fetchProduct$ = (id) => this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
740
|
+
this.createNewProduct$ = (productData) => {
|
741
|
+
return this.baseHttpService.api({
|
742
|
+
url: `${this.serviceUrl}`,
|
743
|
+
method: 'post',
|
744
|
+
body: productData,
|
745
|
+
});
|
746
|
+
};
|
747
|
+
this.updateProduct$ = (body) => {
|
748
|
+
return this.baseHttpService.api({
|
749
|
+
url: `${this.serviceUrl}/${body.id}`,
|
750
|
+
method: 'put',
|
751
|
+
body,
|
752
|
+
});
|
753
|
+
};
|
754
|
+
this.removeProduct$ = (id) => {
|
755
|
+
return this.baseHttpService.api({
|
756
|
+
url: `${this.serviceUrl}/${id}`,
|
757
|
+
method: 'delete',
|
758
|
+
});
|
759
|
+
};
|
760
|
+
this.restoreProduct$ = (id) => {
|
761
|
+
return this.baseHttpService.api({
|
762
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
763
|
+
method: 'patch',
|
764
|
+
});
|
765
|
+
};
|
766
|
+
}
|
767
|
+
attachImage$(productId, file) {
|
768
|
+
const data = new FormData();
|
769
|
+
data.append('image', file);
|
770
|
+
return this.baseHttpService.upload({
|
771
|
+
method: 'post',
|
772
|
+
url: `${this.serviceUrl}/${productId}/image`,
|
773
|
+
body: data,
|
774
|
+
});
|
775
|
+
}
|
776
|
+
removeImage$(productId) {
|
777
|
+
return this.baseHttpService.api({
|
778
|
+
method: 'delete',
|
779
|
+
url: `${this.serviceUrl}/${productId}/image`,
|
780
|
+
});
|
781
|
+
}
|
782
|
+
fetchImage$(productId) {
|
783
|
+
return this.baseHttpService.api({
|
784
|
+
url: this.getImageUrl(productId),
|
785
|
+
method: 'get',
|
786
|
+
responseType: 'blob',
|
787
|
+
errorHandler: noop,
|
788
|
+
});
|
789
|
+
}
|
790
|
+
getImageUrl(productId) {
|
791
|
+
return `${this.serviceUrl}/${productId}/image`;
|
390
792
|
}
|
391
793
|
}
|
392
|
-
|
393
|
-
|
394
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type:
|
794
|
+
ProductsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
795
|
+
ProductsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductsAdminApiService });
|
796
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductsAdminApiService, decorators: [{
|
395
797
|
type: Injectable
|
396
798
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
397
799
|
|
398
800
|
class SalesTransactionApiService {
|
399
801
|
constructor(httpService) {
|
400
802
|
this.httpService = httpService;
|
401
|
-
this.SERVICE_URL = '/v2/transactions';
|
803
|
+
this.SERVICE_URL = '/services/v2/transactions';
|
402
804
|
}
|
403
805
|
/**
|
404
806
|
* This endpoint doesn't include orders and assets
|
@@ -446,7 +848,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
446
848
|
class ScriptsAdminApiService {
|
447
849
|
constructor(baseHttpService) {
|
448
850
|
this.baseHttpService = baseHttpService;
|
449
|
-
this.serviceUrl = '/v2/
|
851
|
+
this.serviceUrl = '/admin/v2/functions/scripts';
|
450
852
|
this.fetchScripts$ = () => {
|
451
853
|
return this.baseHttpService.api({ url: `${this.serviceUrl}` });
|
452
854
|
};
|
@@ -505,18 +907,6 @@ class ScriptsAdminApiService {
|
|
505
907
|
method: 'patch',
|
506
908
|
});
|
507
909
|
};
|
508
|
-
}
|
509
|
-
}
|
510
|
-
ScriptsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
511
|
-
ScriptsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsAdminApiService });
|
512
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsAdminApiService, decorators: [{
|
513
|
-
type: Injectable
|
514
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
515
|
-
|
516
|
-
class ScriptsApiService {
|
517
|
-
constructor(baseHttpService) {
|
518
|
-
this.baseHttpService = baseHttpService;
|
519
|
-
this.serviceUrl = '/v2/scripts';
|
520
910
|
this.execute$ = (body) => {
|
521
911
|
return this.baseHttpService.api({
|
522
912
|
url: `${this.serviceUrl}/execute`,
|
@@ -527,12 +917,35 @@ class ScriptsApiService {
|
|
527
917
|
};
|
528
918
|
}
|
529
919
|
}
|
530
|
-
|
531
|
-
|
532
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type:
|
920
|
+
ScriptsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
921
|
+
ScriptsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsAdminApiService });
|
922
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsAdminApiService, decorators: [{
|
533
923
|
type: Injectable
|
534
924
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
535
925
|
|
926
|
+
class ShoppingCartSettingsApiService {
|
927
|
+
constructor(configurationSettingsApiService) {
|
928
|
+
this.configurationSettingsApiService = configurationSettingsApiService;
|
929
|
+
this.shoppingCartSettingsKey = 'shopping-cart';
|
930
|
+
}
|
931
|
+
getSetting(id) {
|
932
|
+
return this.fetchSettings().pipe(map((settings) => parseJsonSafely(settings?.value, [])), map(settings => settings.find(setting => setting.id == id)));
|
933
|
+
}
|
934
|
+
fetchSettings() {
|
935
|
+
return this.configurationSettingsApiService.fetchSetting(this.shoppingCartSettingsKey, { skipErrorHandler: true });
|
936
|
+
}
|
937
|
+
getSettingsMap() {
|
938
|
+
return this.fetchSettings().pipe(map((settings) => parseJsonSafely(settings?.value, [])), map((settings) => settings.reduce((acc, setting) => {
|
939
|
+
return { ...acc, [setting.id]: setting.properties };
|
940
|
+
}, {})));
|
941
|
+
}
|
942
|
+
}
|
943
|
+
ShoppingCartSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
944
|
+
ShoppingCartSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService });
|
945
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService, decorators: [{
|
946
|
+
type: Injectable
|
947
|
+
}], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
|
948
|
+
|
536
949
|
function uiDefinitionFromDTO(container) {
|
537
950
|
const { sourceBlob, ...rest } = container;
|
538
951
|
return {
|
@@ -555,10 +968,10 @@ function newUiDefinitionToDTO(container) {
|
|
555
968
|
};
|
556
969
|
}
|
557
970
|
|
558
|
-
class
|
971
|
+
class UIDefinitionsAdminApiService {
|
559
972
|
constructor(baseHttpService) {
|
560
973
|
this.baseHttpService = baseHttpService;
|
561
|
-
this.serviceUrl = '/v2/uidefinitions';
|
974
|
+
this.serviceUrl = '/admin/v2/uidefinitions';
|
562
975
|
}
|
563
976
|
fetchAll$(params) {
|
564
977
|
let httpParams = new HttpParams();
|
@@ -611,9 +1024,9 @@ class UIDefinitionsApiService {
|
|
611
1024
|
});
|
612
1025
|
}
|
613
1026
|
}
|
614
|
-
|
615
|
-
|
616
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type:
|
1027
|
+
UIDefinitionsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1028
|
+
UIDefinitionsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsAdminApiService });
|
1029
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsAdminApiService, decorators: [{
|
617
1030
|
type: Injectable
|
618
1031
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
619
1032
|
|
@@ -630,10 +1043,10 @@ const fromUIComponentStoryDTO = (dto, attachments) => {
|
|
630
1043
|
};
|
631
1044
|
};
|
632
1045
|
|
633
|
-
class
|
1046
|
+
class UITemplatesAdminApiService {
|
634
1047
|
constructor(baseHttpService) {
|
635
1048
|
this.baseHttpService = baseHttpService;
|
636
|
-
this.serviceUrl = '/v2/uitemplates';
|
1049
|
+
this.serviceUrl = '/admin/v2/uitemplates';
|
637
1050
|
this.fetchTemplates$ = (name) => {
|
638
1051
|
let params = new HttpParams();
|
639
1052
|
if (name) {
|
@@ -904,9 +1317,94 @@ class UITemplatesApiService {
|
|
904
1317
|
});
|
905
1318
|
}
|
906
1319
|
}
|
907
|
-
|
908
|
-
|
909
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type:
|
1320
|
+
UITemplatesAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1321
|
+
UITemplatesAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesAdminApiService });
|
1322
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesAdminApiService, decorators: [{
|
1323
|
+
type: Injectable
|
1324
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1325
|
+
|
1326
|
+
class VeloceObjectsAdminApiService {
|
1327
|
+
constructor(baseHttpService) {
|
1328
|
+
this.baseHttpService = baseHttpService;
|
1329
|
+
this.serviceUrl = '/admin/v2/veloceobjects';
|
1330
|
+
this.updateCategory$ = (category) => {
|
1331
|
+
return this.baseHttpService.api({
|
1332
|
+
method: 'put',
|
1333
|
+
url: `${this.serviceUrl}/categories/${category.id}`,
|
1334
|
+
body: category,
|
1335
|
+
});
|
1336
|
+
};
|
1337
|
+
this.deleteCategory$ = (id) => {
|
1338
|
+
return this.baseHttpService.api({
|
1339
|
+
method: 'delete',
|
1340
|
+
url: `${this.serviceUrl}/categories/${id}`,
|
1341
|
+
});
|
1342
|
+
};
|
1343
|
+
this.searchObjects$ = (searchParams, expression) => {
|
1344
|
+
const params = new HttpParams({ fromObject: { ...searchParams } });
|
1345
|
+
return this.baseHttpService.api({
|
1346
|
+
method: 'post',
|
1347
|
+
url: `${this.serviceUrl}/search`,
|
1348
|
+
params,
|
1349
|
+
body: expression || {},
|
1350
|
+
});
|
1351
|
+
};
|
1352
|
+
this.deleteObject$ = (id) => {
|
1353
|
+
return this.baseHttpService.api({
|
1354
|
+
method: 'delete',
|
1355
|
+
url: `${this.serviceUrl}/${id}`,
|
1356
|
+
});
|
1357
|
+
};
|
1358
|
+
this.duplicateObject$ = (body) => {
|
1359
|
+
return this.baseHttpService
|
1360
|
+
.api({
|
1361
|
+
method: 'post',
|
1362
|
+
url: `${this.serviceUrl}/${body.id}/clone`,
|
1363
|
+
body,
|
1364
|
+
})
|
1365
|
+
.pipe(map(response => response.clonedRecordId));
|
1366
|
+
};
|
1367
|
+
this.restoreObject$ = (id) => {
|
1368
|
+
return this.baseHttpService.api({
|
1369
|
+
method: 'patch',
|
1370
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
1371
|
+
});
|
1372
|
+
};
|
1373
|
+
}
|
1374
|
+
fetchCategories$() {
|
1375
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/categories` });
|
1376
|
+
}
|
1377
|
+
createCategory$(category) {
|
1378
|
+
return this.baseHttpService.api({
|
1379
|
+
method: 'post',
|
1380
|
+
url: `${this.serviceUrl}/categories`,
|
1381
|
+
body: category,
|
1382
|
+
});
|
1383
|
+
}
|
1384
|
+
fetchObjects$() {
|
1385
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}` });
|
1386
|
+
}
|
1387
|
+
fetchObject$(id) {
|
1388
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
1389
|
+
}
|
1390
|
+
createObject$(object) {
|
1391
|
+
return this.baseHttpService.api({
|
1392
|
+
method: 'post',
|
1393
|
+
url: `${this.serviceUrl}`,
|
1394
|
+
body: object,
|
1395
|
+
});
|
1396
|
+
}
|
1397
|
+
updateObject$(object) {
|
1398
|
+
return this.baseHttpService.api({
|
1399
|
+
method: 'put',
|
1400
|
+
url: `${this.serviceUrl}/${object.id}`,
|
1401
|
+
body: object,
|
1402
|
+
});
|
1403
|
+
}
|
1404
|
+
}
|
1405
|
+
VeloceObjectsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1406
|
+
VeloceObjectsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsAdminApiService });
|
1407
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsAdminApiService, decorators: [{
|
910
1408
|
type: Injectable
|
911
1409
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
912
1410
|
|
@@ -916,18 +1414,26 @@ ApiV2Module.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15
|
|
916
1414
|
ApiV2Module.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ApiV2Module, imports: [HttpClientModule] });
|
917
1415
|
ApiV2Module.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiV2Module, providers: [
|
918
1416
|
BaseHttpService,
|
1417
|
+
CacheApiService,
|
919
1418
|
ConfigurationProcessorsApiService,
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
1419
|
+
ConfigurationSettingsApiService,
|
1420
|
+
ContextDefinitionAdminApiService,
|
1421
|
+
EndpointsAdminApiService,
|
1422
|
+
FlowsApiService,
|
1423
|
+
FunctionGroupsAdminApiService,
|
1424
|
+
OrchestrationsAdminApiService,
|
1425
|
+
OrchestrationsApiService,
|
1426
|
+
PCMApiService,
|
1427
|
+
PicklistsAdminApiService,
|
1428
|
+
ProductsAdminApiService,
|
1429
|
+
FunctionsAdminApiService,
|
1430
|
+
SalesforceApiService,
|
926
1431
|
SalesTransactionApiService,
|
1432
|
+
ShoppingCartSettingsApiService,
|
927
1433
|
ScriptsAdminApiService,
|
928
|
-
|
929
|
-
|
930
|
-
|
1434
|
+
UIDefinitionsAdminApiService,
|
1435
|
+
UITemplatesAdminApiService,
|
1436
|
+
VeloceObjectsAdminApiService,
|
931
1437
|
XrayService,
|
932
1438
|
], imports: [HttpClientModule] });
|
933
1439
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiV2Module, decorators: [{
|
@@ -936,18 +1442,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
936
1442
|
imports: [HttpClientModule],
|
937
1443
|
providers: [
|
938
1444
|
BaseHttpService,
|
1445
|
+
CacheApiService,
|
939
1446
|
ConfigurationProcessorsApiService,
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
1447
|
+
ConfigurationSettingsApiService,
|
1448
|
+
ContextDefinitionAdminApiService,
|
1449
|
+
EndpointsAdminApiService,
|
1450
|
+
FlowsApiService,
|
1451
|
+
FunctionGroupsAdminApiService,
|
1452
|
+
OrchestrationsAdminApiService,
|
1453
|
+
OrchestrationsApiService,
|
1454
|
+
PCMApiService,
|
1455
|
+
PicklistsAdminApiService,
|
1456
|
+
ProductsAdminApiService,
|
1457
|
+
FunctionsAdminApiService,
|
1458
|
+
SalesforceApiService,
|
946
1459
|
SalesTransactionApiService,
|
1460
|
+
ShoppingCartSettingsApiService,
|
947
1461
|
ScriptsAdminApiService,
|
948
|
-
|
949
|
-
|
950
|
-
|
1462
|
+
UIDefinitionsAdminApiService,
|
1463
|
+
UITemplatesAdminApiService,
|
1464
|
+
VeloceObjectsAdminApiService,
|
951
1465
|
XrayService,
|
952
1466
|
],
|
953
1467
|
}]
|
@@ -957,5 +1471,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
957
1471
|
* Generated bundle index. Do not edit.
|
958
1472
|
*/
|
959
1473
|
|
960
|
-
export { ApiV2Module, ConfigurationProcessorsApiService,
|
1474
|
+
export { ApiV2Module, CacheApiService, ConfigurationProcessorsApiService, ConfigurationSettingsApiService, ContextDefinitionAdminApiService, EndpointsAdminApiService, FlowsApiService, FunctionGroupsAdminApiService, FunctionsAdminApiService, OrchestrationsAdminApiService, OrchestrationsApiService, PCMApiService, PicklistsAdminApiService, ProductsAdminApiService, SalesTransactionApiService, SalesforceApiService, ScriptsAdminApiService, ShoppingCartSettingsApiService, UIDefinitionsAdminApiService, UITemplatesAdminApiService, VeloceObjectsAdminApiService };
|
961
1475
|
//# sourceMappingURL=veloceapps-api-v2.mjs.map
|