@veloceapps/api 11.0.0-37 → 11.0.0-39
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 -4
- package/esm2020/src/lib/api.module.mjs +1 -10
- package/esm2020/v2/api-v2.module.mjs +8 -2
- 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/document-attachment-api.service.mjs +66 -0
- package/esm2020/v2/services/index.mjs +4 -1
- package/esm2020/v2/types/attachment.types.mjs +2 -0
- package/esm2020/v2/types/index.mjs +2 -1
- package/fesm2015/veloceapps-api-v2.mjs +346 -5
- package/fesm2015/veloceapps-api-v2.mjs.map +1 -1
- package/fesm2015/veloceapps-api.mjs +17 -359
- package/fesm2015/veloceapps-api.mjs.map +1 -1
- package/fesm2020/veloceapps-api-v2.mjs +346 -5
- package/fesm2020/veloceapps-api-v2.mjs.map +1 -1
- package/fesm2020/veloceapps-api.mjs +17 -359
- package/fesm2020/veloceapps-api.mjs.map +1 -1
- package/package.json +1 -1
- package/src/index.d.ts +0 -3
- package/{src/lib → v2}/services/document-attachment-api.service.d.ts +1 -1
- package/v2/services/index.d.ts +3 -0
- package/v2/types/index.d.ts +1 -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/document-attachment-api.service.mjs +0 -66
- package/esm2020/src/lib/types/attachment.types.mjs +0 -2
- /package/{src/lib → v2}/services/catalog-admin-api.service.d.ts +0 -0
- /package/{src/lib → v2}/services/catalog-api.service.d.ts +0 -0
- /package/{src/lib → v2}/types/attachment.types.d.ts +0 -0
@@ -5,8 +5,7 @@ import { Injectable, NgModule } from '@angular/core';
|
|
5
5
|
import { ApiV2Module } from '@veloceapps/api/v2';
|
6
6
|
import * as i1 from '@veloceapps/core';
|
7
7
|
import { Expression, Operator, isApexError, isCanvasError, BaseHttpService, XrayService } from '@veloceapps/core';
|
8
|
-
import {
|
9
|
-
import { tap, map } from 'rxjs/operators';
|
8
|
+
import { map, from, catchError, of } from 'rxjs';
|
10
9
|
import { isArray } from 'lodash';
|
11
10
|
import * as i1$2 from 'primeng/api';
|
12
11
|
|
@@ -77,279 +76,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
77
76
|
type: Injectable
|
78
77
|
}], ctorParameters: function () { return [{ type: i1$1.HttpClient }]; } });
|
79
78
|
|
80
|
-
class CatalogAdminApiService {
|
81
|
-
constructor(baseHttpService) {
|
82
|
-
this.baseHttpService = baseHttpService;
|
83
|
-
this.serviceUrl = '/catalogs';
|
84
|
-
this.fetchCatalogs$ = (searchParams) => {
|
85
|
-
const params = new HttpParams({ fromObject: Object.assign({}, searchParams) });
|
86
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}`, params });
|
87
|
-
};
|
88
|
-
this.searchCatalogs$ = (searchParams, expression) => {
|
89
|
-
const params = new HttpParams({ fromObject: Object.assign({}, searchParams) });
|
90
|
-
return this.baseHttpService.api({
|
91
|
-
method: 'post',
|
92
|
-
url: `${this.serviceUrl}/search`,
|
93
|
-
params,
|
94
|
-
body: expression || {},
|
95
|
-
});
|
96
|
-
};
|
97
|
-
this.fetchCategories$ = (catalogId) => {
|
98
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/${catalogId}/categories` });
|
99
|
-
};
|
100
|
-
this.searchProducts$ = (catalogId, categoryId) => {
|
101
|
-
return this.baseHttpService.api({
|
102
|
-
method: 'post',
|
103
|
-
url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/products/search`,
|
104
|
-
body: {},
|
105
|
-
});
|
106
|
-
};
|
107
|
-
this.fetchAttributes$ = (catalogId, categoryId) => {
|
108
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/attributes` });
|
109
|
-
};
|
110
|
-
this.createNewCatalog$ = (catalogData) => {
|
111
|
-
return this.baseHttpService.api({
|
112
|
-
url: `${this.serviceUrl}`,
|
113
|
-
method: 'post',
|
114
|
-
body: catalogData,
|
115
|
-
});
|
116
|
-
};
|
117
|
-
this.duplicateCatalog$ = (cloneRequest) => {
|
118
|
-
return this.baseHttpService.api({
|
119
|
-
url: `${this.serviceUrl}/${cloneRequest.id}/clone`,
|
120
|
-
method: 'post',
|
121
|
-
body: cloneRequest,
|
122
|
-
});
|
123
|
-
};
|
124
|
-
this.updateCatalog$ = (data) => {
|
125
|
-
return this.baseHttpService.api({
|
126
|
-
url: `${this.serviceUrl}/${data.id}`,
|
127
|
-
method: 'put',
|
128
|
-
body: data,
|
129
|
-
});
|
130
|
-
};
|
131
|
-
this.removeCatalog$ = (id) => {
|
132
|
-
return this.baseHttpService.api({
|
133
|
-
url: `${this.serviceUrl}/${id}`,
|
134
|
-
method: 'delete',
|
135
|
-
});
|
136
|
-
};
|
137
|
-
this.restoreCatalog$ = (id) => {
|
138
|
-
return this.baseHttpService.api({
|
139
|
-
url: `${this.serviceUrl}/${id}/restore`,
|
140
|
-
method: 'patch',
|
141
|
-
});
|
142
|
-
};
|
143
|
-
this.createNewCategory$ = (categoryData) => {
|
144
|
-
return this.baseHttpService.api({
|
145
|
-
url: `${this.serviceUrl}/${categoryData.catalogId}/categories`,
|
146
|
-
method: 'post',
|
147
|
-
body: categoryData,
|
148
|
-
});
|
149
|
-
};
|
150
|
-
this.updateCategory$ = (category) => {
|
151
|
-
return this.baseHttpService.api({
|
152
|
-
url: `${this.serviceUrl}/${category.catalogId}/categories/${category.id}`,
|
153
|
-
method: 'put',
|
154
|
-
body: category,
|
155
|
-
});
|
156
|
-
};
|
157
|
-
this.duplicateCategory$ = (catalogId, cloneRequest) => {
|
158
|
-
return this.baseHttpService.api({
|
159
|
-
url: `${this.serviceUrl}/${catalogId}/categories/${cloneRequest.id}/clone`,
|
160
|
-
method: 'post',
|
161
|
-
body: cloneRequest,
|
162
|
-
});
|
163
|
-
};
|
164
|
-
this.removeCategory$ = (id, catalogId) => {
|
165
|
-
return this.baseHttpService.api({
|
166
|
-
url: `${this.serviceUrl}/${catalogId}/categories/${id}`,
|
167
|
-
method: 'delete',
|
168
|
-
});
|
169
|
-
};
|
170
|
-
this.restoreCategory$ = (id, catalogId) => {
|
171
|
-
return this.baseHttpService.api({
|
172
|
-
url: `${this.serviceUrl}/${catalogId}/categories/${id}/restore`,
|
173
|
-
method: 'patch',
|
174
|
-
});
|
175
|
-
};
|
176
|
-
this.removeAttribute$ = ({ catalogId, categoryId, data, }) => {
|
177
|
-
return this.baseHttpService.api({
|
178
|
-
method: 'delete',
|
179
|
-
url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/attributes/${data.id}`,
|
180
|
-
body: data,
|
181
|
-
});
|
182
|
-
};
|
183
|
-
this.restoreAttribute$ = ({ catalogId, categoryId, data, }) => {
|
184
|
-
return this.baseHttpService.api({
|
185
|
-
url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/attributes/${data.id}/restore`,
|
186
|
-
method: 'patch',
|
187
|
-
});
|
188
|
-
};
|
189
|
-
this.createNewAttribute$ = ({ catalogId, categoryId, data, }) => {
|
190
|
-
return this.baseHttpService.api({
|
191
|
-
method: 'post',
|
192
|
-
url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/attributes`,
|
193
|
-
body: data,
|
194
|
-
});
|
195
|
-
};
|
196
|
-
this.updateAttribute$ = ({ catalogId, categoryId, data, }) => {
|
197
|
-
return this.baseHttpService.api({
|
198
|
-
method: 'put',
|
199
|
-
url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/attributes/${data.id}`,
|
200
|
-
body: data,
|
201
|
-
});
|
202
|
-
};
|
203
|
-
this.searchProductCandidates$ = (catalogId, categoryId, expression, searchParams) => {
|
204
|
-
const params = new HttpParams({ fromObject: Object.assign({}, searchParams) });
|
205
|
-
return this.baseHttpService.api({
|
206
|
-
method: 'post',
|
207
|
-
url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/candidates/search`,
|
208
|
-
params,
|
209
|
-
body: expression,
|
210
|
-
});
|
211
|
-
};
|
212
|
-
this.addProduct$ = (product, catalogId, categoryId) => {
|
213
|
-
return this.baseHttpService.api({
|
214
|
-
method: 'post',
|
215
|
-
url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/products`,
|
216
|
-
body: product,
|
217
|
-
});
|
218
|
-
};
|
219
|
-
this.updateProduct$ = (product, catalogId, categoryId) => {
|
220
|
-
return this.baseHttpService.api({
|
221
|
-
method: 'put',
|
222
|
-
url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/products/${product.id}`,
|
223
|
-
body: product,
|
224
|
-
});
|
225
|
-
};
|
226
|
-
this.removeProduct$ = ({ catalogId, categoryId, data, }) => {
|
227
|
-
return this.baseHttpService.api({
|
228
|
-
method: 'delete',
|
229
|
-
url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/products/${data.id}`,
|
230
|
-
});
|
231
|
-
};
|
232
|
-
}
|
233
|
-
attachImage$(catalogId, categoryId, file) {
|
234
|
-
const data = new FormData();
|
235
|
-
data.append('image', file);
|
236
|
-
return this.baseHttpService.upload({
|
237
|
-
method: 'post',
|
238
|
-
url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/image`,
|
239
|
-
body: data,
|
240
|
-
});
|
241
|
-
}
|
242
|
-
removeImage$(catalogId, categoryId) {
|
243
|
-
return this.baseHttpService.api({
|
244
|
-
method: 'delete',
|
245
|
-
url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/image`,
|
246
|
-
});
|
247
|
-
}
|
248
|
-
fetchImage$(catalogId, categoryId) {
|
249
|
-
return this.baseHttpService.api({
|
250
|
-
url: this.getImageUrl(catalogId, categoryId),
|
251
|
-
method: 'get',
|
252
|
-
responseType: 'blob',
|
253
|
-
errorHandler: noop,
|
254
|
-
});
|
255
|
-
}
|
256
|
-
getImageUrl(catalogId, categoryId) {
|
257
|
-
return `${this.serviceUrl}/${catalogId}/categories/${categoryId}/image`;
|
258
|
-
}
|
259
|
-
}
|
260
|
-
CatalogAdminApiService.MAX_RESULTS = 60;
|
261
|
-
CatalogAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
262
|
-
CatalogAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogAdminApiService });
|
263
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogAdminApiService, decorators: [{
|
264
|
-
type: Injectable
|
265
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
266
|
-
|
267
|
-
class CatalogApiService {
|
268
|
-
constructor(service) {
|
269
|
-
this.service = service;
|
270
|
-
this.serviceUrl = '/product-catalogs';
|
271
|
-
}
|
272
|
-
fetchCatalogs$() {
|
273
|
-
return this.service.api({
|
274
|
-
method: 'get',
|
275
|
-
url: `${this.serviceUrl}`,
|
276
|
-
});
|
277
|
-
}
|
278
|
-
searchCatalogs$(searchParams, expression) {
|
279
|
-
const params = new HttpParams({ fromObject: searchParams });
|
280
|
-
return this.service.api({
|
281
|
-
method: 'post',
|
282
|
-
url: `${this.serviceUrl}/search`,
|
283
|
-
params,
|
284
|
-
body: expression,
|
285
|
-
});
|
286
|
-
}
|
287
|
-
getCatalog$(id) {
|
288
|
-
return this.service.api({
|
289
|
-
method: 'get',
|
290
|
-
url: `${this.serviceUrl}/${id}`,
|
291
|
-
});
|
292
|
-
}
|
293
|
-
fetchCategories$(catalogId) {
|
294
|
-
return this.service.api({
|
295
|
-
method: 'get',
|
296
|
-
url: `${this.serviceUrl}/${catalogId}/categories`,
|
297
|
-
});
|
298
|
-
}
|
299
|
-
fetchCatalogProducts$(catalogId, searchParams, context) {
|
300
|
-
const params = new HttpParams({ fromObject: searchParams });
|
301
|
-
return this.service.api({
|
302
|
-
method: 'post',
|
303
|
-
url: `${this.serviceUrl}/${catalogId}/products`,
|
304
|
-
params,
|
305
|
-
body: context,
|
306
|
-
});
|
307
|
-
}
|
308
|
-
fetchCategoryProducts$(catalogId, categoryId, searchParams, context) {
|
309
|
-
const params = new HttpParams({ fromObject: searchParams });
|
310
|
-
return this.service.api({
|
311
|
-
method: 'post',
|
312
|
-
url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/products`,
|
313
|
-
params,
|
314
|
-
body: context,
|
315
|
-
});
|
316
|
-
}
|
317
|
-
searchCategoryProducts$(catalogId, categoryId, searchParams, searchRequest, context) {
|
318
|
-
const params = new HttpParams({ fromObject: searchParams });
|
319
|
-
return this.service.api({
|
320
|
-
method: 'post',
|
321
|
-
url: `${this.serviceUrl}/${catalogId}/categories/${categoryId}/products/search`,
|
322
|
-
params,
|
323
|
-
body: {
|
324
|
-
configurationContext: context,
|
325
|
-
request: searchRequest,
|
326
|
-
},
|
327
|
-
});
|
328
|
-
}
|
329
|
-
fetchEligibleProducts$(searchParams, context) {
|
330
|
-
const params = new HttpParams({ fromObject: searchParams });
|
331
|
-
return this.service.api({
|
332
|
-
method: 'post',
|
333
|
-
url: `${this.serviceUrl}/products`,
|
334
|
-
params: params,
|
335
|
-
body: context,
|
336
|
-
});
|
337
|
-
}
|
338
|
-
fetchProducts$(searchParams) {
|
339
|
-
const params = new HttpParams({ fromObject: searchParams });
|
340
|
-
return this.service.api({
|
341
|
-
method: 'get',
|
342
|
-
url: `${this.serviceUrl}/products`,
|
343
|
-
params: params,
|
344
|
-
});
|
345
|
-
}
|
346
|
-
}
|
347
|
-
CatalogApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
348
|
-
CatalogApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogApiService });
|
349
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogApiService, decorators: [{
|
350
|
-
type: Injectable
|
351
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
352
|
-
|
353
79
|
class ContractedPriceApiService {
|
354
80
|
constructor(baseHttpService) {
|
355
81
|
this.baseHttpService = baseHttpService;
|
@@ -391,68 +117,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
391
117
|
type: Injectable
|
392
118
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
393
119
|
|
394
|
-
class DocumentAttachmentApiService {
|
395
|
-
constructor(httpService, fileDownloadService) {
|
396
|
-
this.httpService = httpService;
|
397
|
-
this.fileDownloadService = fileDownloadService;
|
398
|
-
this.SERVICE_URL = '/attachments';
|
399
|
-
}
|
400
|
-
getAttachments(searchRequest) {
|
401
|
-
return this.httpService.api({
|
402
|
-
url: `${this.SERVICE_URL}/search`,
|
403
|
-
method: 'post',
|
404
|
-
body: searchRequest,
|
405
|
-
});
|
406
|
-
}
|
407
|
-
createAttachment(attachment, file, reportProgress) {
|
408
|
-
const formData = new FormData();
|
409
|
-
if (file) {
|
410
|
-
formData.append('file', file, file.name);
|
411
|
-
}
|
412
|
-
formData.append('attachment', new Blob([JSON.stringify(attachment)], {
|
413
|
-
type: 'application/json',
|
414
|
-
}));
|
415
|
-
return this.httpService.upload({
|
416
|
-
url: `${this.SERVICE_URL}`,
|
417
|
-
body: formData,
|
418
|
-
method: 'post',
|
419
|
-
observe: reportProgress ? 'events' : undefined,
|
420
|
-
reportProgress,
|
421
|
-
});
|
422
|
-
}
|
423
|
-
updateAttachment(id, attachment) {
|
424
|
-
return this.httpService.api({
|
425
|
-
url: `${this.SERVICE_URL}/${id}`,
|
426
|
-
body: attachment,
|
427
|
-
method: 'put',
|
428
|
-
});
|
429
|
-
}
|
430
|
-
getAttachmentFile(id, isPreventDownload) {
|
431
|
-
return this.httpService
|
432
|
-
.api({
|
433
|
-
url: `${this.SERVICE_URL}/${id}/file`,
|
434
|
-
responseType: isPreventDownload ? 'arraybuffer' : 'blob',
|
435
|
-
observe: isPreventDownload ? 'body' : 'response',
|
436
|
-
})
|
437
|
-
.pipe(tap(response => {
|
438
|
-
if (!isPreventDownload) {
|
439
|
-
this.fileDownloadService.processDownload(response);
|
440
|
-
}
|
441
|
-
}), map(response => (isPreventDownload ? new Blob([response.body || response]) : response.body || response)));
|
442
|
-
}
|
443
|
-
removeAttachment(id) {
|
444
|
-
return this.httpService.api({
|
445
|
-
url: `${this.SERVICE_URL}/${id}`,
|
446
|
-
method: 'delete',
|
447
|
-
});
|
448
|
-
}
|
449
|
-
}
|
450
|
-
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 });
|
451
|
-
DocumentAttachmentApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentAttachmentApiService });
|
452
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentAttachmentApiService, decorators: [{
|
453
|
-
type: Injectable
|
454
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i1.FileDownloadService }]; } });
|
455
|
-
|
456
120
|
class FlowStateApiService {
|
457
121
|
constructor(httpService) {
|
458
122
|
this.httpService = httpService;
|
@@ -736,7 +400,7 @@ class OffersApiService {
|
|
736
400
|
.api({
|
737
401
|
url: `${this.serviceUrl}/${id}/products`,
|
738
402
|
})
|
739
|
-
.pipe(map
|
403
|
+
.pipe(map(response => response.products));
|
740
404
|
}
|
741
405
|
upsertOfferProducts$(id, products) {
|
742
406
|
const request = { products };
|
@@ -746,7 +410,7 @@ class OffersApiService {
|
|
746
410
|
method: 'put',
|
747
411
|
body: request,
|
748
412
|
})
|
749
|
-
.pipe(map
|
413
|
+
.pipe(map(response => response.products));
|
750
414
|
}
|
751
415
|
}
|
752
416
|
OffersApiService.MAX_RESULTS = 60;
|
@@ -802,7 +466,7 @@ class OrgInfoApiService {
|
|
802
466
|
getOrgInfo$() {
|
803
467
|
try {
|
804
468
|
return window.doCanvasCall && window.ORGANIZATION_ID
|
805
|
-
? from(window.doCanvasCall(`org-info/${window.ORGANIZATION_ID}`, null)).pipe(map
|
469
|
+
? from(window.doCanvasCall(`org-info/${window.ORGANIZATION_ID}`, null)).pipe(map(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError(() => of(undefined)))
|
806
470
|
: of(undefined);
|
807
471
|
}
|
808
472
|
catch (_a) {
|
@@ -812,7 +476,7 @@ class OrgInfoApiService {
|
|
812
476
|
getAvailableVersionsInfo$() {
|
813
477
|
try {
|
814
478
|
return window.doCanvasCall && window.ORGANIZATION_ID
|
815
|
-
? from(window.doCanvasCall('versions/available', 'include_all=true')).pipe(map
|
479
|
+
? from(window.doCanvasCall('versions/available', 'include_all=true')).pipe(map(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError(() => of(undefined)))
|
816
480
|
: of(undefined);
|
817
481
|
}
|
818
482
|
catch (_a) {
|
@@ -822,7 +486,7 @@ class OrgInfoApiService {
|
|
822
486
|
upgradeVersion$(targetVersion) {
|
823
487
|
try {
|
824
488
|
return window.doCanvasCall && window.ORGANIZATION_ID
|
825
|
-
? from(window.doCanvasCall('versions/upgrade', `target_version=${targetVersion}`)).pipe(map
|
489
|
+
? from(window.doCanvasCall('versions/upgrade', `target_version=${targetVersion}`)).pipe(map(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError(() => of(undefined)))
|
826
490
|
: of(undefined);
|
827
491
|
}
|
828
492
|
catch (_a) {
|
@@ -934,7 +598,7 @@ class PromotionsApiService {
|
|
934
598
|
method: 'post',
|
935
599
|
body,
|
936
600
|
})
|
937
|
-
.pipe(map
|
601
|
+
.pipe(map(response => response.clonedRecordId));
|
938
602
|
};
|
939
603
|
}
|
940
604
|
search$(expression, skip, count) {
|
@@ -997,7 +661,7 @@ class RebateProgramApiService {
|
|
997
661
|
method: 'post',
|
998
662
|
body,
|
999
663
|
})
|
1000
|
-
.pipe(map
|
664
|
+
.pipe(map(response => response.clonedRecordId));
|
1001
665
|
};
|
1002
666
|
}
|
1003
667
|
search$(expression, skip, count) {
|
@@ -1060,7 +724,7 @@ class RebateTypeApiService {
|
|
1060
724
|
method: 'post',
|
1061
725
|
body,
|
1062
726
|
})
|
1063
|
-
.pipe(map
|
727
|
+
.pipe(map(response => response.clonedRecordId));
|
1064
728
|
};
|
1065
729
|
}
|
1066
730
|
search$(expression, skip, count) {
|
@@ -1109,7 +773,7 @@ class SandboxManagerApiService {
|
|
1109
773
|
getSalesforceOrganizations$() {
|
1110
774
|
try {
|
1111
775
|
return window.doSandboxCall
|
1112
|
-
? from(window.doSandboxCall('orgs', '', 'GET')).pipe(map
|
776
|
+
? from(window.doSandboxCall('orgs', '', 'GET')).pipe(map(response => handleCanvasResponse(response, [], this.publishErrorMessage)), catchError(() => of([])))
|
1113
777
|
: of([]);
|
1114
778
|
}
|
1115
779
|
catch (_a) {
|
@@ -1119,7 +783,7 @@ class SandboxManagerApiService {
|
|
1119
783
|
getAvailableSalesforceOrganizationSizes$() {
|
1120
784
|
try {
|
1121
785
|
return window.doSandboxCall
|
1122
|
-
? from(window.doSandboxCall('available-sizes', '', 'GET')).pipe(map
|
786
|
+
? from(window.doSandboxCall('available-sizes', '', 'GET')).pipe(map(response => handleCanvasResponse(response, {}, this.publishErrorMessage)), catchError(() => of({})))
|
1123
787
|
: of({});
|
1124
788
|
}
|
1125
789
|
catch (_a) {
|
@@ -1129,7 +793,7 @@ class SandboxManagerApiService {
|
|
1129
793
|
createSalesforceOrganization$(payload) {
|
1130
794
|
try {
|
1131
795
|
return window.doSandboxCall
|
1132
|
-
? from(window.doSandboxCall('orgs', JSON.stringify(payload), 'POST')).pipe(map
|
796
|
+
? from(window.doSandboxCall('orgs', JSON.stringify(payload), 'POST')).pipe(map(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError(() => of(undefined)))
|
1133
797
|
: of(undefined);
|
1134
798
|
}
|
1135
799
|
catch (err) {
|
@@ -1139,7 +803,7 @@ class SandboxManagerApiService {
|
|
1139
803
|
updateSalesforceOrganization$(payload) {
|
1140
804
|
try {
|
1141
805
|
return window.doSandboxCall
|
1142
|
-
? from(window.doSandboxCall(`orgs/${payload.orgId}`, JSON.stringify(payload), 'POST')).pipe(map
|
806
|
+
? from(window.doSandboxCall(`orgs/${payload.orgId}`, JSON.stringify(payload), 'POST')).pipe(map(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError(() => of(undefined)))
|
1143
807
|
: of(undefined);
|
1144
808
|
}
|
1145
809
|
catch (_a) {
|
@@ -1149,7 +813,7 @@ class SandboxManagerApiService {
|
|
1149
813
|
deleteSalesforceOrganization$(payload) {
|
1150
814
|
try {
|
1151
815
|
return window.doSandboxCall
|
1152
|
-
? from(window.doSandboxCall(`orgs/${payload.orgId}`, '', 'DELETE')).pipe(map
|
816
|
+
? from(window.doSandboxCall(`orgs/${payload.orgId}`, '', 'DELETE')).pipe(map(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError(() => of(undefined)))
|
1153
817
|
: of(undefined);
|
1154
818
|
}
|
1155
819
|
catch (_a) {
|
@@ -1159,7 +823,7 @@ class SandboxManagerApiService {
|
|
1159
823
|
activateSalesforceOrganization$(payload) {
|
1160
824
|
try {
|
1161
825
|
return window.doSandboxCall
|
1162
|
-
? from(window.doSandboxCall(`orgs/${payload.orgId}/activate`, JSON.stringify({}), 'POST')).pipe(map
|
826
|
+
? from(window.doSandboxCall(`orgs/${payload.orgId}/activate`, JSON.stringify({}), 'POST')).pipe(map(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError(() => of(undefined)))
|
1163
827
|
: of(undefined);
|
1164
828
|
}
|
1165
829
|
catch (_a) {
|
@@ -1169,7 +833,7 @@ class SandboxManagerApiService {
|
|
1169
833
|
deactivateSalesforceOrganization$(payload) {
|
1170
834
|
try {
|
1171
835
|
return window.doSandboxCall
|
1172
|
-
? from(window.doSandboxCall(`orgs/${payload.orgId}/deactivate`, JSON.stringify({}), 'POST')).pipe(map
|
836
|
+
? from(window.doSandboxCall(`orgs/${payload.orgId}/deactivate`, JSON.stringify({}), 'POST')).pipe(map(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError(() => of(undefined)))
|
1173
837
|
: of(undefined);
|
1174
838
|
}
|
1175
839
|
catch (_a) {
|
@@ -1238,11 +902,8 @@ ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.
|
|
1238
902
|
ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, providers: [
|
1239
903
|
BaseHttpService,
|
1240
904
|
XrayService,
|
1241
|
-
DocumentAttachmentApiService,
|
1242
905
|
GuidedSellingsAdminApiService,
|
1243
|
-
CatalogAdminApiService,
|
1244
906
|
GuidedSellingApiService,
|
1245
|
-
CatalogApiService,
|
1246
907
|
AccountApiService,
|
1247
908
|
OrgInfoApiService,
|
1248
909
|
OffersApiService,
|
@@ -1263,11 +924,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1263
924
|
providers: [
|
1264
925
|
BaseHttpService,
|
1265
926
|
XrayService,
|
1266
|
-
DocumentAttachmentApiService,
|
1267
927
|
GuidedSellingsAdminApiService,
|
1268
|
-
CatalogAdminApiService,
|
1269
928
|
GuidedSellingApiService,
|
1270
|
-
CatalogApiService,
|
1271
929
|
AccountApiService,
|
1272
930
|
OrgInfoApiService,
|
1273
931
|
OffersApiService,
|
@@ -1288,5 +946,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1288
946
|
* Generated bundle index. Do not edit.
|
1289
947
|
*/
|
1290
948
|
|
1291
|
-
export { AccountApiService, ApiModule,
|
949
|
+
export { AccountApiService, ApiModule, ContractedPriceApiService, FlowStateApiService, GuidedSellingApiService, GuidedSellingsAdminApiService, OffersApiService, OrgInfoApiService, PortalsApiService, PromotionsApiService, RebateProgramApiService, RebateTypeApiService, SandboxManagerApiService, StatefulConfigurationApiService, VeloceAuthService, handleCanvasResponse };
|
1292
950
|
//# sourceMappingURL=veloceapps-api.mjs.map
|