@veloceapps/api 3.1.17-1 → 3.1.17

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.
@@ -1760,8 +1760,7 @@
1760
1760
  function ProceduresApiService(baseHttpService) {
1761
1761
  var _this = this;
1762
1762
  this.baseHttpService = baseHttpService;
1763
- this.ADMIN_SERVICE_URL = '/admin/procedures';
1764
- this.SERVICE_URL = '/procedures';
1763
+ this.serviceUrl = '/admin/procedures';
1765
1764
  this.fetchProcedures$ = function () {
1766
1765
  return _this.searchProcedures$(new i1.Expression(), 0, 100);
1767
1766
  };
@@ -1769,23 +1768,18 @@
1769
1768
  var params = new i5.HttpParams();
1770
1769
  params = params.set('skip', '' + skip);
1771
1770
  params = params.set('count', '' + count);
1772
- return _this.baseHttpService.api({
1773
- method: 'post',
1774
- url: _this.ADMIN_SERVICE_URL + "/search",
1775
- params: params,
1776
- body: expression,
1777
- });
1771
+ return _this.baseHttpService.api({ method: 'post', url: _this.serviceUrl + "/search", params: params, body: expression });
1778
1772
  };
1779
1773
  this.createProcedure$ = function (newProcedure) {
1780
1774
  return _this.baseHttpService.api({
1781
- url: "" + _this.ADMIN_SERVICE_URL,
1775
+ url: "" + _this.serviceUrl,
1782
1776
  method: 'post',
1783
1777
  body: newProcedure,
1784
1778
  });
1785
1779
  };
1786
1780
  this.updateProcedure$ = function (procedure) {
1787
1781
  return _this.baseHttpService.api({
1788
- url: _this.ADMIN_SERVICE_URL + "/" + procedure.id,
1782
+ url: _this.serviceUrl + "/" + procedure.id,
1789
1783
  method: 'put',
1790
1784
  body: procedure,
1791
1785
  });
@@ -1793,7 +1787,7 @@
1793
1787
  this.duplicateProcedure$ = function (body) {
1794
1788
  return _this.baseHttpService
1795
1789
  .api({
1796
- url: _this.ADMIN_SERVICE_URL + "/" + body.id + "/clone",
1790
+ url: _this.serviceUrl + "/" + body.id + "/clone",
1797
1791
  method: 'post',
1798
1792
  body: body,
1799
1793
  })
@@ -1801,38 +1795,26 @@
1801
1795
  };
1802
1796
  this.removeProcedure$ = function (id) {
1803
1797
  return _this.baseHttpService.api({
1804
- url: _this.ADMIN_SERVICE_URL + "/" + id,
1798
+ url: _this.serviceUrl + "/" + id,
1805
1799
  method: 'delete',
1806
1800
  });
1807
1801
  };
1808
1802
  this.restoreProcedure$ = function (id) {
1809
1803
  return _this.baseHttpService.api({
1810
- url: _this.ADMIN_SERVICE_URL + "/" + id + "/restore",
1804
+ url: _this.serviceUrl + "/" + id + "/restore",
1811
1805
  method: 'patch',
1812
1806
  });
1813
1807
  };
1814
1808
  }
1815
1809
  ProceduresApiService.prototype.fetchProcedure$ = function (id) {
1816
1810
  return this.baseHttpService.api({
1817
- url: this.ADMIN_SERVICE_URL + "/" + id,
1811
+ url: this.serviceUrl + "/" + id,
1818
1812
  method: 'get',
1819
1813
  });
1820
1814
  };
1821
1815
  ProceduresApiService.prototype.execute$ = function (body) {
1822
1816
  return this.baseHttpService.api({
1823
- url: this.SERVICE_URL + "/execute",
1824
- method: 'post',
1825
- body: body,
1826
- });
1827
- };
1828
- /**
1829
- * Run active procedure against QuoteDraft
1830
- * @param body
1831
- * @returns
1832
- */
1833
- ProceduresApiService.prototype.apply$ = function (body) {
1834
- return this.baseHttpService.api({
1835
- url: this.SERVICE_URL + "/apply",
1817
+ url: "/procedures/execute",
1836
1818
  method: 'post',
1837
1819
  body: body,
1838
1820
  });