@veloceapps/api 3.1.34 → 4.0.0

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.
@@ -1699,6 +1699,43 @@
1699
1699
  type: i0.Injectable
1700
1700
  }], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
1701
1701
 
1702
+ var PicklistsApiService = /** @class */ (function () {
1703
+ function PicklistsApiService(baseHttpService) {
1704
+ var _this = this;
1705
+ this.baseHttpService = baseHttpService;
1706
+ this.serviceUrl = '/admin';
1707
+ this.fetchAllPicklists$ = function () { return _this.baseHttpService.api({ url: _this.serviceUrl + "/picklists" }); };
1708
+ this.fetchPicklist$ = function (code) { return _this.baseHttpService.api({ url: _this.serviceUrl + "/picklists/" + code }); };
1709
+ this.createPicklist$ = function (picklist) {
1710
+ return _this.baseHttpService.api({ method: 'post', url: _this.serviceUrl + "/picklists", body: picklist });
1711
+ };
1712
+ this.updatePicklist$ = function (picklist) {
1713
+ return _this.baseHttpService.api({
1714
+ method: 'put',
1715
+ url: _this.serviceUrl + "/picklists/" + picklist.id,
1716
+ body: picklist,
1717
+ });
1718
+ };
1719
+ this.removePicklist$ = function (id) { return _this.baseHttpService.api({ method: 'delete', url: _this.serviceUrl + "/picklists/" + id }); };
1720
+ this.restorePicklist$ = function (id) {
1721
+ return _this.baseHttpService.api({
1722
+ url: _this.serviceUrl + "/picklists/" + id + "/restore",
1723
+ method: 'patch',
1724
+ });
1725
+ };
1726
+ this.addPicklistValue$ = function (picklist, value) {
1727
+ var data = Object.assign(Object.assign({}, picklist), { values: __spreadArray(__spreadArray([], __read(picklist.values)), [value]) });
1728
+ return _this.baseHttpService.api({ method: 'put', url: _this.serviceUrl + "/picklists/" + picklist.id, body: data });
1729
+ };
1730
+ }
1731
+ return PicklistsApiService;
1732
+ }());
1733
+ PicklistsApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PicklistsApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1734
+ PicklistsApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PicklistsApiService });
1735
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PicklistsApiService, decorators: [{
1736
+ type: i0.Injectable
1737
+ }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
1738
+
1702
1739
  var PriceApiService = /** @class */ (function () {
1703
1740
  function PriceApiService(httpService) {
1704
1741
  this.httpService = httpService;
@@ -2784,6 +2821,7 @@
2784
2821
  CatalogApiService,
2785
2822
  DeltaApiService,
2786
2823
  AccountApiService,
2824
+ PicklistsApiService,
2787
2825
  ], imports: [[i5.HttpClientModule]] });
2788
2826
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ApiModule, decorators: [{
2789
2827
  type: i0.NgModule,
@@ -2813,6 +2851,7 @@
2813
2851
  CatalogApiService,
2814
2852
  DeltaApiService,
2815
2853
  AccountApiService,
2854
+ PicklistsApiService,
2816
2855
  ],
2817
2856
  }]
2818
2857
  }] });
@@ -2832,6 +2871,7 @@
2832
2871
  exports.DocumentAttachmentApiService = DocumentAttachmentApiService;
2833
2872
  exports.DocumentTemplatesApiService = DocumentTemplatesApiService;
2834
2873
  exports.FlowsApiService = FlowsApiService;
2874
+ exports.PicklistsApiService = PicklistsApiService;
2835
2875
  exports.PriceApiService = PriceApiService;
2836
2876
  exports.ProceduresApiService = ProceduresApiService;
2837
2877
  exports.ProductApiService = ProductApiService;