@veloceapps/api 8.0.0-7 → 8.0.0-9

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.
@@ -2076,8 +2076,12 @@ class ScriptsApiService {
2076
2076
  };
2077
2077
  this.searchScripts$ = (expression, skip, count) => {
2078
2078
  let params = new HttpParams();
2079
- params = params.set('skip', '' + skip);
2080
- params = params.set('count', '' + count);
2079
+ if (typeof skip === 'number') {
2080
+ params = params.set('skip', '' + skip);
2081
+ }
2082
+ if (typeof count === 'number') {
2083
+ params = params.set('count', '' + count);
2084
+ }
2081
2085
  return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
2082
2086
  };
2083
2087
  this.fetchScript$ = (id) => {
@@ -2643,6 +2647,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
2643
2647
  type: Injectable
2644
2648
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2645
2649
 
2650
+ class RebateProgramApiService {
2651
+ constructor(baseHttpService) {
2652
+ this.baseHttpService = baseHttpService;
2653
+ this.serviceUrl = '/admin/rebate-program';
2654
+ this.fetchAll$ = () => {
2655
+ return this.baseHttpService.api({ url: this.serviceUrl });
2656
+ };
2657
+ this.fetchOne$ = (id) => {
2658
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
2659
+ };
2660
+ this.remove$ = (id) => {
2661
+ return this.baseHttpService.api({
2662
+ url: `${this.serviceUrl}/${id}`,
2663
+ method: 'delete',
2664
+ });
2665
+ };
2666
+ }
2667
+ search$(expression, skip, count) {
2668
+ let params = new HttpParams();
2669
+ if (typeof skip === 'number') {
2670
+ params = params.set('skip', '' + skip);
2671
+ }
2672
+ if (typeof count === 'number') {
2673
+ params = params.set('count', '' + count);
2674
+ }
2675
+ return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
2676
+ }
2677
+ create$(body) {
2678
+ return this.baseHttpService.api({
2679
+ url: `${this.serviceUrl}`,
2680
+ method: 'post',
2681
+ body,
2682
+ });
2683
+ }
2684
+ update$(body) {
2685
+ return this.baseHttpService.api({
2686
+ url: `${this.serviceUrl}/${body.id}`,
2687
+ method: 'put',
2688
+ body,
2689
+ });
2690
+ }
2691
+ }
2692
+ RebateProgramApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateProgramApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2693
+ RebateProgramApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateProgramApiService });
2694
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateProgramApiService, decorators: [{
2695
+ type: Injectable
2696
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2697
+
2646
2698
  class ApiModule {
2647
2699
  }
2648
2700
  ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
@@ -2681,6 +2733,7 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
2681
2733
  UIDefinitionsApiService,
2682
2734
  VeloceObjectsApiService,
2683
2735
  StatefulConfigurationApiService,
2736
+ RebateProgramApiService,
2684
2737
  ], imports: [HttpClientModule] });
2685
2738
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ApiModule, decorators: [{
2686
2739
  type: NgModule,
@@ -2720,6 +2773,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
2720
2773
  UIDefinitionsApiService,
2721
2774
  VeloceObjectsApiService,
2722
2775
  StatefulConfigurationApiService,
2776
+ RebateProgramApiService,
2723
2777
  ],
2724
2778
  }]
2725
2779
  }] });
@@ -2728,5 +2782,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
2728
2782
  * Generated bundle index. Do not edit.
2729
2783
  */
2730
2784
 
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 };
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 };
2732
2786
  //# sourceMappingURL=veloceapps-api.mjs.map