@veloceapps/api 8.0.0-10 → 8.0.0-12
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 +3 -1
- package/esm2020/lib/api.module.mjs +7 -1
- package/esm2020/lib/services/promotions-api.service.mjs +68 -0
- package/esm2020/lib/services/rebate-program-api.service.mjs +17 -1
- package/esm2020/lib/services/rebate-type-api.service.mjs +68 -0
- package/esm2020/lib/services/rules-api.service.mjs +7 -3
- package/fesm2015/veloceapps-api.mjs +152 -3
- package/fesm2015/veloceapps-api.mjs.map +1 -1
- package/fesm2020/veloceapps-api.mjs +152 -3
- package/fesm2020/veloceapps-api.mjs.map +1 -1
- package/index.d.ts +2 -0
- package/lib/services/promotions-api.service.d.ts +19 -0
- package/lib/services/rebate-program-api.service.d.ts +3 -0
- package/lib/services/rebate-type-api.service.d.ts +19 -0
- package/lib/services/rules-api.service.d.ts +1 -1
- package/package.json +1 -1
@@ -2000,8 +2000,12 @@ class RulesApiService {
|
|
2000
2000
|
};
|
2001
2001
|
this.searchRules$ = (expression, skip, count) => {
|
2002
2002
|
let params = new HttpParams();
|
2003
|
-
|
2004
|
-
|
2003
|
+
if (typeof skip === 'number') {
|
2004
|
+
params = params.set('skip', '' + skip);
|
2005
|
+
}
|
2006
|
+
if (typeof count === 'number') {
|
2007
|
+
params = params.set('count', '' + count);
|
2008
|
+
}
|
2005
2009
|
return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
|
2006
2010
|
};
|
2007
2011
|
this.createRule$ = (rule) => {
|
@@ -2663,6 +2667,21 @@ class RebateProgramApiService {
|
|
2663
2667
|
method: 'delete',
|
2664
2668
|
});
|
2665
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
|
+
};
|
2666
2685
|
}
|
2667
2686
|
search$(expression, skip, count) {
|
2668
2687
|
let params = new HttpParams();
|
@@ -2695,6 +2714,132 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
2695
2714
|
type: Injectable
|
2696
2715
|
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2697
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.8", ngImport: i0, type: RebateTypeApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2775
|
+
RebateTypeApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateTypeApiService });
|
2776
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", 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.8", ngImport: i0, type: PromotionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2838
|
+
PromotionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PromotionsApiService });
|
2839
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PromotionsApiService, decorators: [{
|
2840
|
+
type: Injectable
|
2841
|
+
}], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
|
2842
|
+
|
2698
2843
|
class ApiModule {
|
2699
2844
|
}
|
2700
2845
|
ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
@@ -2734,6 +2879,8 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
|
2734
2879
|
VeloceObjectsApiService,
|
2735
2880
|
StatefulConfigurationApiService,
|
2736
2881
|
RebateProgramApiService,
|
2882
|
+
RebateTypeApiService,
|
2883
|
+
PromotionsApiService,
|
2737
2884
|
], imports: [HttpClientModule] });
|
2738
2885
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ApiModule, decorators: [{
|
2739
2886
|
type: NgModule,
|
@@ -2774,6 +2921,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
2774
2921
|
VeloceObjectsApiService,
|
2775
2922
|
StatefulConfigurationApiService,
|
2776
2923
|
RebateProgramApiService,
|
2924
|
+
RebateTypeApiService,
|
2925
|
+
PromotionsApiService,
|
2777
2926
|
],
|
2778
2927
|
}]
|
2779
2928
|
}] });
|
@@ -2782,5 +2931,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
2782
2931
|
* Generated bundle index. Do not edit.
|
2783
2932
|
*/
|
2784
2933
|
|
2785
|
-
export { AccountApiService, ApiModule, CatalogAdminApiService, CatalogApiService, ConfigurationApiService, ConfigurationSettingsApiService, ContextApiService, DeltaApiService, DocumentAttachmentApiService, DocumentTemplatesApiService, EndpointsApiService, FlowsApiService, GuidedSellingApiService, GuidedSellingsAdminApiService, OffersApiService, OrgInfoApiService, PicklistsApiService, PriceApiService, ProceduresApiService, ProductApiService, ProductModelApiService, QuoteApiService, RampApiService, RebateProgramApiService, RuleGroupsApiService, RulesApiService, SalesforceApiService, ScriptsApiService, ShoppingCartSettingsApiService, StatefulConfigurationApiService, UIDefinitionsApiService, UITemplatesApiService, VeloceObjectsApiService };
|
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 };
|
2786
2935
|
//# sourceMappingURL=veloceapps-api.mjs.map
|