@veloceapps/api 2.0.0 → 2.0.1

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.
@@ -2071,8 +2071,32 @@
2071
2071
  this.baseHttpService = baseHttpService;
2072
2072
  this.serviceUrl = '/admin/rules';
2073
2073
  this.fetchRules$ = function () {
2074
- return rxjs.of([]).pipe(rxjs.delay(1000));
2075
- return _this.baseHttpService.api({ url: "" + _this.serviceUrl });
2074
+ return _this.searchRules$(new i1.Expression(), 0, 100);
2075
+ };
2076
+ this.searchRules$ = function (expression, skip, count) {
2077
+ var params = new i4.HttpParams();
2078
+ params = params.set('skip', '' + skip);
2079
+ params = params.set('count', '' + count);
2080
+ return _this.baseHttpService.api({ method: 'post', url: _this.serviceUrl + "/search", params: params, body: expression });
2081
+ };
2082
+ this.createRule$ = function (rule) {
2083
+ return _this.baseHttpService.api({
2084
+ url: "" + _this.serviceUrl,
2085
+ method: 'post',
2086
+ body: rule,
2087
+ });
2088
+ };
2089
+ this.removeRule$ = function (id) {
2090
+ return _this.baseHttpService.api({
2091
+ url: _this.serviceUrl + "/" + id,
2092
+ method: 'delete',
2093
+ });
2094
+ };
2095
+ this.restoreRule$ = function (id) {
2096
+ return _this.baseHttpService.api({
2097
+ url: _this.serviceUrl + "/" + id + "/restore",
2098
+ method: 'patch',
2099
+ });
2076
2100
  };
2077
2101
  }
2078
2102
  return RulesApiService;
@@ -2083,6 +2107,36 @@
2083
2107
  type: i0.Injectable
2084
2108
  }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
2085
2109
 
2110
+ var RuleGroupsApiService = /** @class */ (function () {
2111
+ function RuleGroupsApiService(baseHttpService) {
2112
+ var _this = this;
2113
+ this.baseHttpService = baseHttpService;
2114
+ this.serviceUrl = '/admin/rule-groups';
2115
+ this.fetchRuleGroups$ = function () {
2116
+ return _this.searchRuleGroups$(new i1.Expression(), 0, 100);
2117
+ };
2118
+ this.searchRuleGroups$ = function (expression, skip, count) {
2119
+ var params = new i4.HttpParams();
2120
+ params = params.set('skip', '' + skip);
2121
+ params = params.set('count', '' + count);
2122
+ return _this.baseHttpService.api({ method: 'post', url: _this.serviceUrl + "/search", params: params, body: expression });
2123
+ };
2124
+ this.createRuleGroup$ = function (ruleGroup) {
2125
+ return _this.baseHttpService.api({
2126
+ url: "" + _this.serviceUrl,
2127
+ method: 'post',
2128
+ body: ruleGroup,
2129
+ });
2130
+ };
2131
+ }
2132
+ return RuleGroupsApiService;
2133
+ }());
2134
+ RuleGroupsApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: RuleGroupsApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
2135
+ RuleGroupsApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: RuleGroupsApiService });
2136
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: RuleGroupsApiService, decorators: [{
2137
+ type: i0.Injectable
2138
+ }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
2139
+
2086
2140
  var ApiModule = /** @class */ (function () {
2087
2141
  function ApiModule() {
2088
2142
  }
@@ -2106,6 +2160,7 @@
2106
2160
  UITemplatesApiService,
2107
2161
  ScriptsApiService,
2108
2162
  RulesApiService,
2163
+ RuleGroupsApiService,
2109
2164
  ], imports: [[i4.HttpClientModule]] });
2110
2165
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ApiModule, decorators: [{
2111
2166
  type: i0.NgModule,
@@ -2127,6 +2182,7 @@
2127
2182
  UITemplatesApiService,
2128
2183
  ScriptsApiService,
2129
2184
  RulesApiService,
2185
+ RuleGroupsApiService,
2130
2186
  ],
2131
2187
  }]
2132
2188
  }] });
@@ -2145,6 +2201,8 @@
2145
2201
  exports.ProductModelApiService = ProductModelApiService;
2146
2202
  exports.QuoteApiService = QuoteApiService;
2147
2203
  exports.RampApiService = RampApiService;
2204
+ exports.RuleGroupsApiService = RuleGroupsApiService;
2205
+ exports.RulesApiService = RulesApiService;
2148
2206
  exports.SalesforceApiService = SalesforceApiService;
2149
2207
  exports.ScriptsApiService = ScriptsApiService;
2150
2208
  exports.UITemplatesApiService = UITemplatesApiService;