@veloceapps/api 8.0.0-19 → 8.0.0-20
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/index.mjs +5 -4
- package/esm2020/lib/api.module.mjs +7 -4
- package/esm2020/lib/services/auth.service.mjs +22 -0
- package/esm2020/lib/types/auth.types.mjs +2 -0
- package/esm2020/lib/types/index.mjs +2 -1
- package/fesm2015/veloceapps-api.mjs +216 -196
- package/fesm2015/veloceapps-api.mjs.map +1 -1
- package/fesm2020/veloceapps-api.mjs +216 -196
- package/fesm2020/veloceapps-api.mjs.map +1 -1
- package/index.d.ts +4 -3
- package/lib/services/auth.service.d.ts +11 -0
- package/lib/types/auth.types.d.ts +4 -0
- package/lib/types/index.d.ts +1 -0
- package/package.json +1 -1
@@ -1,5 +1,5 @@
|
|
1
|
-
import * as
|
2
|
-
import { HttpParams, HttpErrorResponse, HttpClientModule } from '@angular/common/http';
|
1
|
+
import * as i1$1 from '@angular/common/http';
|
2
|
+
import { HttpParams, HttpHeaders, HttpErrorResponse, HttpClientModule } from '@angular/common/http';
|
3
3
|
import * as i0 from '@angular/core';
|
4
4
|
import { Injectable, NgModule } from '@angular/core';
|
5
5
|
import * as i1 from '@veloceapps/core';
|
@@ -59,6 +59,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
59
59
|
type: Injectable
|
60
60
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
61
61
|
|
62
|
+
class VeloceAuthService {
|
63
|
+
constructor(http) {
|
64
|
+
this.http = http;
|
65
|
+
}
|
66
|
+
auth$(instanceUrl, accessToken) {
|
67
|
+
const headers = new HttpHeaders({
|
68
|
+
'Content-Type': 'application/json',
|
69
|
+
Authorization: `Bearer ${accessToken}`,
|
70
|
+
});
|
71
|
+
return this.http.get(`${instanceUrl}/services/apexrest/VELOCPQ/veloce-auth`, { headers });
|
72
|
+
}
|
73
|
+
}
|
74
|
+
VeloceAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceAuthService, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
75
|
+
VeloceAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceAuthService });
|
76
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceAuthService, decorators: [{
|
77
|
+
type: Injectable
|
78
|
+
}], ctorParameters: function () { return [{ type: i1$1.HttpClient }]; } });
|
79
|
+
|
62
80
|
class CatalogAdminApiService {
|
63
81
|
constructor(baseHttpService) {
|
64
82
|
this.baseHttpService = baseHttpService;
|
@@ -901,11 +919,11 @@ class DocumentTemplatesApiService {
|
|
901
919
|
return this.salesforceApiService.query(searchRequest, objectName).pipe(this.mapSfQueryResult(limit), map(value => ({ [resultObjectName]: value })));
|
902
920
|
}
|
903
921
|
}
|
904
|
-
DocumentTemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentTemplatesApiService, deps: [{ token: i1.BaseHttpService }, { token: SalesforceApiService }, { token: i1.FileDownloadService }, { token: DocumentAttachmentApiService }, { token:
|
922
|
+
DocumentTemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentTemplatesApiService, deps: [{ token: i1.BaseHttpService }, { token: SalesforceApiService }, { token: i1.FileDownloadService }, { token: DocumentAttachmentApiService }, { token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
905
923
|
DocumentTemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentTemplatesApiService });
|
906
924
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentTemplatesApiService, decorators: [{
|
907
925
|
type: Injectable
|
908
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: SalesforceApiService }, { type: i1.FileDownloadService }, { type: DocumentAttachmentApiService }, { type:
|
926
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: SalesforceApiService }, { type: i1.FileDownloadService }, { type: DocumentAttachmentApiService }, { type: i1$1.HttpClient }]; } });
|
909
927
|
|
910
928
|
class EndpointsApiService {
|
911
929
|
constructor(baseHttpService) {
|
@@ -1177,11 +1195,11 @@ class OrgInfoApiService {
|
|
1177
1195
|
return this.http.get(`${this.hostUrl}/org-info/${organizationId}`);
|
1178
1196
|
}
|
1179
1197
|
}
|
1180
|
-
OrgInfoApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService, deps: [{ token:
|
1198
|
+
OrgInfoApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
1181
1199
|
OrgInfoApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService });
|
1182
1200
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService, decorators: [{
|
1183
1201
|
type: Injectable
|
1184
|
-
}], ctorParameters: function () { return [{ type:
|
1202
|
+
}], ctorParameters: function () { return [{ type: i1$1.HttpClient }]; } });
|
1185
1203
|
|
1186
1204
|
class PicklistsApiService {
|
1187
1205
|
constructor(baseHttpService) {
|
@@ -1751,6 +1769,69 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1751
1769
|
type: Injectable
|
1752
1770
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1753
1771
|
|
1772
|
+
class PromotionsApiService {
|
1773
|
+
constructor(baseHttpService) {
|
1774
|
+
this.baseHttpService = baseHttpService;
|
1775
|
+
this.serviceUrl = '/admin/promotion';
|
1776
|
+
this.fetchAll$ = () => {
|
1777
|
+
return this.baseHttpService.api({ url: this.serviceUrl });
|
1778
|
+
};
|
1779
|
+
this.fetchOne$ = (id) => {
|
1780
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
1781
|
+
};
|
1782
|
+
this.remove$ = (id) => {
|
1783
|
+
return this.baseHttpService.api({
|
1784
|
+
url: `${this.serviceUrl}/${id}`,
|
1785
|
+
method: 'delete',
|
1786
|
+
});
|
1787
|
+
};
|
1788
|
+
this.restore$ = (id) => {
|
1789
|
+
return this.baseHttpService.api({
|
1790
|
+
method: 'patch',
|
1791
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
1792
|
+
});
|
1793
|
+
};
|
1794
|
+
this.duplicate$ = (body) => {
|
1795
|
+
return this.baseHttpService
|
1796
|
+
.api({
|
1797
|
+
url: `${this.serviceUrl}/${body.id}/clone`,
|
1798
|
+
method: 'post',
|
1799
|
+
body,
|
1800
|
+
})
|
1801
|
+
.pipe(map$1(response => response.clonedRecordId));
|
1802
|
+
};
|
1803
|
+
}
|
1804
|
+
search$(expression, skip, count) {
|
1805
|
+
let params = new HttpParams();
|
1806
|
+
if (typeof skip === 'number') {
|
1807
|
+
params = params.set('skip', '' + skip);
|
1808
|
+
}
|
1809
|
+
if (typeof count === 'number') {
|
1810
|
+
params = params.set('count', '' + count);
|
1811
|
+
}
|
1812
|
+
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
1813
|
+
}
|
1814
|
+
create$(body) {
|
1815
|
+
return this.baseHttpService.api({
|
1816
|
+
url: `${this.serviceUrl}`,
|
1817
|
+
method: 'post',
|
1818
|
+
body,
|
1819
|
+
});
|
1820
|
+
}
|
1821
|
+
update$(body) {
|
1822
|
+
return this.baseHttpService.api({
|
1823
|
+
url: `${this.serviceUrl}/${body.id}`,
|
1824
|
+
method: 'put',
|
1825
|
+
body,
|
1826
|
+
});
|
1827
|
+
}
|
1828
|
+
}
|
1829
|
+
PromotionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1830
|
+
PromotionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService });
|
1831
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService, decorators: [{
|
1832
|
+
type: Injectable
|
1833
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1834
|
+
|
1754
1835
|
class QuoteApiService {
|
1755
1836
|
constructor(httpService) {
|
1756
1837
|
this.httpService = httpService;
|
@@ -1807,6 +1888,132 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1807
1888
|
type: Injectable
|
1808
1889
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1809
1890
|
|
1891
|
+
class RebateProgramApiService {
|
1892
|
+
constructor(baseHttpService) {
|
1893
|
+
this.baseHttpService = baseHttpService;
|
1894
|
+
this.serviceUrl = '/admin/rebate-program';
|
1895
|
+
this.fetchAll$ = () => {
|
1896
|
+
return this.baseHttpService.api({ url: this.serviceUrl });
|
1897
|
+
};
|
1898
|
+
this.fetchOne$ = (id) => {
|
1899
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
1900
|
+
};
|
1901
|
+
this.remove$ = (id) => {
|
1902
|
+
return this.baseHttpService.api({
|
1903
|
+
url: `${this.serviceUrl}/${id}`,
|
1904
|
+
method: 'delete',
|
1905
|
+
});
|
1906
|
+
};
|
1907
|
+
this.restore$ = (id) => {
|
1908
|
+
return this.baseHttpService.api({
|
1909
|
+
method: 'patch',
|
1910
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
1911
|
+
});
|
1912
|
+
};
|
1913
|
+
this.duplicate$ = (body) => {
|
1914
|
+
return this.baseHttpService
|
1915
|
+
.api({
|
1916
|
+
url: `${this.serviceUrl}/${body.id}/clone`,
|
1917
|
+
method: 'post',
|
1918
|
+
body,
|
1919
|
+
})
|
1920
|
+
.pipe(map$1(response => response.clonedRecordId));
|
1921
|
+
};
|
1922
|
+
}
|
1923
|
+
search$(expression, skip, count) {
|
1924
|
+
let params = new HttpParams();
|
1925
|
+
if (typeof skip === 'number') {
|
1926
|
+
params = params.set('skip', '' + skip);
|
1927
|
+
}
|
1928
|
+
if (typeof count === 'number') {
|
1929
|
+
params = params.set('count', '' + count);
|
1930
|
+
}
|
1931
|
+
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
1932
|
+
}
|
1933
|
+
create$(body) {
|
1934
|
+
return this.baseHttpService.api({
|
1935
|
+
url: `${this.serviceUrl}`,
|
1936
|
+
method: 'post',
|
1937
|
+
body,
|
1938
|
+
});
|
1939
|
+
}
|
1940
|
+
update$(body) {
|
1941
|
+
return this.baseHttpService.api({
|
1942
|
+
url: `${this.serviceUrl}/${body.id}`,
|
1943
|
+
method: 'put',
|
1944
|
+
body,
|
1945
|
+
});
|
1946
|
+
}
|
1947
|
+
}
|
1948
|
+
RebateProgramApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1949
|
+
RebateProgramApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService });
|
1950
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, decorators: [{
|
1951
|
+
type: Injectable
|
1952
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1953
|
+
|
1954
|
+
class RebateTypeApiService {
|
1955
|
+
constructor(baseHttpService) {
|
1956
|
+
this.baseHttpService = baseHttpService;
|
1957
|
+
this.serviceUrl = '/admin/rebate-type';
|
1958
|
+
this.fetchAll$ = () => {
|
1959
|
+
return this.baseHttpService.api({ url: this.serviceUrl });
|
1960
|
+
};
|
1961
|
+
this.fetchOne$ = (id) => {
|
1962
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
1963
|
+
};
|
1964
|
+
this.remove$ = (id) => {
|
1965
|
+
return this.baseHttpService.api({
|
1966
|
+
url: `${this.serviceUrl}/${id}`,
|
1967
|
+
method: 'delete',
|
1968
|
+
});
|
1969
|
+
};
|
1970
|
+
this.restore$ = (id) => {
|
1971
|
+
return this.baseHttpService.api({
|
1972
|
+
method: 'patch',
|
1973
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
1974
|
+
});
|
1975
|
+
};
|
1976
|
+
this.duplicate$ = (body) => {
|
1977
|
+
return this.baseHttpService
|
1978
|
+
.api({
|
1979
|
+
url: `${this.serviceUrl}/${body.id}/clone`,
|
1980
|
+
method: 'post',
|
1981
|
+
body,
|
1982
|
+
})
|
1983
|
+
.pipe(map$1(response => response.clonedRecordId));
|
1984
|
+
};
|
1985
|
+
}
|
1986
|
+
search$(expression, skip, count) {
|
1987
|
+
let params = new HttpParams();
|
1988
|
+
if (typeof skip === 'number') {
|
1989
|
+
params = params.set('skip', '' + skip);
|
1990
|
+
}
|
1991
|
+
if (typeof count === 'number') {
|
1992
|
+
params = params.set('count', '' + count);
|
1993
|
+
}
|
1994
|
+
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
1995
|
+
}
|
1996
|
+
create$(body) {
|
1997
|
+
return this.baseHttpService.api({
|
1998
|
+
url: `${this.serviceUrl}`,
|
1999
|
+
method: 'post',
|
2000
|
+
body,
|
2001
|
+
});
|
2002
|
+
}
|
2003
|
+
update$(body) {
|
2004
|
+
return this.baseHttpService.api({
|
2005
|
+
url: `${this.serviceUrl}/${body.id}`,
|
2006
|
+
method: 'put',
|
2007
|
+
body,
|
2008
|
+
});
|
2009
|
+
}
|
2010
|
+
}
|
2011
|
+
RebateTypeApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2012
|
+
RebateTypeApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService });
|
2013
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, decorators: [{
|
2014
|
+
type: Injectable
|
2015
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2016
|
+
|
1810
2017
|
class RuleGroupsApiService {
|
1811
2018
|
constructor(baseHttpService) {
|
1812
2019
|
this.baseHttpService = baseHttpService;
|
@@ -2520,195 +2727,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
2520
2727
|
type: Injectable
|
2521
2728
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2522
2729
|
|
2523
|
-
class RebateProgramApiService {
|
2524
|
-
constructor(baseHttpService) {
|
2525
|
-
this.baseHttpService = baseHttpService;
|
2526
|
-
this.serviceUrl = '/admin/rebate-program';
|
2527
|
-
this.fetchAll$ = () => {
|
2528
|
-
return this.baseHttpService.api({ url: this.serviceUrl });
|
2529
|
-
};
|
2530
|
-
this.fetchOne$ = (id) => {
|
2531
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
2532
|
-
};
|
2533
|
-
this.remove$ = (id) => {
|
2534
|
-
return this.baseHttpService.api({
|
2535
|
-
url: `${this.serviceUrl}/${id}`,
|
2536
|
-
method: 'delete',
|
2537
|
-
});
|
2538
|
-
};
|
2539
|
-
this.restore$ = (id) => {
|
2540
|
-
return this.baseHttpService.api({
|
2541
|
-
method: 'patch',
|
2542
|
-
url: `${this.serviceUrl}/${id}/restore`,
|
2543
|
-
});
|
2544
|
-
};
|
2545
|
-
this.duplicate$ = (body) => {
|
2546
|
-
return this.baseHttpService
|
2547
|
-
.api({
|
2548
|
-
url: `${this.serviceUrl}/${body.id}/clone`,
|
2549
|
-
method: 'post',
|
2550
|
-
body,
|
2551
|
-
})
|
2552
|
-
.pipe(map$1(response => response.clonedRecordId));
|
2553
|
-
};
|
2554
|
-
}
|
2555
|
-
search$(expression, skip, count) {
|
2556
|
-
let params = new HttpParams();
|
2557
|
-
if (typeof skip === 'number') {
|
2558
|
-
params = params.set('skip', '' + skip);
|
2559
|
-
}
|
2560
|
-
if (typeof count === 'number') {
|
2561
|
-
params = params.set('count', '' + count);
|
2562
|
-
}
|
2563
|
-
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2564
|
-
}
|
2565
|
-
create$(body) {
|
2566
|
-
return this.baseHttpService.api({
|
2567
|
-
url: `${this.serviceUrl}`,
|
2568
|
-
method: 'post',
|
2569
|
-
body,
|
2570
|
-
});
|
2571
|
-
}
|
2572
|
-
update$(body) {
|
2573
|
-
return this.baseHttpService.api({
|
2574
|
-
url: `${this.serviceUrl}/${body.id}`,
|
2575
|
-
method: 'put',
|
2576
|
-
body,
|
2577
|
-
});
|
2578
|
-
}
|
2579
|
-
}
|
2580
|
-
RebateProgramApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2581
|
-
RebateProgramApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService });
|
2582
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, decorators: [{
|
2583
|
-
type: Injectable
|
2584
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2585
|
-
|
2586
|
-
class RebateTypeApiService {
|
2587
|
-
constructor(baseHttpService) {
|
2588
|
-
this.baseHttpService = baseHttpService;
|
2589
|
-
this.serviceUrl = '/admin/rebate-type';
|
2590
|
-
this.fetchAll$ = () => {
|
2591
|
-
return this.baseHttpService.api({ url: this.serviceUrl });
|
2592
|
-
};
|
2593
|
-
this.fetchOne$ = (id) => {
|
2594
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
2595
|
-
};
|
2596
|
-
this.remove$ = (id) => {
|
2597
|
-
return this.baseHttpService.api({
|
2598
|
-
url: `${this.serviceUrl}/${id}`,
|
2599
|
-
method: 'delete',
|
2600
|
-
});
|
2601
|
-
};
|
2602
|
-
this.restore$ = (id) => {
|
2603
|
-
return this.baseHttpService.api({
|
2604
|
-
method: 'patch',
|
2605
|
-
url: `${this.serviceUrl}/${id}/restore`,
|
2606
|
-
});
|
2607
|
-
};
|
2608
|
-
this.duplicate$ = (body) => {
|
2609
|
-
return this.baseHttpService
|
2610
|
-
.api({
|
2611
|
-
url: `${this.serviceUrl}/${body.id}/clone`,
|
2612
|
-
method: 'post',
|
2613
|
-
body,
|
2614
|
-
})
|
2615
|
-
.pipe(map$1(response => response.clonedRecordId));
|
2616
|
-
};
|
2617
|
-
}
|
2618
|
-
search$(expression, skip, count) {
|
2619
|
-
let params = new HttpParams();
|
2620
|
-
if (typeof skip === 'number') {
|
2621
|
-
params = params.set('skip', '' + skip);
|
2622
|
-
}
|
2623
|
-
if (typeof count === 'number') {
|
2624
|
-
params = params.set('count', '' + count);
|
2625
|
-
}
|
2626
|
-
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2627
|
-
}
|
2628
|
-
create$(body) {
|
2629
|
-
return this.baseHttpService.api({
|
2630
|
-
url: `${this.serviceUrl}`,
|
2631
|
-
method: 'post',
|
2632
|
-
body,
|
2633
|
-
});
|
2634
|
-
}
|
2635
|
-
update$(body) {
|
2636
|
-
return this.baseHttpService.api({
|
2637
|
-
url: `${this.serviceUrl}/${body.id}`,
|
2638
|
-
method: 'put',
|
2639
|
-
body,
|
2640
|
-
});
|
2641
|
-
}
|
2642
|
-
}
|
2643
|
-
RebateTypeApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2644
|
-
RebateTypeApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService });
|
2645
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, decorators: [{
|
2646
|
-
type: Injectable
|
2647
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2648
|
-
|
2649
|
-
class PromotionsApiService {
|
2650
|
-
constructor(baseHttpService) {
|
2651
|
-
this.baseHttpService = baseHttpService;
|
2652
|
-
this.serviceUrl = '/admin/promotion';
|
2653
|
-
this.fetchAll$ = () => {
|
2654
|
-
return this.baseHttpService.api({ url: this.serviceUrl });
|
2655
|
-
};
|
2656
|
-
this.fetchOne$ = (id) => {
|
2657
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
2658
|
-
};
|
2659
|
-
this.remove$ = (id) => {
|
2660
|
-
return this.baseHttpService.api({
|
2661
|
-
url: `${this.serviceUrl}/${id}`,
|
2662
|
-
method: 'delete',
|
2663
|
-
});
|
2664
|
-
};
|
2665
|
-
this.restore$ = (id) => {
|
2666
|
-
return this.baseHttpService.api({
|
2667
|
-
method: 'patch',
|
2668
|
-
url: `${this.serviceUrl}/${id}/restore`,
|
2669
|
-
});
|
2670
|
-
};
|
2671
|
-
this.duplicate$ = (body) => {
|
2672
|
-
return this.baseHttpService
|
2673
|
-
.api({
|
2674
|
-
url: `${this.serviceUrl}/${body.id}/clone`,
|
2675
|
-
method: 'post',
|
2676
|
-
body,
|
2677
|
-
})
|
2678
|
-
.pipe(map$1(response => response.clonedRecordId));
|
2679
|
-
};
|
2680
|
-
}
|
2681
|
-
search$(expression, skip, count) {
|
2682
|
-
let params = new HttpParams();
|
2683
|
-
if (typeof skip === 'number') {
|
2684
|
-
params = params.set('skip', '' + skip);
|
2685
|
-
}
|
2686
|
-
if (typeof count === 'number') {
|
2687
|
-
params = params.set('count', '' + count);
|
2688
|
-
}
|
2689
|
-
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2690
|
-
}
|
2691
|
-
create$(body) {
|
2692
|
-
return this.baseHttpService.api({
|
2693
|
-
url: `${this.serviceUrl}`,
|
2694
|
-
method: 'post',
|
2695
|
-
body,
|
2696
|
-
});
|
2697
|
-
}
|
2698
|
-
update$(body) {
|
2699
|
-
return this.baseHttpService.api({
|
2700
|
-
url: `${this.serviceUrl}/${body.id}`,
|
2701
|
-
method: 'put',
|
2702
|
-
body,
|
2703
|
-
});
|
2704
|
-
}
|
2705
|
-
}
|
2706
|
-
PromotionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2707
|
-
PromotionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService });
|
2708
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService, decorators: [{
|
2709
|
-
type: Injectable
|
2710
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2711
|
-
|
2712
2730
|
class ApiModule {
|
2713
2731
|
}
|
2714
2732
|
ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
@@ -2750,6 +2768,7 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
|
2750
2768
|
RebateProgramApiService,
|
2751
2769
|
RebateTypeApiService,
|
2752
2770
|
PromotionsApiService,
|
2771
|
+
VeloceAuthService,
|
2753
2772
|
], imports: [HttpClientModule] });
|
2754
2773
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, decorators: [{
|
2755
2774
|
type: NgModule,
|
@@ -2792,6 +2811,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
2792
2811
|
RebateProgramApiService,
|
2793
2812
|
RebateTypeApiService,
|
2794
2813
|
PromotionsApiService,
|
2814
|
+
VeloceAuthService,
|
2795
2815
|
],
|
2796
2816
|
}]
|
2797
2817
|
}] });
|
@@ -2800,5 +2820,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
2800
2820
|
* Generated bundle index. Do not edit.
|
2801
2821
|
*/
|
2802
2822
|
|
2803
|
-
export { AccountApiService, ApiModule, CatalogAdminApiService, CatalogApiService, ConfigurationApiService, ConfigurationSettingsApiService, ContextApiService, DeltaApiService, DocumentAttachmentApiService, DocumentTemplatesApiService, EndpointsApiService, FlowsApiService, GuidedSellingApiService, GuidedSellingsAdminApiService, OffersApiService, OrgInfoApiService, PicklistsApiService, PriceApiService, ProceduresApiService, ProductApiService, ProductModelApiService, PromotionsApiService, QuoteApiService, RampApiService, RebateProgramApiService, RebateTypeApiService, RuleGroupsApiService, RulesApiService, SalesforceApiService, ScriptsApiService, ShoppingCartSettingsApiService, StatefulConfigurationApiService, UIDefinitionsApiService, UITemplatesApiService, VeloceObjectsApiService };
|
2823
|
+
export { AccountApiService, ApiModule, CatalogAdminApiService, CatalogApiService, ConfigurationApiService, ConfigurationSettingsApiService, ContextApiService, DeltaApiService, DocumentAttachmentApiService, DocumentTemplatesApiService, EndpointsApiService, FlowsApiService, GuidedSellingApiService, GuidedSellingsAdminApiService, OffersApiService, OrgInfoApiService, PicklistsApiService, PriceApiService, ProceduresApiService, ProductApiService, ProductModelApiService, PromotionsApiService, QuoteApiService, RampApiService, RebateProgramApiService, RebateTypeApiService, RuleGroupsApiService, RulesApiService, SalesforceApiService, ScriptsApiService, ShoppingCartSettingsApiService, StatefulConfigurationApiService, UIDefinitionsApiService, UITemplatesApiService, VeloceAuthService, VeloceObjectsApiService };
|
2804
2824
|
//# sourceMappingURL=veloceapps-api.mjs.map
|