@veloceapps/api 8.0.0-1 → 8.0.0-11

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.
@@ -2000,8 +2000,12 @@ class RulesApiService {
2000
2000
  };
2001
2001
  this.searchRules$ = (expression, skip, count) => {
2002
2002
  let params = new HttpParams();
2003
- params = params.set('skip', '' + skip);
2004
- params = params.set('count', '' + count);
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) => {
@@ -2076,8 +2080,12 @@ class ScriptsApiService {
2076
2080
  };
2077
2081
  this.searchScripts$ = (expression, skip, count) => {
2078
2082
  let params = new HttpParams();
2079
- params = params.set('skip', '' + skip);
2080
- params = params.set('count', '' + count);
2083
+ if (typeof skip === 'number') {
2084
+ params = params.set('skip', '' + skip);
2085
+ }
2086
+ if (typeof count === 'number') {
2087
+ params = params.set('count', '' + count);
2088
+ }
2081
2089
  return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
2082
2090
  };
2083
2091
  this.fetchScript$ = (id) => {
@@ -2643,6 +2651,132 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
2643
2651
  type: Injectable
2644
2652
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2645
2653
 
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.8", ngImport: i0, type: RebateProgramApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2712
+ RebateProgramApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateProgramApiService });
2713
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", 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.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
+
2646
2780
  class ApiModule {
2647
2781
  }
2648
2782
  ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
@@ -2681,6 +2815,8 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
2681
2815
  UIDefinitionsApiService,
2682
2816
  VeloceObjectsApiService,
2683
2817
  StatefulConfigurationApiService,
2818
+ RebateProgramApiService,
2819
+ RebateTypeApiService,
2684
2820
  ], imports: [HttpClientModule] });
2685
2821
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ApiModule, decorators: [{
2686
2822
  type: NgModule,
@@ -2720,6 +2856,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
2720
2856
  UIDefinitionsApiService,
2721
2857
  VeloceObjectsApiService,
2722
2858
  StatefulConfigurationApiService,
2859
+ RebateProgramApiService,
2860
+ RebateTypeApiService,
2723
2861
  ],
2724
2862
  }]
2725
2863
  }] });
@@ -2728,5 +2866,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
2728
2866
  * Generated bundle index. Do not edit.
2729
2867
  */
2730
2868
 
2731
- export { AccountApiService, ApiModule, CatalogAdminApiService, CatalogApiService, ConfigurationApiService, ConfigurationSettingsApiService, ContextApiService, DeltaApiService, DocumentAttachmentApiService, DocumentTemplatesApiService, EndpointsApiService, FlowsApiService, GuidedSellingApiService, GuidedSellingsAdminApiService, OffersApiService, OrgInfoApiService, PicklistsApiService, PriceApiService, ProceduresApiService, ProductApiService, ProductModelApiService, QuoteApiService, RampApiService, RuleGroupsApiService, RulesApiService, SalesforceApiService, ScriptsApiService, ShoppingCartSettingsApiService, StatefulConfigurationApiService, UIDefinitionsApiService, UITemplatesApiService, VeloceObjectsApiService };
2869
+ 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, RebateTypeApiService, RuleGroupsApiService, RulesApiService, SalesforceApiService, ScriptsApiService, ShoppingCartSettingsApiService, StatefulConfigurationApiService, UIDefinitionsApiService, UITemplatesApiService, VeloceObjectsApiService };
2732
2870
  //# sourceMappingURL=veloceapps-api.mjs.map