@scayle/storefront-core 7.22.1
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/CHANGELOG.md +480 -0
- package/LICENSE +21 -0
- package/README.md +29 -0
- package/dist/bapi/init.cjs +30 -0
- package/dist/bapi/init.d.ts +14 -0
- package/dist/bapi/init.mjs +23 -0
- package/dist/cache/cache.cjs +1 -0
- package/dist/cache/cache.d.ts +8 -0
- package/dist/cache/cache.mjs +0 -0
- package/dist/cache/cached.cjs +89 -0
- package/dist/cache/cached.d.ts +24 -0
- package/dist/cache/cached.mjs +92 -0
- package/dist/cache/index.cjs +38 -0
- package/dist/cache/index.d.ts +3 -0
- package/dist/cache/index.mjs +3 -0
- package/dist/cache/providers/redis.cjs +94 -0
- package/dist/cache/providers/redis.d.ts +28 -0
- package/dist/cache/providers/redis.mjs +86 -0
- package/dist/cache/providers/unstorage.cjs +54 -0
- package/dist/cache/providers/unstorage.d.ts +16 -0
- package/dist/cache/providers/unstorage.mjs +49 -0
- package/dist/cache/types.cjs +11 -0
- package/dist/cache/types.d.ts +6 -0
- package/dist/cache/types.mjs +4 -0
- package/dist/constants/basket.cjs +13 -0
- package/dist/constants/basket.d.ts +8 -0
- package/dist/constants/basket.mjs +6 -0
- package/dist/constants/cache.cjs +8 -0
- package/dist/constants/cache.d.ts +1 -0
- package/dist/constants/cache.mjs +1 -0
- package/dist/constants/hash.cjs +11 -0
- package/dist/constants/hash.d.ts +6 -0
- package/dist/constants/hash.mjs +4 -0
- package/dist/constants/httpStatus.cjs +636 -0
- package/dist/constants/httpStatus.d.ts +632 -0
- package/dist/constants/httpStatus.mjs +629 -0
- package/dist/constants/index.cjs +93 -0
- package/dist/constants/index.d.ts +8 -0
- package/dist/constants/index.mjs +8 -0
- package/dist/constants/product.cjs +11 -0
- package/dist/constants/product.d.ts +6 -0
- package/dist/constants/product.mjs +4 -0
- package/dist/constants/promotion.cjs +10 -0
- package/dist/constants/promotion.d.ts +2 -0
- package/dist/constants/promotion.mjs +2 -0
- package/dist/constants/sorting.cjs +24 -0
- package/dist/constants/sorting.d.ts +20 -0
- package/dist/constants/sorting.mjs +17 -0
- package/dist/constants/withParameters.cjs +138 -0
- package/dist/constants/withParameters.d.ts +30 -0
- package/dist/constants/withParameters.mjs +132 -0
- package/dist/errors/BAPIError.cjs +16 -0
- package/dist/errors/BAPIError.d.ts +6 -0
- package/dist/errors/BAPIError.mjs +9 -0
- package/dist/errors/baseError.cjs +17 -0
- package/dist/errors/baseError.d.ts +5 -0
- package/dist/errors/baseError.mjs +10 -0
- package/dist/errors/index.cjs +27 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/index.mjs +2 -0
- package/dist/helpers/advancedAttributeHelpers.cjs +26 -0
- package/dist/helpers/advancedAttributeHelpers.d.ts +12 -0
- package/dist/helpers/advancedAttributeHelpers.mjs +21 -0
- package/dist/helpers/arrayHelpers.cjs +10 -0
- package/dist/helpers/arrayHelpers.d.ts +1 -0
- package/dist/helpers/arrayHelpers.mjs +3 -0
- package/dist/helpers/attributeHelpers.cjs +24 -0
- package/dist/helpers/attributeHelpers.d.ts +5 -0
- package/dist/helpers/attributeHelpers.mjs +17 -0
- package/dist/helpers/autobind.cjs +44 -0
- package/dist/helpers/autobind.d.ts +39 -0
- package/dist/helpers/autobind.mjs +35 -0
- package/dist/helpers/basketHelpers.cjs +12 -0
- package/dist/helpers/basketHelpers.d.ts +2 -0
- package/dist/helpers/basketHelpers.mjs +5 -0
- package/dist/helpers/categoryHelper.cjs +61 -0
- package/dist/helpers/categoryHelper.d.ts +7 -0
- package/dist/helpers/categoryHelper.mjs +44 -0
- package/dist/helpers/filterHelper.cjs +156 -0
- package/dist/helpers/filterHelper.d.ts +82 -0
- package/dist/helpers/filterHelper.mjs +147 -0
- package/dist/helpers/formHelpers.cjs +114 -0
- package/dist/helpers/formHelpers.d.ts +48 -0
- package/dist/helpers/formHelpers.mjs +106 -0
- package/dist/helpers/imageHelpers.cjs +20 -0
- package/dist/helpers/imageHelpers.d.ts +4 -0
- package/dist/helpers/imageHelpers.mjs +14 -0
- package/dist/helpers/index.cjs +192 -0
- package/dist/helpers/index.d.ts +17 -0
- package/dist/helpers/index.mjs +17 -0
- package/dist/helpers/localization.cjs +13 -0
- package/dist/helpers/localization.d.ts +7 -0
- package/dist/helpers/localization.mjs +6 -0
- package/dist/helpers/objectHelpers.cjs +19 -0
- package/dist/helpers/objectHelpers.d.ts +1 -0
- package/dist/helpers/objectHelpers.mjs +6 -0
- package/dist/helpers/orderHelpers.cjs +10 -0
- package/dist/helpers/orderHelpers.d.ts +67 -0
- package/dist/helpers/orderHelpers.mjs +4 -0
- package/dist/helpers/product.fixture.cjs +770 -0
- package/dist/helpers/product.fixture.d.ts +415 -0
- package/dist/helpers/product.fixture.mjs +838 -0
- package/dist/helpers/productDisruptorHelper.cjs +37 -0
- package/dist/helpers/productDisruptorHelper.d.ts +10 -0
- package/dist/helpers/productDisruptorHelper.mjs +23 -0
- package/dist/helpers/productHelpers.cjs +188 -0
- package/dist/helpers/productHelpers.d.ts +41 -0
- package/dist/helpers/productHelpers.mjs +170 -0
- package/dist/helpers/sanitizationHelpers.cjs +15 -0
- package/dist/helpers/sanitizationHelpers.d.ts +2 -0
- package/dist/helpers/sanitizationHelpers.mjs +6 -0
- package/dist/helpers/sortingHelper.cjs +67 -0
- package/dist/helpers/sortingHelper.d.ts +69 -0
- package/dist/helpers/sortingHelper.mjs +66 -0
- package/dist/helpers/stringHelpers.cjs +8 -0
- package/dist/helpers/stringHelpers.d.ts +2 -0
- package/dist/helpers/stringHelpers.mjs +2 -0
- package/dist/index.cjs +85 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.mjs +8 -0
- package/dist/rpc/methods/basket/basket.cjs +183 -0
- package/dist/rpc/methods/basket/basket.d.ts +23 -0
- package/dist/rpc/methods/basket/basket.mjs +181 -0
- package/dist/rpc/methods/brands.cjs +34 -0
- package/dist/rpc/methods/brands.d.ts +5 -0
- package/dist/rpc/methods/brands.mjs +16 -0
- package/dist/rpc/methods/categories.cjs +102 -0
- package/dist/rpc/methods/categories.d.ts +21 -0
- package/dist/rpc/methods/categories.mjs +64 -0
- package/dist/rpc/methods/cbd.cjs +45 -0
- package/dist/rpc/methods/cbd.d.ts +4 -0
- package/dist/rpc/methods/cbd.mjs +36 -0
- package/dist/rpc/methods/checkout/index.cjs +38 -0
- package/dist/rpc/methods/checkout/index.d.ts +3 -0
- package/dist/rpc/methods/checkout/index.mjs +3 -0
- package/dist/rpc/methods/checkout/order.cjs +55 -0
- package/dist/rpc/methods/checkout/order.d.ts +4 -0
- package/dist/rpc/methods/checkout/order.mjs +43 -0
- package/dist/rpc/methods/checkout/shopUser.cjs +126 -0
- package/dist/rpc/methods/checkout/shopUser.d.ts +7 -0
- package/dist/rpc/methods/checkout/shopUser.mjs +109 -0
- package/dist/rpc/methods/checkout/shopUserAddresses.cjs +25 -0
- package/dist/rpc/methods/checkout/shopUserAddresses.d.ts +3 -0
- package/dist/rpc/methods/checkout/shopUserAddresses.mjs +19 -0
- package/dist/rpc/methods/index.cjs +159 -0
- package/dist/rpc/methods/index.d.ts +14 -0
- package/dist/rpc/methods/index.mjs +14 -0
- package/dist/rpc/methods/navigationTrees.cjs +33 -0
- package/dist/rpc/methods/navigationTrees.d.ts +5 -0
- package/dist/rpc/methods/navigationTrees.mjs +10 -0
- package/dist/rpc/methods/products.cjs +261 -0
- package/dist/rpc/methods/products.d.ts +13 -0
- package/dist/rpc/methods/products.mjs +217 -0
- package/dist/rpc/methods/promotion.cjs +53 -0
- package/dist/rpc/methods/promotion.d.ts +4 -0
- package/dist/rpc/methods/promotion.mjs +38 -0
- package/dist/rpc/methods/search.cjs +38 -0
- package/dist/rpc/methods/search.d.ts +10 -0
- package/dist/rpc/methods/search.mjs +22 -0
- package/dist/rpc/methods/session.cjs +274 -0
- package/dist/rpc/methods/session.d.ts +20 -0
- package/dist/rpc/methods/session.mjs +309 -0
- package/dist/rpc/methods/shopConfiguration.cjs +15 -0
- package/dist/rpc/methods/shopConfiguration.d.ts +4 -0
- package/dist/rpc/methods/shopConfiguration.mjs +6 -0
- package/dist/rpc/methods/user.cjs +89 -0
- package/dist/rpc/methods/user.d.ts +20 -0
- package/dist/rpc/methods/user.mjs +56 -0
- package/dist/rpc/methods/variants.cjs +29 -0
- package/dist/rpc/methods/variants.d.ts +8 -0
- package/dist/rpc/methods/variants.mjs +12 -0
- package/dist/rpc/methods/wishlist.cjs +85 -0
- package/dist/rpc/methods/wishlist.d.ts +13 -0
- package/dist/rpc/methods/wishlist.mjs +61 -0
- package/dist/server.cjs +39 -0
- package/dist/server.d.ts +5 -0
- package/dist/server.mjs +4 -0
- package/dist/types/api/auth.cjs +1 -0
- package/dist/types/api/auth.d.ts +63 -0
- package/dist/types/api/auth.mjs +0 -0
- package/dist/types/api/context.cjs +1 -0
- package/dist/types/api/context.d.ts +61 -0
- package/dist/types/api/context.mjs +0 -0
- package/dist/types/api/rpc.cjs +1 -0
- package/dist/types/api/rpc.d.ts +4 -0
- package/dist/types/api/rpc.mjs +0 -0
- package/dist/types/bapi/basket.cjs +1 -0
- package/dist/types/bapi/basket.d.ts +25 -0
- package/dist/types/bapi/basket.mjs +0 -0
- package/dist/types/bapi/brand.cjs +1 -0
- package/dist/types/bapi/brand.d.ts +2 -0
- package/dist/types/bapi/brand.mjs +0 -0
- package/dist/types/bapi/category.cjs +1 -0
- package/dist/types/bapi/category.d.ts +6 -0
- package/dist/types/bapi/category.mjs +0 -0
- package/dist/types/bapi/filter.cjs +1 -0
- package/dist/types/bapi/filter.d.ts +49 -0
- package/dist/types/bapi/filter.mjs +0 -0
- package/dist/types/bapi/navigation.cjs +1 -0
- package/dist/types/bapi/navigation.d.ts +10 -0
- package/dist/types/bapi/navigation.mjs +0 -0
- package/dist/types/bapi/order.cjs +1 -0
- package/dist/types/bapi/order.d.ts +554 -0
- package/dist/types/bapi/order.mjs +0 -0
- package/dist/types/bapi/pagination.cjs +1 -0
- package/dist/types/bapi/pagination.d.ts +13 -0
- package/dist/types/bapi/pagination.mjs +0 -0
- package/dist/types/bapi/product.cjs +1 -0
- package/dist/types/bapi/product.d.ts +84 -0
- package/dist/types/bapi/product.mjs +0 -0
- package/dist/types/bapi/productFilter.cjs +1 -0
- package/dist/types/bapi/productFilter.d.ts +7 -0
- package/dist/types/bapi/productFilter.mjs +0 -0
- package/dist/types/bapi/promotion.cjs +1 -0
- package/dist/types/bapi/promotion.d.ts +2 -0
- package/dist/types/bapi/promotion.mjs +0 -0
- package/dist/types/bapi/redirects.cjs +1 -0
- package/dist/types/bapi/redirects.d.ts +1 -0
- package/dist/types/bapi/redirects.mjs +0 -0
- package/dist/types/bapi/router.cjs +1 -0
- package/dist/types/bapi/router.d.ts +1 -0
- package/dist/types/bapi/router.mjs +0 -0
- package/dist/types/bapi/search.cjs +1 -0
- package/dist/types/bapi/search.d.ts +21 -0
- package/dist/types/bapi/search.mjs +0 -0
- package/dist/types/bapi/sorting.cjs +5 -0
- package/dist/types/bapi/sorting.d.ts +10 -0
- package/dist/types/bapi/sorting.mjs +1 -0
- package/dist/types/bapi/wishlist.cjs +1 -0
- package/dist/types/bapi/wishlist.d.ts +9 -0
- package/dist/types/bapi/wishlist.mjs +0 -0
- package/dist/types/breadcrumb.cjs +1 -0
- package/dist/types/breadcrumb.d.ts +4 -0
- package/dist/types/breadcrumb.mjs +0 -0
- package/dist/types/index.cjs +236 -0
- package/dist/types/index.d.ts +22 -0
- package/dist/types/index.mjs +21 -0
- package/dist/types/promises.cjs +1 -0
- package/dist/types/promises.d.ts +2 -0
- package/dist/types/promises.mjs +0 -0
- package/dist/types/user.cjs +1 -0
- package/dist/types/user.d.ts +100 -0
- package/dist/types/user.mjs +0 -0
- package/dist/utils/compression.cjs +24 -0
- package/dist/utils/compression.d.ts +2 -0
- package/dist/utils/compression.mjs +16 -0
- package/dist/utils/hash.cjs +68 -0
- package/dist/utils/hash.d.ts +8 -0
- package/dist/utils/hash.mjs +61 -0
- package/dist/utils/index.cjs +27 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.mjs +2 -0
- package/dist/utils/keys.cjs +67 -0
- package/dist/utils/keys.d.ts +24 -0
- package/dist/utils/keys.mjs +56 -0
- package/dist/utils/log.cjs +93 -0
- package/dist/utils/log.d.ts +43 -0
- package/dist/utils/log.mjs +75 -0
- package/dist/utils/rpc.cjs +41 -0
- package/dist/utils/rpc.d.ts +6 -0
- package/dist/utils/rpc.mjs +35 -0
- package/dist/utils/timeout.cjs +17 -0
- package/dist/utils/timeout.d.ts +2 -0
- package/dist/utils/timeout.mjs +9 -0
- package/dist/utils/user.cjs +75 -0
- package/dist/utils/user.d.ts +14 -0
- package/dist/utils/user.mjs +65 -0
- package/package.json +97 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _withParameters = require("./withParameters.cjs");
|
|
7
|
+
Object.keys(_withParameters).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _withParameters[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _withParameters[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _cache = require("./cache.cjs");
|
|
18
|
+
Object.keys(_cache).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _cache[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _cache[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
var _basket = require("./basket.cjs");
|
|
29
|
+
Object.keys(_basket).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _basket[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _basket[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
var _httpStatus = require("./httpStatus.cjs");
|
|
40
|
+
Object.keys(_httpStatus).forEach(function (key) {
|
|
41
|
+
if (key === "default" || key === "__esModule") return;
|
|
42
|
+
if (key in exports && exports[key] === _httpStatus[key]) return;
|
|
43
|
+
Object.defineProperty(exports, key, {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () {
|
|
46
|
+
return _httpStatus[key];
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
var _sorting = require("./sorting.cjs");
|
|
51
|
+
Object.keys(_sorting).forEach(function (key) {
|
|
52
|
+
if (key === "default" || key === "__esModule") return;
|
|
53
|
+
if (key in exports && exports[key] === _sorting[key]) return;
|
|
54
|
+
Object.defineProperty(exports, key, {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _sorting[key];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
var _product = require("./product.cjs");
|
|
62
|
+
Object.keys(_product).forEach(function (key) {
|
|
63
|
+
if (key === "default" || key === "__esModule") return;
|
|
64
|
+
if (key in exports && exports[key] === _product[key]) return;
|
|
65
|
+
Object.defineProperty(exports, key, {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
get: function () {
|
|
68
|
+
return _product[key];
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
var _hash = require("./hash.cjs");
|
|
73
|
+
Object.keys(_hash).forEach(function (key) {
|
|
74
|
+
if (key === "default" || key === "__esModule") return;
|
|
75
|
+
if (key in exports && exports[key] === _hash[key]) return;
|
|
76
|
+
Object.defineProperty(exports, key, {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function () {
|
|
79
|
+
return _hash[key];
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
var _promotion = require("./promotion.cjs");
|
|
84
|
+
Object.keys(_promotion).forEach(function (key) {
|
|
85
|
+
if (key === "default" || key === "__esModule") return;
|
|
86
|
+
if (key in exports && exports[key] === _promotion[key]) return;
|
|
87
|
+
Object.defineProperty(exports, key, {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: function () {
|
|
90
|
+
return _promotion[key];
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./withParameters.mjs";
|
|
2
|
+
export * from "./cache.mjs";
|
|
3
|
+
export * from "./basket.mjs";
|
|
4
|
+
export * from "./httpStatus.mjs";
|
|
5
|
+
export * from "./sorting.mjs";
|
|
6
|
+
export * from "./product.mjs";
|
|
7
|
+
export * from "./hash.mjs";
|
|
8
|
+
export * from "./promotion.mjs";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PROMOTION_PER_PAGE_DEFAULT = exports.PROMOTION_PAGE_DEFAULT = void 0;
|
|
7
|
+
const PROMOTION_PAGE_DEFAULT = 1;
|
|
8
|
+
exports.PROMOTION_PAGE_DEFAULT = PROMOTION_PAGE_DEFAULT;
|
|
9
|
+
const PROMOTION_PER_PAGE_DEFAULT = 100;
|
|
10
|
+
exports.PROMOTION_PER_PAGE_DEFAULT = PROMOTION_PER_PAGE_DEFAULT;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SortQuery = exports.SortName = void 0;
|
|
7
|
+
const SortName = {
|
|
8
|
+
TOPSELLER: "topseller",
|
|
9
|
+
DATE_NEWEST: "date_newest",
|
|
10
|
+
PRICE_DESC: "price_desc",
|
|
11
|
+
PRICE_ASC: "price_asc",
|
|
12
|
+
REDUCTION_DESC: "reduction_desc",
|
|
13
|
+
REDUCTION_ASC: "reduction_asc"
|
|
14
|
+
};
|
|
15
|
+
exports.SortName = SortName;
|
|
16
|
+
const SortQuery = {
|
|
17
|
+
TOPSELLER: "topseller",
|
|
18
|
+
DATE_NEWEST: "date-newest",
|
|
19
|
+
PRICE_DESC: "price-desc",
|
|
20
|
+
PRICE_ASC: "price-asc",
|
|
21
|
+
REDUCTION_DESC: "reduction-desc",
|
|
22
|
+
REDUCTION_ASC: "reduction-asc"
|
|
23
|
+
};
|
|
24
|
+
exports.SortQuery = SortQuery;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ValuesType } from 'utility-types';
|
|
2
|
+
declare const SortName: {
|
|
3
|
+
readonly TOPSELLER: "topseller";
|
|
4
|
+
readonly DATE_NEWEST: "date_newest";
|
|
5
|
+
readonly PRICE_DESC: "price_desc";
|
|
6
|
+
readonly PRICE_ASC: "price_asc";
|
|
7
|
+
readonly REDUCTION_DESC: "reduction_desc";
|
|
8
|
+
readonly REDUCTION_ASC: "reduction_asc";
|
|
9
|
+
};
|
|
10
|
+
declare const SortQuery: {
|
|
11
|
+
readonly TOPSELLER: "topseller";
|
|
12
|
+
readonly DATE_NEWEST: "date-newest";
|
|
13
|
+
readonly PRICE_DESC: "price-desc";
|
|
14
|
+
readonly PRICE_ASC: "price-asc";
|
|
15
|
+
readonly REDUCTION_DESC: "reduction-desc";
|
|
16
|
+
readonly REDUCTION_ASC: "reduction-asc";
|
|
17
|
+
};
|
|
18
|
+
type SortName = ValuesType<typeof SortName>;
|
|
19
|
+
type SortQuery = ValuesType<typeof SortQuery>;
|
|
20
|
+
export { SortName, SortQuery };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const SortName = {
|
|
2
|
+
TOPSELLER: "topseller",
|
|
3
|
+
DATE_NEWEST: "date_newest",
|
|
4
|
+
PRICE_DESC: "price_desc",
|
|
5
|
+
PRICE_ASC: "price_asc",
|
|
6
|
+
REDUCTION_DESC: "reduction_desc",
|
|
7
|
+
REDUCTION_ASC: "reduction_asc"
|
|
8
|
+
};
|
|
9
|
+
const SortQuery = {
|
|
10
|
+
TOPSELLER: "topseller",
|
|
11
|
+
DATE_NEWEST: "date-newest",
|
|
12
|
+
PRICE_DESC: "price-desc",
|
|
13
|
+
PRICE_ASC: "price-asc",
|
|
14
|
+
REDUCTION_DESC: "reduction-desc",
|
|
15
|
+
REDUCTION_ASC: "reduction-asc"
|
|
16
|
+
};
|
|
17
|
+
export { SortName, SortQuery };
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MIN_WITH_PARAMS_WISHLIST = exports.MIN_WITH_PARAMS_VARIANT = exports.MIN_WITH_PARAMS_SEARCH = exports.MIN_WITH_PARAMS_PRODUCT = exports.MIN_WITH_PARAMS_BASKET = exports.DEFAULT_WITH_LISTING = void 0;
|
|
7
|
+
const DEFAULT_WITH_LISTING = {
|
|
8
|
+
items: {
|
|
9
|
+
product: {
|
|
10
|
+
attributes: "all",
|
|
11
|
+
advancedAttributes: "all",
|
|
12
|
+
variants: {
|
|
13
|
+
attributes: "all",
|
|
14
|
+
advancedAttributes: "all"
|
|
15
|
+
},
|
|
16
|
+
images: "all",
|
|
17
|
+
categories: {
|
|
18
|
+
properties: "all"
|
|
19
|
+
},
|
|
20
|
+
priceRange: true
|
|
21
|
+
},
|
|
22
|
+
variant: {
|
|
23
|
+
attributes: "all"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports.DEFAULT_WITH_LISTING = DEFAULT_WITH_LISTING;
|
|
28
|
+
const MIN_WITH_PARAMS_SEARCH = {
|
|
29
|
+
products: {
|
|
30
|
+
attributes: {
|
|
31
|
+
withKey: ["brand", "color", "colorDetail", "name"]
|
|
32
|
+
},
|
|
33
|
+
variants: {
|
|
34
|
+
attributes: {
|
|
35
|
+
withKey: ["price", "size"]
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
categories: {
|
|
39
|
+
properties: "all"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
exports.MIN_WITH_PARAMS_SEARCH = MIN_WITH_PARAMS_SEARCH;
|
|
44
|
+
const MIN_WITH_PARAMS_PRODUCT = {
|
|
45
|
+
attributes: {
|
|
46
|
+
withKey: ["color", "brand", "name", "material", "careSymbol"]
|
|
47
|
+
},
|
|
48
|
+
variants: {
|
|
49
|
+
attributes: {
|
|
50
|
+
withKey: ["price", "size"]
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
images: {
|
|
54
|
+
attributes: {
|
|
55
|
+
withKey: ["imageBackground"]
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
categories: {
|
|
59
|
+
properties: "all"
|
|
60
|
+
},
|
|
61
|
+
siblings: {
|
|
62
|
+
images: {
|
|
63
|
+
attributes: {
|
|
64
|
+
withKey: ["imageBackground"]
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
attributes: {
|
|
68
|
+
withKey: ["color", "brand", "name"]
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
exports.MIN_WITH_PARAMS_PRODUCT = MIN_WITH_PARAMS_PRODUCT;
|
|
73
|
+
const MIN_WITH_PARAMS_BASKET = {
|
|
74
|
+
items: {
|
|
75
|
+
product: {
|
|
76
|
+
attributes: {
|
|
77
|
+
withKey: ["brand", "name", "color"]
|
|
78
|
+
},
|
|
79
|
+
variants: {
|
|
80
|
+
attributes: {
|
|
81
|
+
withKey: ["brand", "name", "price", "size", "shopSize", "vendorSize"]
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
images: {
|
|
85
|
+
attributes: {
|
|
86
|
+
withKey: ["imageBackground"]
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
categories: {
|
|
90
|
+
properties: "all"
|
|
91
|
+
},
|
|
92
|
+
priceRange: true,
|
|
93
|
+
lowestPriorPrice: true
|
|
94
|
+
},
|
|
95
|
+
variant: {
|
|
96
|
+
attributes: {
|
|
97
|
+
withKey: ["size", "shopSize", "vendorSize"]
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
exports.MIN_WITH_PARAMS_BASKET = MIN_WITH_PARAMS_BASKET;
|
|
103
|
+
const MIN_WITH_PARAMS_WISHLIST = {
|
|
104
|
+
items: {
|
|
105
|
+
product: {
|
|
106
|
+
attributes: {
|
|
107
|
+
withKey: ["brand", "name", "color"]
|
|
108
|
+
},
|
|
109
|
+
variants: {
|
|
110
|
+
attributes: {
|
|
111
|
+
withKey: ["brand", "name", "price", "size", "shopSize", "vendorSize"]
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
images: {
|
|
115
|
+
attributes: {
|
|
116
|
+
withKey: ["imageBackground"]
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
categories: {
|
|
120
|
+
properties: "all"
|
|
121
|
+
},
|
|
122
|
+
priceRange: true,
|
|
123
|
+
lowestPriorPrice: true
|
|
124
|
+
},
|
|
125
|
+
variant: {
|
|
126
|
+
attributes: {
|
|
127
|
+
withKey: ["size", "shopSize", "vendorSize"]
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
exports.MIN_WITH_PARAMS_WISHLIST = MIN_WITH_PARAMS_WISHLIST;
|
|
133
|
+
const MIN_WITH_PARAMS_VARIANT = {
|
|
134
|
+
attributes: {
|
|
135
|
+
withKey: ["size", "shopSize", "vendorSize"]
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
exports.MIN_WITH_PARAMS_VARIANT = MIN_WITH_PARAMS_VARIANT;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { BasketWith } from '@aboutyou/backbone/endpoints/basket/getBasket';
|
|
2
|
+
import type { ProductWith } from '@aboutyou/backbone/types/ProductWith';
|
|
3
|
+
import type { WishlistWith } from '@aboutyou/backbone/endpoints/wishlist/getWishlist';
|
|
4
|
+
import { SearchWith } from '../types';
|
|
5
|
+
declare const DEFAULT_WITH_LISTING: {
|
|
6
|
+
items: {
|
|
7
|
+
product: {
|
|
8
|
+
attributes: "all";
|
|
9
|
+
advancedAttributes: "all";
|
|
10
|
+
variants: {
|
|
11
|
+
attributes: "all";
|
|
12
|
+
advancedAttributes: "all";
|
|
13
|
+
};
|
|
14
|
+
images: "all";
|
|
15
|
+
categories: {
|
|
16
|
+
properties: "all";
|
|
17
|
+
};
|
|
18
|
+
priceRange: boolean;
|
|
19
|
+
};
|
|
20
|
+
variant: {
|
|
21
|
+
attributes: "all";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
declare const MIN_WITH_PARAMS_SEARCH: SearchWith;
|
|
26
|
+
declare const MIN_WITH_PARAMS_PRODUCT: ProductWith;
|
|
27
|
+
declare const MIN_WITH_PARAMS_BASKET: BasketWith;
|
|
28
|
+
declare const MIN_WITH_PARAMS_WISHLIST: WishlistWith;
|
|
29
|
+
declare const MIN_WITH_PARAMS_VARIANT: ProductWith;
|
|
30
|
+
export { DEFAULT_WITH_LISTING, MIN_WITH_PARAMS_BASKET, MIN_WITH_PARAMS_SEARCH, MIN_WITH_PARAMS_PRODUCT, MIN_WITH_PARAMS_WISHLIST, MIN_WITH_PARAMS_VARIANT, };
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
const DEFAULT_WITH_LISTING = {
|
|
2
|
+
items: {
|
|
3
|
+
product: {
|
|
4
|
+
attributes: "all",
|
|
5
|
+
advancedAttributes: "all",
|
|
6
|
+
variants: {
|
|
7
|
+
attributes: "all",
|
|
8
|
+
advancedAttributes: "all"
|
|
9
|
+
},
|
|
10
|
+
images: "all",
|
|
11
|
+
categories: {
|
|
12
|
+
properties: "all"
|
|
13
|
+
},
|
|
14
|
+
priceRange: true
|
|
15
|
+
},
|
|
16
|
+
variant: {
|
|
17
|
+
attributes: "all"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const MIN_WITH_PARAMS_SEARCH = {
|
|
22
|
+
products: {
|
|
23
|
+
attributes: {
|
|
24
|
+
withKey: ["brand", "color", "colorDetail", "name"]
|
|
25
|
+
},
|
|
26
|
+
variants: {
|
|
27
|
+
attributes: {
|
|
28
|
+
withKey: ["price", "size"]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
categories: {
|
|
32
|
+
properties: "all"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
const MIN_WITH_PARAMS_PRODUCT = {
|
|
37
|
+
attributes: {
|
|
38
|
+
withKey: ["color", "brand", "name", "material", "careSymbol"]
|
|
39
|
+
},
|
|
40
|
+
variants: {
|
|
41
|
+
attributes: { withKey: ["price", "size"] }
|
|
42
|
+
},
|
|
43
|
+
images: {
|
|
44
|
+
attributes: {
|
|
45
|
+
withKey: ["imageBackground"]
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
categories: {
|
|
49
|
+
properties: "all"
|
|
50
|
+
},
|
|
51
|
+
siblings: {
|
|
52
|
+
images: {
|
|
53
|
+
attributes: {
|
|
54
|
+
withKey: ["imageBackground"]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
attributes: {
|
|
58
|
+
withKey: ["color", "brand", "name"]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
const MIN_WITH_PARAMS_BASKET = {
|
|
63
|
+
items: {
|
|
64
|
+
product: {
|
|
65
|
+
attributes: {
|
|
66
|
+
withKey: ["brand", "name", "color"]
|
|
67
|
+
},
|
|
68
|
+
variants: {
|
|
69
|
+
attributes: {
|
|
70
|
+
withKey: ["brand", "name", "price", "size", "shopSize", "vendorSize"]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
images: {
|
|
74
|
+
attributes: {
|
|
75
|
+
withKey: ["imageBackground"]
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
categories: {
|
|
79
|
+
properties: "all"
|
|
80
|
+
},
|
|
81
|
+
priceRange: true,
|
|
82
|
+
lowestPriorPrice: true
|
|
83
|
+
},
|
|
84
|
+
variant: {
|
|
85
|
+
attributes: {
|
|
86
|
+
withKey: ["size", "shopSize", "vendorSize"]
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
const MIN_WITH_PARAMS_WISHLIST = {
|
|
92
|
+
items: {
|
|
93
|
+
product: {
|
|
94
|
+
attributes: {
|
|
95
|
+
withKey: ["brand", "name", "color"]
|
|
96
|
+
},
|
|
97
|
+
variants: {
|
|
98
|
+
attributes: {
|
|
99
|
+
withKey: ["brand", "name", "price", "size", "shopSize", "vendorSize"]
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
images: {
|
|
103
|
+
attributes: {
|
|
104
|
+
withKey: ["imageBackground"]
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
categories: {
|
|
108
|
+
properties: "all"
|
|
109
|
+
},
|
|
110
|
+
priceRange: true,
|
|
111
|
+
lowestPriorPrice: true
|
|
112
|
+
},
|
|
113
|
+
variant: {
|
|
114
|
+
attributes: {
|
|
115
|
+
withKey: ["size", "shopSize", "vendorSize"]
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
const MIN_WITH_PARAMS_VARIANT = {
|
|
121
|
+
attributes: {
|
|
122
|
+
withKey: ["size", "shopSize", "vendorSize"]
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
export {
|
|
126
|
+
DEFAULT_WITH_LISTING,
|
|
127
|
+
MIN_WITH_PARAMS_BASKET,
|
|
128
|
+
MIN_WITH_PARAMS_SEARCH,
|
|
129
|
+
MIN_WITH_PARAMS_PRODUCT,
|
|
130
|
+
MIN_WITH_PARAMS_WISHLIST,
|
|
131
|
+
MIN_WITH_PARAMS_VARIANT
|
|
132
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BAPIError = void 0;
|
|
7
|
+
var _constants = require("../constants/index.cjs");
|
|
8
|
+
var _baseError = require("./baseError.cjs");
|
|
9
|
+
class BAPIError extends _baseError.BaseError {
|
|
10
|
+
url;
|
|
11
|
+
constructor(name = _constants.HttpStatusMessage.INTERNAL_SERVER_ERROR, statusCode = _constants.HttpStatusCode.INTERNAL_SERVER_ERROR, description = "BAPI Error", url) {
|
|
12
|
+
super(name, statusCode, description);
|
|
13
|
+
this.url = url;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.BAPIError = BAPIError;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { HttpStatusCode, HttpStatusMessage } from '../constants';
|
|
2
|
+
import { BaseError } from './baseError';
|
|
3
|
+
export declare class BAPIError extends BaseError {
|
|
4
|
+
url?: string;
|
|
5
|
+
constructor(name?: HttpStatusMessage | string, statusCode?: HttpStatusCode, description?: string, url?: string);
|
|
6
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HttpStatusCode, HttpStatusMessage } from "../constants/index.mjs";
|
|
2
|
+
import { BaseError } from "./baseError.mjs";
|
|
3
|
+
export class BAPIError extends BaseError {
|
|
4
|
+
url;
|
|
5
|
+
constructor(name = HttpStatusMessage.INTERNAL_SERVER_ERROR, statusCode = HttpStatusCode.INTERNAL_SERVER_ERROR, description = "BAPI Error", url) {
|
|
6
|
+
super(name, statusCode, description);
|
|
7
|
+
this.url = url;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BaseError = void 0;
|
|
7
|
+
class BaseError extends Error {
|
|
8
|
+
statusCode;
|
|
9
|
+
constructor(name, statusCode, description) {
|
|
10
|
+
super(description);
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
this.name = name;
|
|
13
|
+
this.statusCode = statusCode;
|
|
14
|
+
Error.captureStackTrace(this);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.BaseError = BaseError;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export class BaseError extends Error {
|
|
2
|
+
statusCode;
|
|
3
|
+
constructor(name, statusCode, description) {
|
|
4
|
+
super(description);
|
|
5
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
6
|
+
this.name = name;
|
|
7
|
+
this.statusCode = statusCode;
|
|
8
|
+
Error.captureStackTrace(this);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _BAPIError = require("./BAPIError.cjs");
|
|
7
|
+
Object.keys(_BAPIError).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _BAPIError[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _BAPIError[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _baseError = require("./baseError.cjs");
|
|
18
|
+
Object.keys(_baseError).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _baseError[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _baseError[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getFlattenedVariantCrosssellings = exports.getFlattenedMaterialComposition = exports.flattenFieldSet = void 0;
|
|
7
|
+
var _arrayHelpers = require("./arrayHelpers.cjs");
|
|
8
|
+
var _objectHelpers = require("./objectHelpers.cjs");
|
|
9
|
+
const flattenFieldSet = fieldSet => {
|
|
10
|
+
return fieldSet.map(_objectHelpers.flattenObject);
|
|
11
|
+
};
|
|
12
|
+
exports.flattenFieldSet = flattenFieldSet;
|
|
13
|
+
const getFlattenedMaterialComposition = materialCompositions => {
|
|
14
|
+
return materialCompositions.map(materialComposition => ({
|
|
15
|
+
...(0, _arrayHelpers.flattenDeep)(flattenFieldSet(materialComposition.fieldSet))[0],
|
|
16
|
+
values: (0, _arrayHelpers.flattenDeep)(materialComposition.groupSet.map(g => flattenFieldSet(g.fieldSet)))
|
|
17
|
+
}));
|
|
18
|
+
};
|
|
19
|
+
exports.getFlattenedMaterialComposition = getFlattenedMaterialComposition;
|
|
20
|
+
const getFlattenedVariantCrosssellings = variantCrosssellings => {
|
|
21
|
+
return variantCrosssellings.map(variantCrossselling => ({
|
|
22
|
+
...(0, _arrayHelpers.flattenDeep)(flattenFieldSet(variantCrossselling.fieldSet))[0],
|
|
23
|
+
values: (0, _arrayHelpers.flattenDeep)(variantCrossselling.groupSet.map(g => flattenFieldSet(g.fieldSet)))
|
|
24
|
+
}));
|
|
25
|
+
};
|
|
26
|
+
exports.getFlattenedVariantCrosssellings = getFlattenedVariantCrosssellings;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FieldSet, GroupSet } from '../types';
|
|
2
|
+
export declare const flattenFieldSet: (fieldSet: FieldSet) => {
|
|
3
|
+
[key: string]: string | number | null | undefined;
|
|
4
|
+
}[][];
|
|
5
|
+
export declare const getFlattenedMaterialComposition: (materialCompositions: Array<{
|
|
6
|
+
fieldSet: FieldSet;
|
|
7
|
+
groupSet: GroupSet;
|
|
8
|
+
}>) => {}[];
|
|
9
|
+
export declare const getFlattenedVariantCrosssellings: (variantCrosssellings: Array<{
|
|
10
|
+
fieldSet: FieldSet;
|
|
11
|
+
groupSet: GroupSet;
|
|
12
|
+
}>) => {}[];
|