@veloceapps/api 8.0.0-10 → 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) => {
@@ -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,69 @@ 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
+
2698
2780
  class ApiModule {
2699
2781
  }
2700
2782
  ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
@@ -2734,6 +2816,7 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
2734
2816
  VeloceObjectsApiService,
2735
2817
  StatefulConfigurationApiService,
2736
2818
  RebateProgramApiService,
2819
+ RebateTypeApiService,
2737
2820
  ], imports: [HttpClientModule] });
2738
2821
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ApiModule, decorators: [{
2739
2822
  type: NgModule,
@@ -2774,6 +2857,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
2774
2857
  VeloceObjectsApiService,
2775
2858
  StatefulConfigurationApiService,
2776
2859
  RebateProgramApiService,
2860
+ RebateTypeApiService,
2777
2861
  ],
2778
2862
  }]
2779
2863
  }] });
@@ -2782,5 +2866,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
2782
2866
  * Generated bundle index. Do not edit.
2783
2867
  */
2784
2868
 
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 };
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 };
2786
2870
  //# sourceMappingURL=veloceapps-api.mjs.map