@veloceapps/api 3.1.6 → 3.1.8

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.
@@ -28,6 +28,53 @@
28
28
  var ___namespace = /*#__PURE__*/_interopNamespace(_);
29
29
  var moment___namespace = /*#__PURE__*/_interopNamespace(moment_);
30
30
 
31
+ var AccountApiService = /** @class */ (function () {
32
+ function AccountApiService(httpService) {
33
+ this.httpService = httpService;
34
+ this.SERVICE_URL = '/accounts';
35
+ }
36
+ AccountApiService.prototype.getAccounts$ = function (options) {
37
+ return this.httpService.api(Object.assign({ method: 'get', url: "" + this.SERVICE_URL }, options));
38
+ };
39
+ AccountApiService.prototype.searchAccounts$ = function (searchParams, options) {
40
+ var params = new i5.HttpParams({ fromObject: searchParams });
41
+ return this.httpService.api(Object.assign({ url: "" + this.SERVICE_URL, params: params }, options));
42
+ };
43
+ AccountApiService.prototype.getAccount$ = function (id, options) {
44
+ return this.httpService.api(Object.assign({ url: this.SERVICE_URL + "/" + id }, options));
45
+ };
46
+ AccountApiService.prototype.getAssets = function (accountId, options) {
47
+ return this.httpService.api(Object.assign({ url: this.SERVICE_URL + "/" + accountId + "/assets" }, options));
48
+ };
49
+ AccountApiService.prototype.getOrders = function (accountId, options) {
50
+ return this.httpService.api(Object.assign({ url: this.SERVICE_URL + "/" + accountId + "/orders" }, options));
51
+ };
52
+ AccountApiService.prototype.getQuotes = function (accountId, options) {
53
+ return this.httpService.api(Object.assign({ url: this.SERVICE_URL + "/" + accountId + "/quotes" }, options));
54
+ };
55
+ AccountApiService.prototype.getAsset = function (accountId, assetId, options) {
56
+ return this.httpService.api(Object.assign({ url: this.SERVICE_URL + "/" + accountId + "/assets/" + assetId }, options));
57
+ };
58
+ AccountApiService.prototype.getOrder = function (accountId, orderId, options) {
59
+ return this.httpService.api(Object.assign({ url: this.SERVICE_URL + "/" + accountId + "/orders/" + orderId }, options));
60
+ };
61
+ AccountApiService.prototype.getQuote = function (accountId, quoteId, options) {
62
+ return this.httpService.api(Object.assign({ url: this.SERVICE_URL + "/" + accountId + "/quotes/" + quoteId }, options));
63
+ };
64
+ AccountApiService.prototype.quoteToOrder = function (accountId, quoteId, options) {
65
+ return this.httpService.api(Object.assign({ url: this.SERVICE_URL + "/" + accountId + "/quotes/" + quoteId + "/to-order", method: 'post', body: { id: quoteId } }, options));
66
+ };
67
+ AccountApiService.prototype.orderToAsset = function (accountId, orderId, options) {
68
+ return this.httpService.api(Object.assign({ url: this.SERVICE_URL + "/" + accountId + "/orders/" + orderId + "/to-asset", method: 'post', body: { id: orderId } }, options));
69
+ };
70
+ return AccountApiService;
71
+ }());
72
+ AccountApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: AccountApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
73
+ AccountApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: AccountApiService });
74
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: AccountApiService, decorators: [{
75
+ type: i0.Injectable
76
+ }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
77
+
31
78
  var CatalogAdminApiService = /** @class */ (function () {
32
79
  function CatalogAdminApiService(baseHttpService) {
33
80
  var _this = this;
@@ -1153,6 +1200,24 @@
1153
1200
  type: i0.Injectable
1154
1201
  }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
1155
1202
 
1203
+ var DeltaApiService = /** @class */ (function () {
1204
+ function DeltaApiService(httpService) {
1205
+ this.httpService = httpService;
1206
+ this.SERVICE_URL = '/delta';
1207
+ }
1208
+ DeltaApiService.prototype.calculate$ = function (request, options) {
1209
+ return this.httpService
1210
+ .api(Object.assign({ method: 'post', url: this.SERVICE_URL + "/calculate", body: request }, options))
1211
+ .pipe(rxjs.map(function (dtos) { return dtos.map(function (dto) { return LineItemDTO.fromDTO(dto); }); }));
1212
+ };
1213
+ return DeltaApiService;
1214
+ }());
1215
+ DeltaApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DeltaApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1216
+ DeltaApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DeltaApiService });
1217
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DeltaApiService, decorators: [{
1218
+ type: i0.Injectable
1219
+ }], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
1220
+
1156
1221
  var DocumentAttachmentApiService = /** @class */ (function () {
1157
1222
  function DocumentAttachmentApiService(httpService, fileDownloadService) {
1158
1223
  this.httpService = httpService;
@@ -1626,36 +1691,12 @@
1626
1691
  this.httpService = httpService;
1627
1692
  this.SERVICE_URL = '/price';
1628
1693
  }
1629
- PriceApiService.prototype.calculateRuntime = function (request) {
1630
- return this.httpService.api({
1631
- method: 'post',
1632
- url: this.SERVICE_URL + "/calculate-runtime",
1633
- body: request,
1634
- });
1635
- };
1636
1694
  PriceApiService.prototype.calculate = function (request) {
1637
1695
  return this.httpService.api({
1638
1696
  method: 'post',
1639
1697
  url: this.SERVICE_URL + "/calculate",
1640
1698
  body: request,
1641
1699
  });
1642
- // TODO: move outside API service
1643
- // .pipe(
1644
- // map(data => {
1645
- // if (data.context) {
1646
- // const context = this.contextService.resolveOrCreate();
1647
- // const patchedContext = {
1648
- // ...context,
1649
- // properties: {
1650
- // ...context.properties,
1651
- // ...data.context.properties,
1652
- // },
1653
- // };
1654
- // this.contextService.update(patchedContext);
1655
- // }
1656
- // return data;
1657
- // }),
1658
- // );
1659
1700
  };
1660
1701
  PriceApiService.prototype.getPriceLists = function () {
1661
1702
  return this.httpService.api({
@@ -2153,32 +2194,11 @@
2153
2194
  this.httpService = httpService;
2154
2195
  this.SERVICE_URL = '/ramp';
2155
2196
  }
2156
- RampApiService.prototype.next = function (request) {
2157
- return this.httpService.api({
2158
- method: 'post',
2159
- url: this.SERVICE_URL + "/next",
2160
- body: request,
2161
- });
2197
+ RampApiService.prototype.next = function (request, options) {
2198
+ return this.httpService.api(Object.assign({ method: 'post', url: this.SERVICE_URL + "/next", body: request }, options));
2162
2199
  };
2163
- RampApiService.prototype.renew = function (request) {
2164
- return this.httpService.api({
2165
- method: 'post',
2166
- url: this.SERVICE_URL + "/renew",
2167
- body: request,
2168
- });
2169
- // TODO: move out of API service
2170
- // .pipe(
2171
- // map(data => {
2172
- // if (data.context) {
2173
- // const context = this.contextService.resolveOrCreate();
2174
- // Object.keys(data.context.properties).forEach(function (key) {
2175
- // context.properties[key] = data.context.properties[key];
2176
- // });
2177
- // this.contextService.update(context);
2178
- // }
2179
- // return data;
2180
- // }),
2181
- // );
2200
+ RampApiService.prototype.renew = function (request, options) {
2201
+ return this.httpService.api(Object.assign({ method: 'post', url: this.SERVICE_URL + "/renew", body: request }, options));
2182
2202
  };
2183
2203
  return RampApiService;
2184
2204
  }());
@@ -2722,6 +2742,8 @@
2722
2742
  ProductApiService,
2723
2743
  CatalogAdminApiService,
2724
2744
  CatalogApiService,
2745
+ DeltaApiService,
2746
+ AccountApiService,
2725
2747
  ], imports: [[i5.HttpClientModule]] });
2726
2748
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ApiModule, decorators: [{
2727
2749
  type: i0.NgModule,
@@ -2749,6 +2771,8 @@
2749
2771
  ProductApiService,
2750
2772
  CatalogAdminApiService,
2751
2773
  CatalogApiService,
2774
+ DeltaApiService,
2775
+ AccountApiService,
2752
2776
  ],
2753
2777
  }]
2754
2778
  }] });
@@ -2757,12 +2781,14 @@
2757
2781
  * Generated bundle index. Do not edit.
2758
2782
  */
2759
2783
 
2784
+ exports.AccountApiService = AccountApiService;
2760
2785
  exports.ApiModule = ApiModule;
2761
2786
  exports.CatalogAdminApiService = CatalogAdminApiService;
2762
2787
  exports.CatalogApiService = CatalogApiService;
2763
2788
  exports.ConfigurationApiService = ConfigurationApiService;
2764
2789
  exports.ConfigurationSettingsApiService = ConfigurationSettingsApiService;
2765
2790
  exports.ContextApiService = ContextApiService;
2791
+ exports.DeltaApiService = DeltaApiService;
2766
2792
  exports.DocumentAttachmentApiService = DocumentAttachmentApiService;
2767
2793
  exports.DocumentTemplatesApiService = DocumentTemplatesApiService;
2768
2794
  exports.FlowsApiService = FlowsApiService;