@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,14 +1,14 @@
|
|
1
1
|
import * as i1$1 from '@angular/common/http';
|
2
|
-
import { HttpParams, HttpHeaders,
|
2
|
+
import { HttpParams, HttpHeaders, HttpClientModule } from '@angular/common/http';
|
3
3
|
import * as i0 from '@angular/core';
|
4
4
|
import { Injectable, NgModule } from '@angular/core';
|
5
5
|
import { ApiV2Module } from '@veloceapps/api/v2';
|
6
6
|
import * as i1 from '@veloceapps/core';
|
7
|
-
import { Expression, Operator, isApexError, isCanvasError,
|
8
|
-
import { noop,
|
9
|
-
import {
|
10
|
-
import * as i1$2 from 'primeng/api';
|
7
|
+
import { Expression, Operator, isApexError, isCanvasError, BaseHttpService, XrayService } from '@veloceapps/core';
|
8
|
+
import { noop, map as map$1, from, catchError, of } from 'rxjs';
|
9
|
+
import { tap, map } from 'rxjs/operators';
|
11
10
|
import { isArray } from 'lodash';
|
11
|
+
import * as i1$2 from 'primeng/api';
|
12
12
|
|
13
13
|
class AccountApiService {
|
14
14
|
constructor(httpService) {
|
@@ -384,116 +384,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
384
384
|
type: Injectable
|
385
385
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
386
386
|
|
387
|
-
class ConfigurationSettingsDTO {
|
388
|
-
static fromDTO(dto, key) {
|
389
|
-
return {
|
390
|
-
id: dto?.id,
|
391
|
-
key: dto?.key || key || '',
|
392
|
-
value: dto?.value,
|
393
|
-
};
|
394
|
-
}
|
395
|
-
static toDTO(data) {
|
396
|
-
return {
|
397
|
-
id: data.id,
|
398
|
-
key: data.key,
|
399
|
-
value: data.value,
|
400
|
-
};
|
401
|
-
}
|
402
|
-
constructor(id, key, value) {
|
403
|
-
this.id = id;
|
404
|
-
this.key = key;
|
405
|
-
this.value = value;
|
406
|
-
}
|
407
|
-
}
|
408
|
-
|
409
|
-
class ConfigurationSettingsApiService {
|
410
|
-
constructor(httpService, messageService) {
|
411
|
-
this.httpService = httpService;
|
412
|
-
this.messageService = messageService;
|
413
|
-
this.SERVICE_URL = '/configuration-settings';
|
414
|
-
}
|
415
|
-
fetchSettings(options) {
|
416
|
-
return this.httpService
|
417
|
-
.api({
|
418
|
-
url: `${this.SERVICE_URL}`,
|
419
|
-
method: 'get',
|
420
|
-
...options,
|
421
|
-
})
|
422
|
-
.pipe(map((settings) => settings.map(setting => ConfigurationSettingsDTO.fromDTO(setting))));
|
423
|
-
}
|
424
|
-
fetchSetting(settingsKey, options) {
|
425
|
-
return this.httpService
|
426
|
-
.api({
|
427
|
-
url: `${this.SERVICE_URL}/byKey/${settingsKey}`,
|
428
|
-
method: 'get',
|
429
|
-
...options,
|
430
|
-
skipErrorHandler: true,
|
431
|
-
})
|
432
|
-
.pipe(map((setting) => ConfigurationSettingsDTO.fromDTO(setting, settingsKey)), catchError(err => {
|
433
|
-
if (err instanceof HttpErrorResponse && err.status === 404) {
|
434
|
-
if (!options?.skipErrorHandler) {
|
435
|
-
this.messageService.add({
|
436
|
-
severity: 'error',
|
437
|
-
summary: `Configuration Setting "${settingsKey}" is not found`,
|
438
|
-
sticky: true,
|
439
|
-
});
|
440
|
-
}
|
441
|
-
return of(null);
|
442
|
-
}
|
443
|
-
throw err;
|
444
|
-
}));
|
445
|
-
}
|
446
|
-
createSetting(setting, options) {
|
447
|
-
const request = ConfigurationSettingsDTO.toDTO(setting);
|
448
|
-
return this.httpService.api({
|
449
|
-
url: `${this.SERVICE_URL}`,
|
450
|
-
method: 'post',
|
451
|
-
body: {
|
452
|
-
...request,
|
453
|
-
},
|
454
|
-
...options,
|
455
|
-
});
|
456
|
-
}
|
457
|
-
updateSetting(setting, options) {
|
458
|
-
const request = ConfigurationSettingsDTO.toDTO(setting);
|
459
|
-
return this.httpService.api({
|
460
|
-
url: `${this.SERVICE_URL}/${request.id}`,
|
461
|
-
method: 'put',
|
462
|
-
body: {
|
463
|
-
...request,
|
464
|
-
},
|
465
|
-
...options,
|
466
|
-
});
|
467
|
-
}
|
468
|
-
removeSetting(setting, options) {
|
469
|
-
const request = ConfigurationSettingsDTO.toDTO(setting);
|
470
|
-
return this.httpService.api({
|
471
|
-
url: `${this.SERVICE_URL}/${request.id}`,
|
472
|
-
method: 'delete',
|
473
|
-
...options,
|
474
|
-
});
|
475
|
-
}
|
476
|
-
restoreSetting(settingId, options) {
|
477
|
-
return this.httpService.api({
|
478
|
-
url: `${this.SERVICE_URL}/${settingId}/restore`,
|
479
|
-
method: 'patch',
|
480
|
-
...options,
|
481
|
-
});
|
482
|
-
}
|
483
|
-
clear(name, options) {
|
484
|
-
return this.httpService.api({
|
485
|
-
method: 'get',
|
486
|
-
url: '/cache/evict/' + name,
|
487
|
-
...options,
|
488
|
-
});
|
489
|
-
}
|
490
|
-
}
|
491
|
-
ConfigurationSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService, deps: [{ token: i1.BaseHttpService }, { token: i1$2.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
492
|
-
ConfigurationSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService });
|
493
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService, decorators: [{
|
494
|
-
type: Injectable
|
495
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i1$2.MessageService }]; } });
|
496
|
-
|
497
387
|
class ContractedPriceApiService {
|
498
388
|
constructor(baseHttpService) {
|
499
389
|
this.baseHttpService = baseHttpService;
|
@@ -597,81 +487,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
597
487
|
type: Injectable
|
598
488
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i1.FileDownloadService }]; } });
|
599
489
|
|
600
|
-
class EndpointsApiService {
|
601
|
-
constructor(baseHttpService) {
|
602
|
-
this.baseHttpService = baseHttpService;
|
603
|
-
this.adminServiceUrl = '/admin/api-endpoints';
|
604
|
-
this.serviceUrl = '/api-endpoints';
|
605
|
-
}
|
606
|
-
fetchEndpoints$() {
|
607
|
-
return this.searchEndpoints$(new Expression(), 0, -1);
|
608
|
-
}
|
609
|
-
searchEndpoints$(expression, skip, count) {
|
610
|
-
let params = new HttpParams();
|
611
|
-
params = params.set('skip', '' + skip);
|
612
|
-
params = params.set('count', '' + count);
|
613
|
-
return this.baseHttpService.api({
|
614
|
-
method: 'post',
|
615
|
-
url: `${this.adminServiceUrl}/search`,
|
616
|
-
params,
|
617
|
-
body: expression,
|
618
|
-
});
|
619
|
-
}
|
620
|
-
removeEndpoint$(id) {
|
621
|
-
return this.baseHttpService.api({
|
622
|
-
url: `${this.adminServiceUrl}/${id}`,
|
623
|
-
method: 'delete',
|
624
|
-
});
|
625
|
-
}
|
626
|
-
restoreEndpoint$(id) {
|
627
|
-
return this.baseHttpService.api({
|
628
|
-
url: `${this.adminServiceUrl}/${id}/restore`,
|
629
|
-
method: 'patch',
|
630
|
-
});
|
631
|
-
}
|
632
|
-
fetchEndpoint$(id) {
|
633
|
-
return this.baseHttpService.api({
|
634
|
-
url: `${this.adminServiceUrl}/${id}`,
|
635
|
-
method: 'get',
|
636
|
-
});
|
637
|
-
}
|
638
|
-
createEndpoint$(body) {
|
639
|
-
return this.baseHttpService.api({
|
640
|
-
url: `${this.adminServiceUrl}`,
|
641
|
-
method: 'post',
|
642
|
-
body,
|
643
|
-
});
|
644
|
-
}
|
645
|
-
updateEndpoint$(body) {
|
646
|
-
return this.baseHttpService.api({
|
647
|
-
url: `${this.adminServiceUrl}/${body.id}`,
|
648
|
-
method: 'put',
|
649
|
-
body,
|
650
|
-
});
|
651
|
-
}
|
652
|
-
duplicateEndpoint$(cloneRequest) {
|
653
|
-
return this.baseHttpService.api({
|
654
|
-
url: `${this.adminServiceUrl}/${cloneRequest.id}/clone`,
|
655
|
-
method: 'post',
|
656
|
-
body: cloneRequest,
|
657
|
-
});
|
658
|
-
}
|
659
|
-
executeEndpoint$(body) {
|
660
|
-
return this.baseHttpService.api({
|
661
|
-
url: `${this.serviceUrl}/execute`,
|
662
|
-
method: 'post',
|
663
|
-
body,
|
664
|
-
responseType: 'text',
|
665
|
-
skipErrorHandler: true,
|
666
|
-
});
|
667
|
-
}
|
668
|
-
}
|
669
|
-
EndpointsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
670
|
-
EndpointsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsApiService });
|
671
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsApiService, decorators: [{
|
672
|
-
type: Injectable
|
673
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
674
|
-
|
675
490
|
class FlowStateApiService {
|
676
491
|
constructor(httpService) {
|
677
492
|
this.httpService = httpService;
|
@@ -811,31 +626,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
811
626
|
type: Injectable
|
812
627
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
813
628
|
|
814
|
-
class FlowsApiService {
|
815
|
-
constructor(configurationSettingsApiService) {
|
816
|
-
this.configurationSettingsApiService = configurationSettingsApiService;
|
817
|
-
this.flowsKey = 'flows';
|
818
|
-
}
|
819
|
-
getFlow(id) {
|
820
|
-
return this.fetchFlows().pipe(map(flows => flows.find(flow => flow.id == id)), map(flow => {
|
821
|
-
if (!flow) {
|
822
|
-
throw new Error(`Flow with flowId=${id} is not defined`);
|
823
|
-
}
|
824
|
-
return flow;
|
825
|
-
}));
|
826
|
-
}
|
827
|
-
fetchFlows() {
|
828
|
-
return this.configurationSettingsApiService
|
829
|
-
.fetchSetting(this.flowsKey)
|
830
|
-
.pipe(map((setting) => (setting?.value ? JSON.parse(setting.value) : [])));
|
831
|
-
}
|
832
|
-
}
|
833
|
-
FlowsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
834
|
-
FlowsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService });
|
835
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, decorators: [{
|
836
|
-
type: Injectable
|
837
|
-
}], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
|
838
|
-
|
839
629
|
class GuidedSellingsAdminApiService {
|
840
630
|
constructor(baseHttpService) {
|
841
631
|
this.baseHttpService = baseHttpService;
|
@@ -1046,7 +836,7 @@ class OrgInfoApiService {
|
|
1046
836
|
getOrgInfo$() {
|
1047
837
|
try {
|
1048
838
|
return window.doCanvasCall && window.ORGANIZATION_ID
|
1049
|
-
? from(window.doCanvasCall(`org-info/${window.ORGANIZATION_ID}`, null)).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError
|
839
|
+
? from(window.doCanvasCall(`org-info/${window.ORGANIZATION_ID}`, null)).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError(() => of(undefined)))
|
1050
840
|
: of(undefined);
|
1051
841
|
}
|
1052
842
|
catch {
|
@@ -1056,7 +846,7 @@ class OrgInfoApiService {
|
|
1056
846
|
getAvailableVersionsInfo$() {
|
1057
847
|
try {
|
1058
848
|
return window.doCanvasCall && window.ORGANIZATION_ID
|
1059
|
-
? from(window.doCanvasCall('versions/available', 'include_all=true')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError
|
849
|
+
? from(window.doCanvasCall('versions/available', 'include_all=true')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError(() => of(undefined)))
|
1060
850
|
: of(undefined);
|
1061
851
|
}
|
1062
852
|
catch {
|
@@ -1066,7 +856,7 @@ class OrgInfoApiService {
|
|
1066
856
|
upgradeVersion$(targetVersion) {
|
1067
857
|
try {
|
1068
858
|
return window.doCanvasCall && window.ORGANIZATION_ID
|
1069
|
-
? from(window.doCanvasCall('versions/upgrade', `target_version=${targetVersion}`)).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError
|
859
|
+
? from(window.doCanvasCall('versions/upgrade', `target_version=${targetVersion}`)).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError(() => of(undefined)))
|
1070
860
|
: of(undefined);
|
1071
861
|
}
|
1072
862
|
catch {
|
@@ -1080,147 +870,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1080
870
|
type: Injectable
|
1081
871
|
}], ctorParameters: function () { return [{ type: i1$2.MessageService }]; } });
|
1082
872
|
|
1083
|
-
class SalesforceApiService {
|
1084
|
-
constructor(httpService) {
|
1085
|
-
this.httpService = httpService;
|
1086
|
-
this.SERVICE_URL = '/proxy';
|
1087
|
-
}
|
1088
|
-
query(searchRequest, objectName, options) {
|
1089
|
-
return this.httpService.api({
|
1090
|
-
method: 'post',
|
1091
|
-
body: { ...searchRequest, count: searchRequest.count || 100 },
|
1092
|
-
url: `${this.SERVICE_URL}/query/${objectName}`,
|
1093
|
-
...options,
|
1094
|
-
});
|
1095
|
-
}
|
1096
|
-
queryObjects(search, options) {
|
1097
|
-
let params = new HttpParams();
|
1098
|
-
if (search) {
|
1099
|
-
params = params.append('search', search);
|
1100
|
-
}
|
1101
|
-
return this.httpService.api({
|
1102
|
-
url: `${this.SERVICE_URL}/query`,
|
1103
|
-
params,
|
1104
|
-
...options,
|
1105
|
-
});
|
1106
|
-
}
|
1107
|
-
search(req, options) {
|
1108
|
-
return this.httpService.api({
|
1109
|
-
url: `${this.SERVICE_URL}/rest/search`,
|
1110
|
-
params: { q: req.searchString },
|
1111
|
-
...options,
|
1112
|
-
});
|
1113
|
-
}
|
1114
|
-
describeObject(objectName, options) {
|
1115
|
-
const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields`;
|
1116
|
-
return this.httpService.api({ url: methodUrl, ...options });
|
1117
|
-
}
|
1118
|
-
describeField(objectName, fieldName, options) {
|
1119
|
-
const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields/${fieldName}`;
|
1120
|
-
return this.httpService.api({ url: methodUrl, ...options });
|
1121
|
-
}
|
1122
|
-
describe2(objectName, fields, options) {
|
1123
|
-
const methodUrl = `${this.SERVICE_URL}/describe/${objectName}/fields`;
|
1124
|
-
return this.httpService.api({ method: 'post', url: methodUrl, body: fields, ...options });
|
1125
|
-
}
|
1126
|
-
apexGetRequest(path, params, options) {
|
1127
|
-
// this line is needed because HttpParams instance from Integration behaves wrong in studio instance of Angular
|
1128
|
-
const httpParams = new HttpParams({ fromString: params.toString() });
|
1129
|
-
return this.httpService.api({ url: `${this.SERVICE_URL}/apex${path}`, params: httpParams, ...options });
|
1130
|
-
}
|
1131
|
-
apexPostRequest(path, body, options) {
|
1132
|
-
return this.httpService.api({
|
1133
|
-
method: 'post',
|
1134
|
-
body,
|
1135
|
-
url: `${this.SERVICE_URL}/apex${path}`,
|
1136
|
-
...options,
|
1137
|
-
});
|
1138
|
-
}
|
1139
|
-
restGetRequest(path, params, options) {
|
1140
|
-
const httpParams = new HttpParams({ fromString: params.toString() });
|
1141
|
-
return this.httpService.api({ url: `${this.SERVICE_URL}/rest${path}`, params: httpParams, ...options });
|
1142
|
-
}
|
1143
|
-
getGlobalPicklists() {
|
1144
|
-
return this.httpService.api({
|
1145
|
-
method: 'get',
|
1146
|
-
url: `${this.SERVICE_URL}/globalvalueset`,
|
1147
|
-
});
|
1148
|
-
}
|
1149
|
-
getGlobalPicklistValues(id) {
|
1150
|
-
return this.httpService.api({
|
1151
|
-
method: 'get',
|
1152
|
-
url: `${this.SERVICE_URL}/globalvalueset/${id}/values`,
|
1153
|
-
});
|
1154
|
-
}
|
1155
|
-
}
|
1156
|
-
SalesforceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1157
|
-
SalesforceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService });
|
1158
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, decorators: [{
|
1159
|
-
type: Injectable
|
1160
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1161
|
-
|
1162
|
-
class PCMApiService {
|
1163
|
-
constructor(sfApiService) {
|
1164
|
-
this.sfApiService = sfApiService;
|
1165
|
-
}
|
1166
|
-
fetchPCMByProductId(productId) {
|
1167
|
-
return this.sfApiService.restGetRequest(`/connect/pcm/products/${productId}`, new HttpParams()).pipe(tap$1(response => {
|
1168
|
-
if (response.status.code !== '200') {
|
1169
|
-
throw new Error(response.status.message);
|
1170
|
-
}
|
1171
|
-
}), map$1(response => {
|
1172
|
-
const pcm = response.products[0];
|
1173
|
-
if (!pcm) {
|
1174
|
-
throw new Error('PCM product is not found');
|
1175
|
-
}
|
1176
|
-
return pcm;
|
1177
|
-
}));
|
1178
|
-
}
|
1179
|
-
}
|
1180
|
-
PCMApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PCMApiService, deps: [{ token: SalesforceApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1181
|
-
PCMApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PCMApiService });
|
1182
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PCMApiService, decorators: [{
|
1183
|
-
type: Injectable
|
1184
|
-
}], ctorParameters: function () { return [{ type: SalesforceApiService }]; } });
|
1185
|
-
|
1186
|
-
class PicklistsApiService {
|
1187
|
-
constructor(baseHttpService) {
|
1188
|
-
this.baseHttpService = baseHttpService;
|
1189
|
-
this.serviceUrl = '/admin';
|
1190
|
-
this.fetchAllPicklists$ = () => this.baseHttpService.api({ url: `${this.serviceUrl}/picklists` });
|
1191
|
-
this.fetchPicklist$ = (code) => this.baseHttpService.api({ url: `${this.serviceUrl}/picklists/${code}` });
|
1192
|
-
this.createPicklist$ = (picklist) => {
|
1193
|
-
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/picklists`, body: picklist });
|
1194
|
-
};
|
1195
|
-
this.updatePicklist$ = (picklist) => {
|
1196
|
-
return this.baseHttpService.api({
|
1197
|
-
method: 'put',
|
1198
|
-
url: `${this.serviceUrl}/picklists/${picklist.id}`,
|
1199
|
-
body: picklist,
|
1200
|
-
});
|
1201
|
-
};
|
1202
|
-
this.removePicklist$ = (id) => this.baseHttpService.api({ method: 'delete', url: `${this.serviceUrl}/picklists/${id}` });
|
1203
|
-
this.restorePicklist$ = (id) => {
|
1204
|
-
return this.baseHttpService.api({
|
1205
|
-
url: `${this.serviceUrl}/picklists/${id}/restore`,
|
1206
|
-
method: 'patch',
|
1207
|
-
});
|
1208
|
-
};
|
1209
|
-
this.addPicklistValue$ = (picklist, value) => {
|
1210
|
-
const data = {
|
1211
|
-
...picklist,
|
1212
|
-
values: [...picklist.values, value],
|
1213
|
-
};
|
1214
|
-
return this.baseHttpService.api({ method: 'put', url: `${this.serviceUrl}/picklists/${picklist.id}`, body: data });
|
1215
|
-
};
|
1216
|
-
}
|
1217
|
-
}
|
1218
|
-
PicklistsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1219
|
-
PicklistsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService });
|
1220
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService, decorators: [{
|
1221
|
-
type: Injectable
|
1222
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1223
|
-
|
1224
873
|
class PortalsApiService {
|
1225
874
|
constructor(baseHttpService) {
|
1226
875
|
this.baseHttpService = baseHttpService;
|
@@ -1293,154 +942,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1293
942
|
type: Injectable
|
1294
943
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1295
944
|
|
1296
|
-
class ProductApiService {
|
1297
|
-
constructor(baseHttpService) {
|
1298
|
-
this.baseHttpService = baseHttpService;
|
1299
|
-
this.serviceUrl = '/products';
|
1300
|
-
this.fetchProducts$ = (payload) => {
|
1301
|
-
let params = new HttpParams();
|
1302
|
-
params = params.append('count', payload.count);
|
1303
|
-
params = params.append('skip', payload.skip);
|
1304
|
-
if (payload.name) {
|
1305
|
-
params = params.append('name', payload.name);
|
1306
|
-
}
|
1307
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}`, params });
|
1308
|
-
};
|
1309
|
-
this.searchProducts$ = (expression, skip, count) => {
|
1310
|
-
let params = new HttpParams();
|
1311
|
-
params = params.set('skip', '' + skip);
|
1312
|
-
params = params.set('count', '' + count);
|
1313
|
-
return this.baseHttpService.api({
|
1314
|
-
method: 'post',
|
1315
|
-
url: `${this.serviceUrl}/search`,
|
1316
|
-
params: params,
|
1317
|
-
body: expression,
|
1318
|
-
});
|
1319
|
-
};
|
1320
|
-
this.fetchProduct$ = (id) => this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
1321
|
-
this.fetchAttributes$ = () => {
|
1322
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/attributes/definition` });
|
1323
|
-
};
|
1324
|
-
this.searchAttributes$ = (expression, skip, count) => {
|
1325
|
-
let params = new HttpParams();
|
1326
|
-
params = params.set('skip', '' + skip);
|
1327
|
-
params = params.set('count', '' + count);
|
1328
|
-
return this.baseHttpService.api({
|
1329
|
-
method: 'post',
|
1330
|
-
url: `${this.serviceUrl}/attributes/definition/search`,
|
1331
|
-
params: params,
|
1332
|
-
body: expression,
|
1333
|
-
});
|
1334
|
-
};
|
1335
|
-
this.fetchAttributesByModel = (modelId) => {
|
1336
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/attributes/definition/forModel/${modelId}` });
|
1337
|
-
};
|
1338
|
-
this.createNewProduct$ = (productData) => {
|
1339
|
-
return this.baseHttpService.api({
|
1340
|
-
url: `${this.serviceUrl}`,
|
1341
|
-
method: 'post',
|
1342
|
-
body: productData,
|
1343
|
-
});
|
1344
|
-
};
|
1345
|
-
this.updateProduct$ = (body) => {
|
1346
|
-
return this.baseHttpService.api({
|
1347
|
-
url: `${this.serviceUrl}/${body.id}`,
|
1348
|
-
method: 'put',
|
1349
|
-
body,
|
1350
|
-
});
|
1351
|
-
};
|
1352
|
-
this.removeProduct$ = (id) => {
|
1353
|
-
return this.baseHttpService.api({
|
1354
|
-
url: `${this.serviceUrl}/${id}`,
|
1355
|
-
method: 'delete',
|
1356
|
-
});
|
1357
|
-
};
|
1358
|
-
this.restoreProduct$ = (id) => {
|
1359
|
-
return this.baseHttpService.api({
|
1360
|
-
url: `${this.serviceUrl}/${id}/restore`,
|
1361
|
-
method: 'patch',
|
1362
|
-
});
|
1363
|
-
};
|
1364
|
-
this.createProductAttribute$ = (attributeData) => {
|
1365
|
-
return this.baseHttpService.api({
|
1366
|
-
url: `${this.serviceUrl}/attributes`,
|
1367
|
-
method: 'post',
|
1368
|
-
body: attributeData,
|
1369
|
-
});
|
1370
|
-
};
|
1371
|
-
this.updateProductAttribute$ = (attributeData) => {
|
1372
|
-
return this.baseHttpService.api({
|
1373
|
-
url: `${this.serviceUrl}/attributes/${attributeData.id}`,
|
1374
|
-
method: 'put',
|
1375
|
-
body: attributeData,
|
1376
|
-
});
|
1377
|
-
};
|
1378
|
-
this.removeProductAttribute$ = (id) => {
|
1379
|
-
return this.baseHttpService.api({
|
1380
|
-
url: `${this.serviceUrl}/attributes/${id}`,
|
1381
|
-
method: 'delete',
|
1382
|
-
});
|
1383
|
-
};
|
1384
|
-
this.createNewAttribute$ = (attributeData) => {
|
1385
|
-
return this.baseHttpService.api({
|
1386
|
-
url: `${this.serviceUrl}/attributes/definition`,
|
1387
|
-
method: 'post',
|
1388
|
-
body: attributeData,
|
1389
|
-
});
|
1390
|
-
};
|
1391
|
-
this.updateAttribute$ = (body) => {
|
1392
|
-
return this.baseHttpService.api({
|
1393
|
-
url: `${this.serviceUrl}/attributes/definition/${body.id}`,
|
1394
|
-
method: 'put',
|
1395
|
-
body,
|
1396
|
-
});
|
1397
|
-
};
|
1398
|
-
this.removeAttribute$ = (id) => {
|
1399
|
-
return this.baseHttpService.api({
|
1400
|
-
url: `${this.serviceUrl}/attributes/definition/${id}`,
|
1401
|
-
method: 'delete',
|
1402
|
-
});
|
1403
|
-
};
|
1404
|
-
this.restoreAttribute$ = (id) => {
|
1405
|
-
return this.baseHttpService.api({
|
1406
|
-
url: `${this.serviceUrl}/attributes/definition/${id}/restore`,
|
1407
|
-
method: 'patch',
|
1408
|
-
});
|
1409
|
-
};
|
1410
|
-
}
|
1411
|
-
attachImage$(productId, file) {
|
1412
|
-
const data = new FormData();
|
1413
|
-
data.append('image', file);
|
1414
|
-
return this.baseHttpService.upload({
|
1415
|
-
method: 'post',
|
1416
|
-
url: `${this.serviceUrl}/${productId}/image`,
|
1417
|
-
body: data,
|
1418
|
-
});
|
1419
|
-
}
|
1420
|
-
removeImage$(productId) {
|
1421
|
-
return this.baseHttpService.api({
|
1422
|
-
method: 'delete',
|
1423
|
-
url: `${this.serviceUrl}/${productId}/image`,
|
1424
|
-
});
|
1425
|
-
}
|
1426
|
-
fetchImage$(productId) {
|
1427
|
-
return this.baseHttpService.api({
|
1428
|
-
url: this.getImageUrl(productId),
|
1429
|
-
method: 'get',
|
1430
|
-
responseType: 'blob',
|
1431
|
-
errorHandler: noop,
|
1432
|
-
});
|
1433
|
-
}
|
1434
|
-
getImageUrl(productId) {
|
1435
|
-
return `${this.serviceUrl}/${productId}/image`;
|
1436
|
-
}
|
1437
|
-
}
|
1438
|
-
ProductApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1439
|
-
ProductApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService });
|
1440
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService, decorators: [{
|
1441
|
-
type: Injectable
|
1442
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1443
|
-
|
1444
945
|
class PromotionsApiService {
|
1445
946
|
constructor(baseHttpService) {
|
1446
947
|
this.baseHttpService = baseHttpService;
|
@@ -1645,7 +1146,7 @@ class SandboxManagerApiService {
|
|
1645
1146
|
getSalesforceOrganizations$() {
|
1646
1147
|
try {
|
1647
1148
|
return window.doSandboxCall
|
1648
|
-
? from(window.doSandboxCall('orgs', '', 'GET')).pipe(map$1(response => handleCanvasResponse(response, [], this.publishErrorMessage)), catchError
|
1149
|
+
? from(window.doSandboxCall('orgs', '', 'GET')).pipe(map$1(response => handleCanvasResponse(response, [], this.publishErrorMessage)), catchError(() => of([])))
|
1649
1150
|
: of([]);
|
1650
1151
|
}
|
1651
1152
|
catch {
|
@@ -1655,7 +1156,7 @@ class SandboxManagerApiService {
|
|
1655
1156
|
getAvailableSalesforceOrganizationSizes$() {
|
1656
1157
|
try {
|
1657
1158
|
return window.doSandboxCall
|
1658
|
-
? from(window.doSandboxCall('available-sizes', '', 'GET')).pipe(map$1(response => handleCanvasResponse(response, {}, this.publishErrorMessage)), catchError
|
1159
|
+
? from(window.doSandboxCall('available-sizes', '', 'GET')).pipe(map$1(response => handleCanvasResponse(response, {}, this.publishErrorMessage)), catchError(() => of({})))
|
1659
1160
|
: of({});
|
1660
1161
|
}
|
1661
1162
|
catch {
|
@@ -1665,7 +1166,7 @@ class SandboxManagerApiService {
|
|
1665
1166
|
createSalesforceOrganization$(payload) {
|
1666
1167
|
try {
|
1667
1168
|
return window.doSandboxCall
|
1668
|
-
? from(window.doSandboxCall('orgs', JSON.stringify(payload), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError
|
1169
|
+
? from(window.doSandboxCall('orgs', JSON.stringify(payload), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError(() => of(undefined)))
|
1669
1170
|
: of(undefined);
|
1670
1171
|
}
|
1671
1172
|
catch (err) {
|
@@ -1675,7 +1176,7 @@ class SandboxManagerApiService {
|
|
1675
1176
|
updateSalesforceOrganization$(payload) {
|
1676
1177
|
try {
|
1677
1178
|
return window.doSandboxCall
|
1678
|
-
? from(window.doSandboxCall(`orgs/${payload.orgId}`, JSON.stringify(payload), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError
|
1179
|
+
? from(window.doSandboxCall(`orgs/${payload.orgId}`, JSON.stringify(payload), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError(() => of(undefined)))
|
1679
1180
|
: of(undefined);
|
1680
1181
|
}
|
1681
1182
|
catch {
|
@@ -1685,7 +1186,7 @@ class SandboxManagerApiService {
|
|
1685
1186
|
deleteSalesforceOrganization$(payload) {
|
1686
1187
|
try {
|
1687
1188
|
return window.doSandboxCall
|
1688
|
-
? from(window.doSandboxCall(`orgs/${payload.orgId}`, '', 'DELETE')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError
|
1189
|
+
? from(window.doSandboxCall(`orgs/${payload.orgId}`, '', 'DELETE')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError(() => of(undefined)))
|
1689
1190
|
: of(undefined);
|
1690
1191
|
}
|
1691
1192
|
catch {
|
@@ -1695,7 +1196,7 @@ class SandboxManagerApiService {
|
|
1695
1196
|
activateSalesforceOrganization$(payload) {
|
1696
1197
|
try {
|
1697
1198
|
return window.doSandboxCall
|
1698
|
-
? from(window.doSandboxCall(`orgs/${payload.orgId}/activate`, JSON.stringify({}), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError
|
1199
|
+
? from(window.doSandboxCall(`orgs/${payload.orgId}/activate`, JSON.stringify({}), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError(() => of(undefined)))
|
1699
1200
|
: of(undefined);
|
1700
1201
|
}
|
1701
1202
|
catch {
|
@@ -1705,7 +1206,7 @@ class SandboxManagerApiService {
|
|
1705
1206
|
deactivateSalesforceOrganization$(payload) {
|
1706
1207
|
try {
|
1707
1208
|
return window.doSandboxCall
|
1708
|
-
? from(window.doSandboxCall(`orgs/${payload.orgId}/deactivate`, JSON.stringify({}), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError
|
1209
|
+
? from(window.doSandboxCall(`orgs/${payload.orgId}/deactivate`, JSON.stringify({}), 'POST')).pipe(map$1(response => handleCanvasResponse(response, undefined, this.publishErrorMessage)), catchError(() => of(undefined)))
|
1709
1210
|
: of(undefined);
|
1710
1211
|
}
|
1711
1212
|
catch {
|
@@ -1719,29 +1220,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1719
1220
|
type: Injectable
|
1720
1221
|
}], ctorParameters: function () { return [{ type: i1$2.MessageService }]; } });
|
1721
1222
|
|
1722
|
-
class ShoppingCartSettingsApiService {
|
1723
|
-
constructor(configurationSettingsApiService) {
|
1724
|
-
this.configurationSettingsApiService = configurationSettingsApiService;
|
1725
|
-
this.shoppingCartSettingsKey = 'shopping-cart';
|
1726
|
-
}
|
1727
|
-
getSetting(id) {
|
1728
|
-
return this.fetchSettings().pipe(map((settings) => parseJsonSafely(settings?.value, [])), map(settings => settings.find(setting => setting.id == id)));
|
1729
|
-
}
|
1730
|
-
fetchSettings() {
|
1731
|
-
return this.configurationSettingsApiService.fetchSetting(this.shoppingCartSettingsKey, { skipErrorHandler: true });
|
1732
|
-
}
|
1733
|
-
getSettingsMap() {
|
1734
|
-
return this.fetchSettings().pipe(map((settings) => parseJsonSafely(settings?.value, [])), map((settings) => settings.reduce((acc, setting) => {
|
1735
|
-
return { ...acc, [setting.id]: setting.properties };
|
1736
|
-
}, {})));
|
1737
|
-
}
|
1738
|
-
}
|
1739
|
-
ShoppingCartSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1740
|
-
ShoppingCartSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService });
|
1741
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService, decorators: [{
|
1742
|
-
type: Injectable
|
1743
|
-
}], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
|
1744
|
-
|
1745
1223
|
class StatefulConfigurationApiService {
|
1746
1224
|
constructor(httpService) {
|
1747
1225
|
this.httpService = httpService;
|
@@ -1790,91 +1268,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1790
1268
|
type: Injectable
|
1791
1269
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1792
1270
|
|
1793
|
-
class VeloceObjectsApiService {
|
1794
|
-
constructor(baseHttpService) {
|
1795
|
-
this.baseHttpService = baseHttpService;
|
1796
|
-
this.serviceUrl = '/veloceobjects';
|
1797
|
-
this.updateCategory$ = (category) => {
|
1798
|
-
return this.baseHttpService.api({
|
1799
|
-
method: 'put',
|
1800
|
-
url: `${this.serviceUrl}/categories/${category.id}`,
|
1801
|
-
body: category,
|
1802
|
-
});
|
1803
|
-
};
|
1804
|
-
this.deleteCategory$ = (id) => {
|
1805
|
-
return this.baseHttpService.api({
|
1806
|
-
method: 'delete',
|
1807
|
-
url: `${this.serviceUrl}/categories/${id}`,
|
1808
|
-
});
|
1809
|
-
};
|
1810
|
-
this.searchObjects$ = (searchParams, expression) => {
|
1811
|
-
const params = new HttpParams({ fromObject: { ...searchParams } });
|
1812
|
-
return this.baseHttpService.api({
|
1813
|
-
method: 'post',
|
1814
|
-
url: `${this.serviceUrl}/search`,
|
1815
|
-
params,
|
1816
|
-
body: expression || {},
|
1817
|
-
});
|
1818
|
-
};
|
1819
|
-
this.deleteObject$ = (id) => {
|
1820
|
-
return this.baseHttpService.api({
|
1821
|
-
method: 'delete',
|
1822
|
-
url: `${this.serviceUrl}/${id}`,
|
1823
|
-
});
|
1824
|
-
};
|
1825
|
-
this.duplicateObject$ = (body) => {
|
1826
|
-
return this.baseHttpService
|
1827
|
-
.api({
|
1828
|
-
method: 'post',
|
1829
|
-
url: `${this.serviceUrl}/${body.id}/clone`,
|
1830
|
-
body,
|
1831
|
-
})
|
1832
|
-
.pipe(map(response => response.clonedRecordId));
|
1833
|
-
};
|
1834
|
-
this.restoreObject$ = (id) => {
|
1835
|
-
return this.baseHttpService.api({
|
1836
|
-
method: 'patch',
|
1837
|
-
url: `${this.serviceUrl}/${id}/restore`,
|
1838
|
-
});
|
1839
|
-
};
|
1840
|
-
}
|
1841
|
-
fetchCategories$() {
|
1842
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/categories` });
|
1843
|
-
}
|
1844
|
-
createCategory$(category) {
|
1845
|
-
return this.baseHttpService.api({
|
1846
|
-
method: 'post',
|
1847
|
-
url: `${this.serviceUrl}/categories`,
|
1848
|
-
body: category,
|
1849
|
-
});
|
1850
|
-
}
|
1851
|
-
fetchObjects$() {
|
1852
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}` });
|
1853
|
-
}
|
1854
|
-
fetchObject$(id) {
|
1855
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
1856
|
-
}
|
1857
|
-
createObject$(object) {
|
1858
|
-
return this.baseHttpService.api({
|
1859
|
-
method: 'post',
|
1860
|
-
url: `${this.serviceUrl}`,
|
1861
|
-
body: object,
|
1862
|
-
});
|
1863
|
-
}
|
1864
|
-
updateObject$(object) {
|
1865
|
-
return this.baseHttpService.api({
|
1866
|
-
method: 'put',
|
1867
|
-
url: `${this.serviceUrl}/${object.id}`,
|
1868
|
-
body: object,
|
1869
|
-
});
|
1870
|
-
}
|
1871
|
-
}
|
1872
|
-
VeloceObjectsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1873
|
-
VeloceObjectsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService });
|
1874
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService, decorators: [{
|
1875
|
-
type: Injectable
|
1876
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1877
|
-
|
1878
1271
|
class ApiModule {
|
1879
1272
|
}
|
1880
1273
|
ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
@@ -1882,22 +1275,14 @@ ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.
|
|
1882
1275
|
ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, providers: [
|
1883
1276
|
BaseHttpService,
|
1884
1277
|
XrayService,
|
1885
|
-
ConfigurationSettingsApiService,
|
1886
1278
|
DocumentAttachmentApiService,
|
1887
|
-
SalesforceApiService,
|
1888
|
-
FlowsApiService,
|
1889
1279
|
GuidedSellingsAdminApiService,
|
1890
|
-
ShoppingCartSettingsApiService,
|
1891
|
-
ProductApiService,
|
1892
1280
|
CatalogAdminApiService,
|
1893
1281
|
GuidedSellingApiService,
|
1894
1282
|
CatalogApiService,
|
1895
1283
|
AccountApiService,
|
1896
|
-
PicklistsApiService,
|
1897
|
-
EndpointsApiService,
|
1898
1284
|
OrgInfoApiService,
|
1899
1285
|
OffersApiService,
|
1900
|
-
VeloceObjectsApiService,
|
1901
1286
|
StatefulConfigurationApiService,
|
1902
1287
|
RebateProgramApiService,
|
1903
1288
|
RebateTypeApiService,
|
@@ -1907,7 +1292,6 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
|
1907
1292
|
PortalsApiService,
|
1908
1293
|
FlowStateApiService,
|
1909
1294
|
SandboxManagerApiService,
|
1910
|
-
PCMApiService,
|
1911
1295
|
], imports: [HttpClientModule, ApiV2Module] });
|
1912
1296
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, decorators: [{
|
1913
1297
|
type: NgModule,
|
@@ -1916,22 +1300,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1916
1300
|
providers: [
|
1917
1301
|
BaseHttpService,
|
1918
1302
|
XrayService,
|
1919
|
-
ConfigurationSettingsApiService,
|
1920
1303
|
DocumentAttachmentApiService,
|
1921
|
-
SalesforceApiService,
|
1922
|
-
FlowsApiService,
|
1923
1304
|
GuidedSellingsAdminApiService,
|
1924
|
-
ShoppingCartSettingsApiService,
|
1925
|
-
ProductApiService,
|
1926
1305
|
CatalogAdminApiService,
|
1927
1306
|
GuidedSellingApiService,
|
1928
1307
|
CatalogApiService,
|
1929
1308
|
AccountApiService,
|
1930
|
-
PicklistsApiService,
|
1931
|
-
EndpointsApiService,
|
1932
1309
|
OrgInfoApiService,
|
1933
1310
|
OffersApiService,
|
1934
|
-
VeloceObjectsApiService,
|
1935
1311
|
StatefulConfigurationApiService,
|
1936
1312
|
RebateProgramApiService,
|
1937
1313
|
RebateTypeApiService,
|
@@ -1941,7 +1317,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1941
1317
|
PortalsApiService,
|
1942
1318
|
FlowStateApiService,
|
1943
1319
|
SandboxManagerApiService,
|
1944
|
-
PCMApiService,
|
1945
1320
|
],
|
1946
1321
|
}]
|
1947
1322
|
}] });
|
@@ -1950,5 +1325,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1950
1325
|
* Generated bundle index. Do not edit.
|
1951
1326
|
*/
|
1952
1327
|
|
1953
|
-
export { AccountApiService, ApiModule, CatalogAdminApiService, CatalogApiService,
|
1328
|
+
export { AccountApiService, ApiModule, CatalogAdminApiService, CatalogApiService, ContractedPriceApiService, DocumentAttachmentApiService, FlowStateApiService, GuidedSellingApiService, GuidedSellingsAdminApiService, OffersApiService, OrgInfoApiService, PortalsApiService, PromotionsApiService, RebateProgramApiService, RebateTypeApiService, SandboxManagerApiService, StatefulConfigurationApiService, VeloceAuthService, handleCanvasResponse };
|
1954
1329
|
//# sourceMappingURL=veloceapps-api.mjs.map
|