@veloceapps/api 3.1.7 → 3.1.9
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.
- package/bundles/veloce-api.umd.js +83 -25
- package/bundles/veloce-api.umd.js.map +1 -1
- package/esm2015/index.js +3 -1
- package/esm2015/lib/api.module.js +7 -1
- package/esm2015/lib/services/account-api.service.js +50 -0
- package/esm2015/lib/services/catalog-api.service.js +1 -1
- package/esm2015/lib/services/delta-api.service.js +22 -0
- package/esm2015/lib/services/product-api.service.js +10 -1
- package/esm2015/lib/services/ramp-api.service.js +5 -26
- package/esm2015/lib/types/delta-request.types.js +2 -0
- package/esm2015/lib/types/index.js +2 -1
- package/esm2015/lib/types/ramp-request.types.js +1 -1
- package/fesm2015/veloce-api.js +81 -27
- package/fesm2015/veloce-api.js.map +1 -1
- package/index.d.ts +2 -0
- package/lib/services/account-api.service.d.ts +22 -0
- package/lib/services/catalog-api.service.d.ts +7 -7
- package/lib/services/delta-api.service.d.ts +12 -0
- package/lib/services/product-api.service.d.ts +1 -0
- package/lib/services/ramp-api.service.d.ts +4 -4
- package/lib/types/delta-request.types.d.ts +5 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/ramp-request.types.d.ts +6 -0
- package/package.json +1 -1
@@ -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;
|
@@ -1883,6 +1948,14 @@
|
|
1883
1948
|
url: this.serviceUrl + "/" + productId + "/image",
|
1884
1949
|
});
|
1885
1950
|
};
|
1951
|
+
ProductApiService.prototype.fetchImage$ = function (productId) {
|
1952
|
+
return this.baseHttpService.api({
|
1953
|
+
url: this.getImageUrl(productId),
|
1954
|
+
method: 'get',
|
1955
|
+
responseType: 'blob',
|
1956
|
+
errorHandler: rxjs.noop,
|
1957
|
+
});
|
1958
|
+
};
|
1886
1959
|
ProductApiService.prototype.getImageUrl = function (productId) {
|
1887
1960
|
return this.serviceUrl + "/" + productId + "/image";
|
1888
1961
|
};
|
@@ -2129,32 +2202,11 @@
|
|
2129
2202
|
this.httpService = httpService;
|
2130
2203
|
this.SERVICE_URL = '/ramp';
|
2131
2204
|
}
|
2132
|
-
RampApiService.prototype.next = function (request) {
|
2133
|
-
return this.httpService.api({
|
2134
|
-
method: 'post',
|
2135
|
-
url: this.SERVICE_URL + "/next",
|
2136
|
-
body: request,
|
2137
|
-
});
|
2205
|
+
RampApiService.prototype.next = function (request, options) {
|
2206
|
+
return this.httpService.api(Object.assign({ method: 'post', url: this.SERVICE_URL + "/next", body: request }, options));
|
2138
2207
|
};
|
2139
|
-
RampApiService.prototype.renew = function (request) {
|
2140
|
-
return this.httpService.api({
|
2141
|
-
method: 'post',
|
2142
|
-
url: this.SERVICE_URL + "/renew",
|
2143
|
-
body: request,
|
2144
|
-
});
|
2145
|
-
// TODO: move out of API service
|
2146
|
-
// .pipe(
|
2147
|
-
// map(data => {
|
2148
|
-
// if (data.context) {
|
2149
|
-
// const context = this.contextService.resolveOrCreate();
|
2150
|
-
// Object.keys(data.context.properties).forEach(function (key) {
|
2151
|
-
// context.properties[key] = data.context.properties[key];
|
2152
|
-
// });
|
2153
|
-
// this.contextService.update(context);
|
2154
|
-
// }
|
2155
|
-
// return data;
|
2156
|
-
// }),
|
2157
|
-
// );
|
2208
|
+
RampApiService.prototype.renew = function (request, options) {
|
2209
|
+
return this.httpService.api(Object.assign({ method: 'post', url: this.SERVICE_URL + "/renew", body: request }, options));
|
2158
2210
|
};
|
2159
2211
|
return RampApiService;
|
2160
2212
|
}());
|
@@ -2698,6 +2750,8 @@
|
|
2698
2750
|
ProductApiService,
|
2699
2751
|
CatalogAdminApiService,
|
2700
2752
|
CatalogApiService,
|
2753
|
+
DeltaApiService,
|
2754
|
+
AccountApiService,
|
2701
2755
|
], imports: [[i5.HttpClientModule]] });
|
2702
2756
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ApiModule, decorators: [{
|
2703
2757
|
type: i0.NgModule,
|
@@ -2725,6 +2779,8 @@
|
|
2725
2779
|
ProductApiService,
|
2726
2780
|
CatalogAdminApiService,
|
2727
2781
|
CatalogApiService,
|
2782
|
+
DeltaApiService,
|
2783
|
+
AccountApiService,
|
2728
2784
|
],
|
2729
2785
|
}]
|
2730
2786
|
}] });
|
@@ -2733,12 +2789,14 @@
|
|
2733
2789
|
* Generated bundle index. Do not edit.
|
2734
2790
|
*/
|
2735
2791
|
|
2792
|
+
exports.AccountApiService = AccountApiService;
|
2736
2793
|
exports.ApiModule = ApiModule;
|
2737
2794
|
exports.CatalogAdminApiService = CatalogAdminApiService;
|
2738
2795
|
exports.CatalogApiService = CatalogApiService;
|
2739
2796
|
exports.ConfigurationApiService = ConfigurationApiService;
|
2740
2797
|
exports.ConfigurationSettingsApiService = ConfigurationSettingsApiService;
|
2741
2798
|
exports.ContextApiService = ContextApiService;
|
2799
|
+
exports.DeltaApiService = DeltaApiService;
|
2742
2800
|
exports.DocumentAttachmentApiService = DocumentAttachmentApiService;
|
2743
2801
|
exports.DocumentTemplatesApiService = DocumentTemplatesApiService;
|
2744
2802
|
exports.FlowsApiService = FlowsApiService;
|