@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';
|
@@ -88,6 +88,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
88
88
|
type: Injectable
|
89
89
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
90
90
|
|
91
|
+
class VeloceAuthService {
|
92
|
+
constructor(http) {
|
93
|
+
this.http = http;
|
94
|
+
}
|
95
|
+
auth$(instanceUrl, accessToken) {
|
96
|
+
const headers = new HttpHeaders({
|
97
|
+
'Content-Type': 'application/json',
|
98
|
+
Authorization: `Bearer ${accessToken}`,
|
99
|
+
});
|
100
|
+
return this.http.get(`${instanceUrl}/services/apexrest/VELOCPQ/veloce-auth`, { headers });
|
101
|
+
}
|
102
|
+
}
|
103
|
+
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 });
|
104
|
+
VeloceAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceAuthService });
|
105
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceAuthService, decorators: [{
|
106
|
+
type: Injectable
|
107
|
+
}], ctorParameters: function () { return [{ type: i1$1.HttpClient }]; } });
|
108
|
+
|
91
109
|
class CatalogAdminApiService {
|
92
110
|
constructor(baseHttpService) {
|
93
111
|
this.baseHttpService = baseHttpService;
|
@@ -1007,11 +1025,11 @@ class DocumentTemplatesApiService {
|
|
1007
1025
|
return this.salesforceApiService.query(searchRequest, objectName).pipe(this.mapSfQueryResult(limit), map(value => ({ [resultObjectName]: value })));
|
1008
1026
|
}
|
1009
1027
|
}
|
1010
|
-
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:
|
1028
|
+
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 });
|
1011
1029
|
DocumentTemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentTemplatesApiService });
|
1012
1030
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentTemplatesApiService, decorators: [{
|
1013
1031
|
type: Injectable
|
1014
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: SalesforceApiService }, { type: i1.FileDownloadService }, { type: DocumentAttachmentApiService }, { type:
|
1032
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: SalesforceApiService }, { type: i1.FileDownloadService }, { type: DocumentAttachmentApiService }, { type: i1$1.HttpClient }]; } });
|
1015
1033
|
|
1016
1034
|
class EndpointsApiService {
|
1017
1035
|
constructor(baseHttpService) {
|
@@ -1282,11 +1300,11 @@ class OrgInfoApiService {
|
|
1282
1300
|
return this.http.get(`${this.hostUrl}/org-info/${organizationId}`);
|
1283
1301
|
}
|
1284
1302
|
}
|
1285
|
-
OrgInfoApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService, deps: [{ token:
|
1303
|
+
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 });
|
1286
1304
|
OrgInfoApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService });
|
1287
1305
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService, decorators: [{
|
1288
1306
|
type: Injectable
|
1289
|
-
}], ctorParameters: function () { return [{ type:
|
1307
|
+
}], ctorParameters: function () { return [{ type: i1$1.HttpClient }]; } });
|
1290
1308
|
|
1291
1309
|
class PicklistsApiService {
|
1292
1310
|
constructor(baseHttpService) {
|
@@ -1859,6 +1877,69 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1859
1877
|
type: Injectable
|
1860
1878
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1861
1879
|
|
1880
|
+
class PromotionsApiService {
|
1881
|
+
constructor(baseHttpService) {
|
1882
|
+
this.baseHttpService = baseHttpService;
|
1883
|
+
this.serviceUrl = '/admin/promotion';
|
1884
|
+
this.fetchAll$ = () => {
|
1885
|
+
return this.baseHttpService.api({ url: this.serviceUrl });
|
1886
|
+
};
|
1887
|
+
this.fetchOne$ = (id) => {
|
1888
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
1889
|
+
};
|
1890
|
+
this.remove$ = (id) => {
|
1891
|
+
return this.baseHttpService.api({
|
1892
|
+
url: `${this.serviceUrl}/${id}`,
|
1893
|
+
method: 'delete',
|
1894
|
+
});
|
1895
|
+
};
|
1896
|
+
this.restore$ = (id) => {
|
1897
|
+
return this.baseHttpService.api({
|
1898
|
+
method: 'patch',
|
1899
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
1900
|
+
});
|
1901
|
+
};
|
1902
|
+
this.duplicate$ = (body) => {
|
1903
|
+
return this.baseHttpService
|
1904
|
+
.api({
|
1905
|
+
url: `${this.serviceUrl}/${body.id}/clone`,
|
1906
|
+
method: 'post',
|
1907
|
+
body,
|
1908
|
+
})
|
1909
|
+
.pipe(map$1(response => response.clonedRecordId));
|
1910
|
+
};
|
1911
|
+
}
|
1912
|
+
search$(expression, skip, count) {
|
1913
|
+
let params = new HttpParams();
|
1914
|
+
if (typeof skip === 'number') {
|
1915
|
+
params = params.set('skip', '' + skip);
|
1916
|
+
}
|
1917
|
+
if (typeof count === 'number') {
|
1918
|
+
params = params.set('count', '' + count);
|
1919
|
+
}
|
1920
|
+
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
1921
|
+
}
|
1922
|
+
create$(body) {
|
1923
|
+
return this.baseHttpService.api({
|
1924
|
+
url: `${this.serviceUrl}`,
|
1925
|
+
method: 'post',
|
1926
|
+
body,
|
1927
|
+
});
|
1928
|
+
}
|
1929
|
+
update$(body) {
|
1930
|
+
return this.baseHttpService.api({
|
1931
|
+
url: `${this.serviceUrl}/${body.id}`,
|
1932
|
+
method: 'put',
|
1933
|
+
body,
|
1934
|
+
});
|
1935
|
+
}
|
1936
|
+
}
|
1937
|
+
PromotionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1938
|
+
PromotionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService });
|
1939
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService, decorators: [{
|
1940
|
+
type: Injectable
|
1941
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1942
|
+
|
1862
1943
|
class QuoteApiService {
|
1863
1944
|
constructor(httpService) {
|
1864
1945
|
this.httpService = httpService;
|
@@ -1935,6 +2016,132 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1935
2016
|
type: Injectable
|
1936
2017
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
1937
2018
|
|
2019
|
+
class RebateProgramApiService {
|
2020
|
+
constructor(baseHttpService) {
|
2021
|
+
this.baseHttpService = baseHttpService;
|
2022
|
+
this.serviceUrl = '/admin/rebate-program';
|
2023
|
+
this.fetchAll$ = () => {
|
2024
|
+
return this.baseHttpService.api({ url: this.serviceUrl });
|
2025
|
+
};
|
2026
|
+
this.fetchOne$ = (id) => {
|
2027
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
2028
|
+
};
|
2029
|
+
this.remove$ = (id) => {
|
2030
|
+
return this.baseHttpService.api({
|
2031
|
+
url: `${this.serviceUrl}/${id}`,
|
2032
|
+
method: 'delete',
|
2033
|
+
});
|
2034
|
+
};
|
2035
|
+
this.restore$ = (id) => {
|
2036
|
+
return this.baseHttpService.api({
|
2037
|
+
method: 'patch',
|
2038
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
2039
|
+
});
|
2040
|
+
};
|
2041
|
+
this.duplicate$ = (body) => {
|
2042
|
+
return this.baseHttpService
|
2043
|
+
.api({
|
2044
|
+
url: `${this.serviceUrl}/${body.id}/clone`,
|
2045
|
+
method: 'post',
|
2046
|
+
body,
|
2047
|
+
})
|
2048
|
+
.pipe(map$1(response => response.clonedRecordId));
|
2049
|
+
};
|
2050
|
+
}
|
2051
|
+
search$(expression, skip, count) {
|
2052
|
+
let params = new HttpParams();
|
2053
|
+
if (typeof skip === 'number') {
|
2054
|
+
params = params.set('skip', '' + skip);
|
2055
|
+
}
|
2056
|
+
if (typeof count === 'number') {
|
2057
|
+
params = params.set('count', '' + count);
|
2058
|
+
}
|
2059
|
+
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2060
|
+
}
|
2061
|
+
create$(body) {
|
2062
|
+
return this.baseHttpService.api({
|
2063
|
+
url: `${this.serviceUrl}`,
|
2064
|
+
method: 'post',
|
2065
|
+
body,
|
2066
|
+
});
|
2067
|
+
}
|
2068
|
+
update$(body) {
|
2069
|
+
return this.baseHttpService.api({
|
2070
|
+
url: `${this.serviceUrl}/${body.id}`,
|
2071
|
+
method: 'put',
|
2072
|
+
body,
|
2073
|
+
});
|
2074
|
+
}
|
2075
|
+
}
|
2076
|
+
RebateProgramApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2077
|
+
RebateProgramApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService });
|
2078
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, decorators: [{
|
2079
|
+
type: Injectable
|
2080
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2081
|
+
|
2082
|
+
class RebateTypeApiService {
|
2083
|
+
constructor(baseHttpService) {
|
2084
|
+
this.baseHttpService = baseHttpService;
|
2085
|
+
this.serviceUrl = '/admin/rebate-type';
|
2086
|
+
this.fetchAll$ = () => {
|
2087
|
+
return this.baseHttpService.api({ url: this.serviceUrl });
|
2088
|
+
};
|
2089
|
+
this.fetchOne$ = (id) => {
|
2090
|
+
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
2091
|
+
};
|
2092
|
+
this.remove$ = (id) => {
|
2093
|
+
return this.baseHttpService.api({
|
2094
|
+
url: `${this.serviceUrl}/${id}`,
|
2095
|
+
method: 'delete',
|
2096
|
+
});
|
2097
|
+
};
|
2098
|
+
this.restore$ = (id) => {
|
2099
|
+
return this.baseHttpService.api({
|
2100
|
+
method: 'patch',
|
2101
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
2102
|
+
});
|
2103
|
+
};
|
2104
|
+
this.duplicate$ = (body) => {
|
2105
|
+
return this.baseHttpService
|
2106
|
+
.api({
|
2107
|
+
url: `${this.serviceUrl}/${body.id}/clone`,
|
2108
|
+
method: 'post',
|
2109
|
+
body,
|
2110
|
+
})
|
2111
|
+
.pipe(map$1(response => response.clonedRecordId));
|
2112
|
+
};
|
2113
|
+
}
|
2114
|
+
search$(expression, skip, count) {
|
2115
|
+
let params = new HttpParams();
|
2116
|
+
if (typeof skip === 'number') {
|
2117
|
+
params = params.set('skip', '' + skip);
|
2118
|
+
}
|
2119
|
+
if (typeof count === 'number') {
|
2120
|
+
params = params.set('count', '' + count);
|
2121
|
+
}
|
2122
|
+
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2123
|
+
}
|
2124
|
+
create$(body) {
|
2125
|
+
return this.baseHttpService.api({
|
2126
|
+
url: `${this.serviceUrl}`,
|
2127
|
+
method: 'post',
|
2128
|
+
body,
|
2129
|
+
});
|
2130
|
+
}
|
2131
|
+
update$(body) {
|
2132
|
+
return this.baseHttpService.api({
|
2133
|
+
url: `${this.serviceUrl}/${body.id}`,
|
2134
|
+
method: 'put',
|
2135
|
+
body,
|
2136
|
+
});
|
2137
|
+
}
|
2138
|
+
}
|
2139
|
+
RebateTypeApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2140
|
+
RebateTypeApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService });
|
2141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, decorators: [{
|
2142
|
+
type: Injectable
|
2143
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2144
|
+
|
1938
2145
|
class RuleGroupsApiService {
|
1939
2146
|
constructor(baseHttpService) {
|
1940
2147
|
this.baseHttpService = baseHttpService;
|
@@ -2651,195 +2858,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
2651
2858
|
type: Injectable
|
2652
2859
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2653
2860
|
|
2654
|
-
class RebateProgramApiService {
|
2655
|
-
constructor(baseHttpService) {
|
2656
|
-
this.baseHttpService = baseHttpService;
|
2657
|
-
this.serviceUrl = '/admin/rebate-program';
|
2658
|
-
this.fetchAll$ = () => {
|
2659
|
-
return this.baseHttpService.api({ url: this.serviceUrl });
|
2660
|
-
};
|
2661
|
-
this.fetchOne$ = (id) => {
|
2662
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
2663
|
-
};
|
2664
|
-
this.remove$ = (id) => {
|
2665
|
-
return this.baseHttpService.api({
|
2666
|
-
url: `${this.serviceUrl}/${id}`,
|
2667
|
-
method: 'delete',
|
2668
|
-
});
|
2669
|
-
};
|
2670
|
-
this.restore$ = (id) => {
|
2671
|
-
return this.baseHttpService.api({
|
2672
|
-
method: 'patch',
|
2673
|
-
url: `${this.serviceUrl}/${id}/restore`,
|
2674
|
-
});
|
2675
|
-
};
|
2676
|
-
this.duplicate$ = (body) => {
|
2677
|
-
return this.baseHttpService
|
2678
|
-
.api({
|
2679
|
-
url: `${this.serviceUrl}/${body.id}/clone`,
|
2680
|
-
method: 'post',
|
2681
|
-
body,
|
2682
|
-
})
|
2683
|
-
.pipe(map$1(response => response.clonedRecordId));
|
2684
|
-
};
|
2685
|
-
}
|
2686
|
-
search$(expression, skip, count) {
|
2687
|
-
let params = new HttpParams();
|
2688
|
-
if (typeof skip === 'number') {
|
2689
|
-
params = params.set('skip', '' + skip);
|
2690
|
-
}
|
2691
|
-
if (typeof count === 'number') {
|
2692
|
-
params = params.set('count', '' + count);
|
2693
|
-
}
|
2694
|
-
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2695
|
-
}
|
2696
|
-
create$(body) {
|
2697
|
-
return this.baseHttpService.api({
|
2698
|
-
url: `${this.serviceUrl}`,
|
2699
|
-
method: 'post',
|
2700
|
-
body,
|
2701
|
-
});
|
2702
|
-
}
|
2703
|
-
update$(body) {
|
2704
|
-
return this.baseHttpService.api({
|
2705
|
-
url: `${this.serviceUrl}/${body.id}`,
|
2706
|
-
method: 'put',
|
2707
|
-
body,
|
2708
|
-
});
|
2709
|
-
}
|
2710
|
-
}
|
2711
|
-
RebateProgramApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2712
|
-
RebateProgramApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService });
|
2713
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, decorators: [{
|
2714
|
-
type: Injectable
|
2715
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2716
|
-
|
2717
|
-
class RebateTypeApiService {
|
2718
|
-
constructor(baseHttpService) {
|
2719
|
-
this.baseHttpService = baseHttpService;
|
2720
|
-
this.serviceUrl = '/admin/rebate-type';
|
2721
|
-
this.fetchAll$ = () => {
|
2722
|
-
return this.baseHttpService.api({ url: this.serviceUrl });
|
2723
|
-
};
|
2724
|
-
this.fetchOne$ = (id) => {
|
2725
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
2726
|
-
};
|
2727
|
-
this.remove$ = (id) => {
|
2728
|
-
return this.baseHttpService.api({
|
2729
|
-
url: `${this.serviceUrl}/${id}`,
|
2730
|
-
method: 'delete',
|
2731
|
-
});
|
2732
|
-
};
|
2733
|
-
this.restore$ = (id) => {
|
2734
|
-
return this.baseHttpService.api({
|
2735
|
-
method: 'patch',
|
2736
|
-
url: `${this.serviceUrl}/${id}/restore`,
|
2737
|
-
});
|
2738
|
-
};
|
2739
|
-
this.duplicate$ = (body) => {
|
2740
|
-
return this.baseHttpService
|
2741
|
-
.api({
|
2742
|
-
url: `${this.serviceUrl}/${body.id}/clone`,
|
2743
|
-
method: 'post',
|
2744
|
-
body,
|
2745
|
-
})
|
2746
|
-
.pipe(map$1(response => response.clonedRecordId));
|
2747
|
-
};
|
2748
|
-
}
|
2749
|
-
search$(expression, skip, count) {
|
2750
|
-
let params = new HttpParams();
|
2751
|
-
if (typeof skip === 'number') {
|
2752
|
-
params = params.set('skip', '' + skip);
|
2753
|
-
}
|
2754
|
-
if (typeof count === 'number') {
|
2755
|
-
params = params.set('count', '' + count);
|
2756
|
-
}
|
2757
|
-
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2758
|
-
}
|
2759
|
-
create$(body) {
|
2760
|
-
return this.baseHttpService.api({
|
2761
|
-
url: `${this.serviceUrl}`,
|
2762
|
-
method: 'post',
|
2763
|
-
body,
|
2764
|
-
});
|
2765
|
-
}
|
2766
|
-
update$(body) {
|
2767
|
-
return this.baseHttpService.api({
|
2768
|
-
url: `${this.serviceUrl}/${body.id}`,
|
2769
|
-
method: 'put',
|
2770
|
-
body,
|
2771
|
-
});
|
2772
|
-
}
|
2773
|
-
}
|
2774
|
-
RebateTypeApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2775
|
-
RebateTypeApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService });
|
2776
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, decorators: [{
|
2777
|
-
type: Injectable
|
2778
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2779
|
-
|
2780
|
-
class PromotionsApiService {
|
2781
|
-
constructor(baseHttpService) {
|
2782
|
-
this.baseHttpService = baseHttpService;
|
2783
|
-
this.serviceUrl = '/admin/promotion';
|
2784
|
-
this.fetchAll$ = () => {
|
2785
|
-
return this.baseHttpService.api({ url: this.serviceUrl });
|
2786
|
-
};
|
2787
|
-
this.fetchOne$ = (id) => {
|
2788
|
-
return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
|
2789
|
-
};
|
2790
|
-
this.remove$ = (id) => {
|
2791
|
-
return this.baseHttpService.api({
|
2792
|
-
url: `${this.serviceUrl}/${id}`,
|
2793
|
-
method: 'delete',
|
2794
|
-
});
|
2795
|
-
};
|
2796
|
-
this.restore$ = (id) => {
|
2797
|
-
return this.baseHttpService.api({
|
2798
|
-
method: 'patch',
|
2799
|
-
url: `${this.serviceUrl}/${id}/restore`,
|
2800
|
-
});
|
2801
|
-
};
|
2802
|
-
this.duplicate$ = (body) => {
|
2803
|
-
return this.baseHttpService
|
2804
|
-
.api({
|
2805
|
-
url: `${this.serviceUrl}/${body.id}/clone`,
|
2806
|
-
method: 'post',
|
2807
|
-
body,
|
2808
|
-
})
|
2809
|
-
.pipe(map$1(response => response.clonedRecordId));
|
2810
|
-
};
|
2811
|
-
}
|
2812
|
-
search$(expression, skip, count) {
|
2813
|
-
let params = new HttpParams();
|
2814
|
-
if (typeof skip === 'number') {
|
2815
|
-
params = params.set('skip', '' + skip);
|
2816
|
-
}
|
2817
|
-
if (typeof count === 'number') {
|
2818
|
-
params = params.set('count', '' + count);
|
2819
|
-
}
|
2820
|
-
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2821
|
-
}
|
2822
|
-
create$(body) {
|
2823
|
-
return this.baseHttpService.api({
|
2824
|
-
url: `${this.serviceUrl}`,
|
2825
|
-
method: 'post',
|
2826
|
-
body,
|
2827
|
-
});
|
2828
|
-
}
|
2829
|
-
update$(body) {
|
2830
|
-
return this.baseHttpService.api({
|
2831
|
-
url: `${this.serviceUrl}/${body.id}`,
|
2832
|
-
method: 'put',
|
2833
|
-
body,
|
2834
|
-
});
|
2835
|
-
}
|
2836
|
-
}
|
2837
|
-
PromotionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2838
|
-
PromotionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService });
|
2839
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService, decorators: [{
|
2840
|
-
type: Injectable
|
2841
|
-
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2842
|
-
|
2843
2861
|
class ApiModule {
|
2844
2862
|
}
|
2845
2863
|
ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
@@ -2881,6 +2899,7 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
|
2881
2899
|
RebateProgramApiService,
|
2882
2900
|
RebateTypeApiService,
|
2883
2901
|
PromotionsApiService,
|
2902
|
+
VeloceAuthService,
|
2884
2903
|
], imports: [HttpClientModule] });
|
2885
2904
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, decorators: [{
|
2886
2905
|
type: NgModule,
|
@@ -2923,6 +2942,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
2923
2942
|
RebateProgramApiService,
|
2924
2943
|
RebateTypeApiService,
|
2925
2944
|
PromotionsApiService,
|
2945
|
+
VeloceAuthService,
|
2926
2946
|
],
|
2927
2947
|
}]
|
2928
2948
|
}] });
|
@@ -2931,5 +2951,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
2931
2951
|
* Generated bundle index. Do not edit.
|
2932
2952
|
*/
|
2933
2953
|
|
2934
|
-
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 };
|
2954
|
+
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 };
|
2935
2955
|
//# sourceMappingURL=veloceapps-api.mjs.map
|