@veloceapps/api 6.0.0-1 → 6.0.0-10
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/veloceapps-api.umd.js +29 -2
- package/bundles/veloceapps-api.umd.js.map +1 -1
- package/esm2015/index.js +2 -1
- package/esm2015/lib/api.module.js +4 -1
- package/esm2015/lib/services/catalog-admin-api.service.js +2 -3
- package/esm2015/lib/services/shopping-cart-settings-api.service.js +28 -0
- package/fesm2015/veloceapps-api.js +28 -4
- package/fesm2015/veloceapps-api.js.map +1 -1
- package/index.d.ts +1 -0
- package/lib/services/shopping-cart-settings-api.service.d.ts +14 -0
- package/package.json +1 -1
@@ -223,8 +223,7 @@
|
|
223
223
|
var catalogId = _a.catalogId, categoryId = _a.categoryId, data = _a.data;
|
224
224
|
return _this.baseHttpService.api({
|
225
225
|
method: 'delete',
|
226
|
-
url: _this.serviceUrl + "/" + catalogId + "/categories/" + categoryId + "/products/" + data.id
|
227
|
-
body: data,
|
226
|
+
url: _this.serviceUrl + "/" + catalogId + "/categories/" + categoryId + "/products/" + data.id
|
228
227
|
});
|
229
228
|
};
|
230
229
|
}
|
@@ -2196,6 +2195,31 @@
|
|
2196
2195
|
type: i0.Injectable
|
2197
2196
|
}], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
|
2198
2197
|
|
2198
|
+
var ShoppingCartSettingsApiService = /** @class */ (function () {
|
2199
|
+
function ShoppingCartSettingsApiService(configurationSettingsApiService) {
|
2200
|
+
this.configurationSettingsApiService = configurationSettingsApiService;
|
2201
|
+
this.shoppingCartSettingsKey = 'shopping-cart';
|
2202
|
+
}
|
2203
|
+
ShoppingCartSettingsApiService.prototype.getSetting = function (id) {
|
2204
|
+
return this.fetchSettings().pipe(operators.map(function (settings) { return i1.parseJsonSafely(settings === null || settings === void 0 ? void 0 : settings.value, []); }), operators.map(function (settings) { return settings.find(function (setting) { return setting.id == id; }); }));
|
2205
|
+
};
|
2206
|
+
ShoppingCartSettingsApiService.prototype.fetchSettings = function () {
|
2207
|
+
return this.configurationSettingsApiService.fetchSetting(this.shoppingCartSettingsKey, { skipErrorHandler: true });
|
2208
|
+
};
|
2209
|
+
ShoppingCartSettingsApiService.prototype.getSettingsMap = function () {
|
2210
|
+
return this.fetchSettings().pipe(operators.map(function (settings) { return i1.parseJsonSafely(settings === null || settings === void 0 ? void 0 : settings.value, []); }), operators.map(function (settings) { return settings.reduce(function (acc, setting) {
|
2211
|
+
var _a;
|
2212
|
+
return Object.assign(Object.assign({}, acc), (_a = {}, _a[setting.id] = setting.properties, _a));
|
2213
|
+
}, {}); }));
|
2214
|
+
};
|
2215
|
+
return ShoppingCartSettingsApiService;
|
2216
|
+
}());
|
2217
|
+
ShoppingCartSettingsApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartSettingsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
2218
|
+
ShoppingCartSettingsApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartSettingsApiService });
|
2219
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartSettingsApiService, decorators: [{
|
2220
|
+
type: i0.Injectable
|
2221
|
+
}], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
|
2222
|
+
|
2199
2223
|
var fromUIComponentStoryDTO = function (dto, attachments) {
|
2200
2224
|
return {
|
2201
2225
|
id: dto.id,
|
@@ -2518,6 +2542,7 @@
|
|
2518
2542
|
RulesApiService,
|
2519
2543
|
RuleGroupsApiService,
|
2520
2544
|
FlowsApiService,
|
2545
|
+
ShoppingCartSettingsApiService,
|
2521
2546
|
ProductApiService,
|
2522
2547
|
CatalogAdminApiService,
|
2523
2548
|
CatalogApiService,
|
@@ -2550,6 +2575,7 @@
|
|
2550
2575
|
RulesApiService,
|
2551
2576
|
RuleGroupsApiService,
|
2552
2577
|
FlowsApiService,
|
2578
|
+
ShoppingCartSettingsApiService,
|
2553
2579
|
ProductApiService,
|
2554
2580
|
CatalogAdminApiService,
|
2555
2581
|
CatalogApiService,
|
@@ -2590,6 +2616,7 @@
|
|
2590
2616
|
exports.RulesApiService = RulesApiService;
|
2591
2617
|
exports.SalesforceApiService = SalesforceApiService;
|
2592
2618
|
exports.ScriptsApiService = ScriptsApiService;
|
2619
|
+
exports.ShoppingCartSettingsApiService = ShoppingCartSettingsApiService;
|
2593
2620
|
exports.UITemplatesApiService = UITemplatesApiService;
|
2594
2621
|
|
2595
2622
|
Object.defineProperty(exports, '__esModule', { value: true });
|