@veloceapps/api 3.1.18 → 3.1.19

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