fast-simon-sdk 1.6.8 → 1.6.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/lib/config.d.ts +25 -25
- package/lib/config.js +30 -30
- package/lib/index.d.ts +3 -3
- package/lib/index.js +72 -72
- package/lib/index.js.map +1 -1
- package/lib/models/autocomplete.d.ts +73 -73
- package/lib/models/autocomplete.js +2 -2
- package/lib/models/common.d.ts +267 -267
- package/lib/models/common.js +65 -65
- package/lib/models/common.js.map +1 -1
- package/lib/models/content.d.ts +37 -37
- package/lib/models/content.js +2 -2
- package/lib/models/events.d.ts +113 -113
- package/lib/models/events.js +2 -2
- package/lib/models/exports.d.ts +6 -6
- package/lib/models/exports.js +5 -5
- package/lib/models/fullTextSearch.d.ts +130 -130
- package/lib/models/fullTextSearch.js +17 -17
- package/lib/models/fullTextSearch.js.map +1 -1
- package/lib/models/lookAlikeProductRecommendation.d.ts +8 -8
- package/lib/models/lookAlikeProductRecommendation.js +2 -2
- package/lib/models/productsInventory.d.ts +10 -10
- package/lib/models/productsInventory.js +2 -2
- package/lib/models/related.d.ts +35 -35
- package/lib/models/related.js +2 -2
- package/lib/models/smartCollections.d.ts +94 -94
- package/lib/models/smartCollections.js +2 -2
- package/lib/models/visualDiscovery.d.ts +129 -129
- package/lib/models/visualDiscovery.js +30 -30
- package/lib/models/visualDiscovery.js.map +1 -1
- package/lib/sections/contentSearch/index.d.ts +7 -7
- package/lib/sections/contentSearch/index.js +44 -44
- package/lib/sections/contentSearch/index.js.map +1 -1
- package/lib/sections/enums/index.d.ts +47 -47
- package/lib/sections/enums/index.js +50 -50
- package/lib/sections/eventReporter/index.d.ts +10 -10
- package/lib/sections/eventReporter/index.js +628 -628
- package/lib/sections/eventReporter/index.js.map +1 -1
- package/lib/sections/eventReporter/utils.d.ts +9 -9
- package/lib/sections/eventReporter/utils.js +31 -31
- package/lib/sections/eventReporter/utils.js.map +1 -1
- package/lib/sections/fullTextSearch/index.d.ts +6 -6
- package/lib/sections/fullTextSearch/index.js +178 -178
- package/lib/sections/fullTextSearch/index.js.map +1 -1
- package/lib/sections/fullTextSearch/utils.d.ts +17 -17
- package/lib/sections/fullTextSearch/utils.js +185 -181
- package/lib/sections/fullTextSearch/utils.js.map +1 -1
- package/lib/sections/index.d.ts +3 -3
- package/lib/sections/index.js +432 -434
- package/lib/sections/index.js.map +1 -1
- package/lib/sections/initialization/index.d.ts +8 -8
- package/lib/sections/initialization/index.js +150 -150
- package/lib/sections/initialization/index.js.map +1 -1
- package/lib/sections/initialization/utils.d.ts +11 -11
- package/lib/sections/initialization/utils.js +200 -200
- package/lib/sections/initialization/utils.js.map +1 -1
- package/lib/sections/instantSearch/index.d.ts +6 -6
- package/lib/sections/instantSearch/index.js +66 -66
- package/lib/sections/instantSearch/index.js.map +1 -1
- package/lib/sections/instantSearch/utils.d.ts +21 -21
- package/lib/sections/instantSearch/utils.js +232 -232
- package/lib/sections/instantSearch/utils.js.map +1 -1
- package/lib/sections/landingPage/index.d.ts +6 -6
- package/lib/sections/landingPage/index.js +95 -95
- package/lib/sections/landingPage/index.js.map +1 -1
- package/lib/sections/landingPage/utils.d.ts +14 -14
- package/lib/sections/landingPage/utils.js +96 -96
- package/lib/sections/landingPage/utils.js.map +1 -1
- package/lib/sections/lookAlikeProductRecommendation/index.d.ts +6 -6
- package/lib/sections/lookAlikeProductRecommendation/index.js +23 -23
- package/lib/sections/recommendations/index.d.ts +10 -10
- package/lib/sections/recommendations/index.js +95 -95
- package/lib/sections/recommendations/index.js.map +1 -1
- package/lib/sections/recommendations/utils.d.ts +6 -6
- package/lib/sections/recommendations/utils.js +82 -82
- package/lib/sections/recommendations/utils.js.map +1 -1
- package/lib/sections/smartCollections/index.d.ts +6 -6
- package/lib/sections/smartCollections/index.js +169 -169
- package/lib/sections/smartCollections/index.js.map +1 -1
- package/lib/sections/smartCollections/utils.d.ts +41 -41
- package/lib/sections/smartCollections/utils.js +286 -281
- package/lib/sections/smartCollections/utils.js.map +1 -1
- package/lib/sections/visualDiscovery/index.d.ts +22 -22
- package/lib/sections/visualDiscovery/index.js +261 -265
- package/lib/sections/visualDiscovery/index.js.map +1 -1
- package/lib/services/autocomplete.d.ts +24 -24
- package/lib/services/autocomplete.js +50 -50
- package/lib/services/common.d.ts +35 -35
- package/lib/services/common.js +94 -94
- package/lib/services/content.d.ts +4 -4
- package/lib/services/content.js +25 -25
- package/lib/services/fullTextSearch.d.ts +4 -4
- package/lib/services/fullTextSearch.js +87 -87
- package/lib/services/fullTextSearch.js.map +1 -1
- package/lib/services/landingPage.d.ts +21 -21
- package/lib/services/landingPage.js +44 -44
- package/lib/services/lookAlikeProductRecommendation.d.ts +13 -13
- package/lib/services/lookAlikeProductRecommendation.js +23 -23
- package/lib/services/related.d.ts +48 -48
- package/lib/services/related.js +114 -114
- package/lib/services/related.js.map +1 -1
- package/lib/services/reporting.d.ts +80 -80
- package/lib/services/reporting.js +258 -258
- package/lib/services/reporting.js.map +1 -1
- package/lib/services/smartCollections.d.ts +5 -5
- package/lib/services/smartCollections.js +93 -93
- package/lib/services/smartCollections.js.map +1 -1
- package/lib/services/utils.d.ts +5 -5
- package/lib/services/utils.js +25 -25
- package/lib/services/utils.js.map +1 -1
- package/lib/services/visualDiscovery.d.ts +9 -9
- package/lib/services/visualDiscovery.js +166 -170
- package/lib/services/visualDiscovery.js.map +1 -1
- package/lib/utils/ABTesting.d.ts +2 -2
- package/lib/utils/ABTesting.js +27 -28
- package/lib/utils/ABTesting.js.map +1 -1
- package/lib/utils/API.d.ts +19 -19
- package/lib/utils/API.js +81 -81
- package/lib/utils/API.js.map +1 -1
- package/lib/utils/ArrayUtils.d.ts +2 -2
- package/lib/utils/ArrayUtils.js +16 -17
- package/lib/utils/ArrayUtils.js.map +1 -1
- package/lib/utils/bindingBoxes.d.ts +23 -23
- package/lib/utils/bindingBoxes.js +88 -89
- package/lib/utils/bindingBoxes.js.map +1 -1
- package/lib/utils/cookies.d.ts +13 -13
- package/lib/utils/cookies.js +50 -50
- package/lib/utils/debug.d.ts +4 -4
- package/lib/utils/debug.js +31 -31
- package/lib/utils/debug.js.map +1 -1
- package/lib/utils/duplicationsHandler.d.ts +19 -0
- package/lib/utils/duplicationsHandler.js +70 -0
- package/lib/utils/duplicationsHandler.js.map +1 -0
- package/lib/utils/filtersPersonalization.d.ts +3 -3
- package/lib/utils/filtersPersonalization.js +39 -39
- package/lib/utils/filtersPersonalization.js.map +1 -1
- package/lib/utils/image.d.ts +6 -6
- package/lib/utils/image.js +153 -153
- package/lib/utils/image.js.map +1 -1
- package/lib/utils/klaviyo.js +1 -1
- package/lib/utils/location.d.ts +1 -1
- package/lib/utils/location.js +11 -11
- package/lib/utils/location.js.map +1 -1
- package/lib/utils/mappingUtil.d.ts +4 -4
- package/lib/utils/mappingUtil.js +16 -16
- package/lib/utils/options.d.ts +23 -23
- package/lib/utils/options.js +16 -16
- package/lib/utils/personalization.d.ts +2 -2
- package/lib/utils/personalization.js +20 -20
- package/lib/utils/personalization.js.map +1 -1
- package/lib/utils/segments.d.ts +2 -2
- package/lib/utils/segments.js +19 -20
- package/lib/utils/segments.js.map +1 -1
- package/lib/utils/shopifyMarkets.d.ts +3 -3
- package/lib/utils/shopifyMarkets.js +12 -12
- package/lib/utils/sortUtil.d.ts +1 -1
- package/lib/utils/sortUtil.js +24 -24
- package/lib/utils/sortUtil.js.map +1 -1
- package/lib/utils/updateRecentSearches.d.ts +2 -2
- package/lib/utils/updateRecentSearches.js +56 -57
- package/lib/utils/updateRecentSearches.js.map +1 -1
- package/lib/utils/validation.d.ts +5 -5
- package/lib/utils/validation.js +46 -46
- package/lib/utils/validation.js.map +1 -1
- package/package.json +3 -2
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { FacetRequired, fullTextSearchResponse, Narrow, SortBy } from "../models/fullTextSearch";
|
|
2
|
-
interface LandingPageProps {
|
|
3
|
-
slug: string;
|
|
4
|
-
storeID: number;
|
|
5
|
-
uuid: string;
|
|
6
|
-
cdn: number;
|
|
7
|
-
userToken: string;
|
|
8
|
-
sessionStart: number;
|
|
9
|
-
page?: number;
|
|
10
|
-
productsPerPage?: number;
|
|
11
|
-
sortBy?: SortBy;
|
|
12
|
-
narrowBy?: Narrow[];
|
|
13
|
-
facetRequired?: FacetRequired;
|
|
14
|
-
withAttributes?: boolean;
|
|
15
|
-
hasShopifyMarkets?: boolean;
|
|
16
|
-
companyLocationContext?: number;
|
|
17
|
-
}
|
|
18
|
-
export declare const LandingPage: {
|
|
19
|
-
getLandingPage: ({ uuid, storeID, cdn, facetRequired, narrowBy, page, productsPerPage, slug, sortBy, withAttributes, hasShopifyMarkets, companyLocationContext }: LandingPageProps) => Promise<fullTextSearchResponse>;
|
|
20
|
-
};
|
|
21
|
-
export {};
|
|
1
|
+
import { FacetRequired, fullTextSearchResponse, Narrow, SortBy } from "../models/fullTextSearch";
|
|
2
|
+
interface LandingPageProps {
|
|
3
|
+
slug: string;
|
|
4
|
+
storeID: number;
|
|
5
|
+
uuid: string;
|
|
6
|
+
cdn: number;
|
|
7
|
+
userToken: string;
|
|
8
|
+
sessionStart: number;
|
|
9
|
+
page?: number;
|
|
10
|
+
productsPerPage?: number;
|
|
11
|
+
sortBy?: SortBy;
|
|
12
|
+
narrowBy?: Narrow[];
|
|
13
|
+
facetRequired?: FacetRequired;
|
|
14
|
+
withAttributes?: boolean;
|
|
15
|
+
hasShopifyMarkets?: boolean;
|
|
16
|
+
companyLocationContext?: number;
|
|
17
|
+
}
|
|
18
|
+
export declare const LandingPage: {
|
|
19
|
+
getLandingPage: ({ uuid, storeID, cdn, facetRequired, narrowBy, page, productsPerPage, slug, sortBy, withAttributes, hasShopifyMarkets, companyLocationContext }: LandingPageProps) => Promise<fullTextSearchResponse>;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LandingPage = void 0;
|
|
4
|
-
var API_1 = require("../utils/API");
|
|
5
|
-
var debug_1 = require("../utils/debug");
|
|
6
|
-
var options_1 = require("../utils/options");
|
|
7
|
-
var utils_1 = require("../sections/initialization/utils");
|
|
8
|
-
var bigcommerce_customer_1 = require("@fast-simon/bigcommerce_customer");
|
|
9
|
-
var shopifyMarkets_1 = require("../utils/shopifyMarkets");
|
|
10
|
-
var BASE_URL = "https://api.fastsimon.com";
|
|
11
|
-
var debugVersion = (0, debug_1.getDebugEndpoint)();
|
|
12
|
-
exports.LandingPage = {
|
|
13
|
-
getLandingPage: function (_a) {
|
|
14
|
-
var uuid = _a.uuid, storeID = _a.storeID, cdn = _a.cdn, facetRequired = _a.facetRequired, narrowBy = _a.narrowBy, page = _a.page, productsPerPage = _a.productsPerPage, slug = _a.slug, sortBy = _a.sortBy, withAttributes = _a.withAttributes, hasShopifyMarkets = _a.hasShopifyMarkets, companyLocationContext = _a.companyLocationContext;
|
|
15
|
-
var platform = (0, utils_1.getPlatform)();
|
|
16
|
-
var params = {
|
|
17
|
-
UUID: uuid,
|
|
18
|
-
store_id: storeID,
|
|
19
|
-
cdn_cache_key: cdn,
|
|
20
|
-
facets_required: facetRequired,
|
|
21
|
-
lp: slug,
|
|
22
|
-
page_num: page,
|
|
23
|
-
with_product_attributes: withAttributes,
|
|
24
|
-
narrow: JSON.stringify(narrowBy),
|
|
25
|
-
products_per_page: productsPerPage,
|
|
26
|
-
sort_by: sortBy,
|
|
27
|
-
// ab_testing
|
|
28
|
-
disable_personalization: (0, options_1.getSDKABTestingOptionExist)("ab_test_disable_search_personalization"),
|
|
29
|
-
disable_merchandising: (0, options_1.getSDKABTestingOptionExist)("ab_test_disable_merchandising"),
|
|
30
|
-
disable_merchandising_rules: (0, options_1.getSDKABTestingOptionExist)("ab_test_disable_merchandising_rules"),
|
|
31
|
-
disable_strategies: (0, options_1.getSDKABTestingOptionExist)("ab_test_disable_merchandising_strategies"),
|
|
32
|
-
disable_semantics: (0, options_1.getSDKABTestingOptionExist)("ab_test_disable_semantics"),
|
|
33
|
-
// custom keys
|
|
34
|
-
reasoning: (0, options_1.getSDKABTestingOptionExist)("reasoning"),
|
|
35
|
-
customer_group_id: platform === "Bigcommerce" ? bigcommerce_customer_1.bigcommerceCustomer.getBigcommerceCustomerGroupId() : undefined,
|
|
36
|
-
market_context: hasShopifyMarkets ? shopifyMarkets_1.default.getCountry() : undefined,
|
|
37
|
-
company_location_context: companyLocationContext ? companyLocationContext : undefined
|
|
38
|
-
};
|
|
39
|
-
return API_1.API.get({
|
|
40
|
-
url: "".concat(debugVersion || BASE_URL, "/landing_page"),
|
|
41
|
-
params: params
|
|
42
|
-
});
|
|
43
|
-
},
|
|
44
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LandingPage = void 0;
|
|
4
|
+
var API_1 = require("../utils/API");
|
|
5
|
+
var debug_1 = require("../utils/debug");
|
|
6
|
+
var options_1 = require("../utils/options");
|
|
7
|
+
var utils_1 = require("../sections/initialization/utils");
|
|
8
|
+
var bigcommerce_customer_1 = require("@fast-simon/bigcommerce_customer");
|
|
9
|
+
var shopifyMarkets_1 = require("../utils/shopifyMarkets");
|
|
10
|
+
var BASE_URL = "https://api.fastsimon.com";
|
|
11
|
+
var debugVersion = (0, debug_1.getDebugEndpoint)();
|
|
12
|
+
exports.LandingPage = {
|
|
13
|
+
getLandingPage: function (_a) {
|
|
14
|
+
var uuid = _a.uuid, storeID = _a.storeID, cdn = _a.cdn, facetRequired = _a.facetRequired, narrowBy = _a.narrowBy, page = _a.page, productsPerPage = _a.productsPerPage, slug = _a.slug, sortBy = _a.sortBy, withAttributes = _a.withAttributes, hasShopifyMarkets = _a.hasShopifyMarkets, companyLocationContext = _a.companyLocationContext;
|
|
15
|
+
var platform = (0, utils_1.getPlatform)();
|
|
16
|
+
var params = {
|
|
17
|
+
UUID: uuid,
|
|
18
|
+
store_id: storeID,
|
|
19
|
+
cdn_cache_key: cdn,
|
|
20
|
+
facets_required: facetRequired,
|
|
21
|
+
lp: slug,
|
|
22
|
+
page_num: page,
|
|
23
|
+
with_product_attributes: withAttributes,
|
|
24
|
+
narrow: JSON.stringify(narrowBy),
|
|
25
|
+
products_per_page: productsPerPage,
|
|
26
|
+
sort_by: sortBy,
|
|
27
|
+
// ab_testing
|
|
28
|
+
disable_personalization: (0, options_1.getSDKABTestingOptionExist)("ab_test_disable_search_personalization"),
|
|
29
|
+
disable_merchandising: (0, options_1.getSDKABTestingOptionExist)("ab_test_disable_merchandising"),
|
|
30
|
+
disable_merchandising_rules: (0, options_1.getSDKABTestingOptionExist)("ab_test_disable_merchandising_rules"),
|
|
31
|
+
disable_strategies: (0, options_1.getSDKABTestingOptionExist)("ab_test_disable_merchandising_strategies"),
|
|
32
|
+
disable_semantics: (0, options_1.getSDKABTestingOptionExist)("ab_test_disable_semantics"),
|
|
33
|
+
// custom keys
|
|
34
|
+
reasoning: (0, options_1.getSDKABTestingOptionExist)("reasoning"),
|
|
35
|
+
customer_group_id: platform === "Bigcommerce" ? bigcommerce_customer_1.bigcommerceCustomer.getBigcommerceCustomerGroupId() : undefined,
|
|
36
|
+
market_context: hasShopifyMarkets ? shopifyMarkets_1.default.getCountry() : undefined,
|
|
37
|
+
company_location_context: companyLocationContext ? companyLocationContext : undefined
|
|
38
|
+
};
|
|
39
|
+
return API_1.API.get({
|
|
40
|
+
url: "".concat(debugVersion || BASE_URL, "/landing_page"),
|
|
41
|
+
params: params
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
45
|
//# sourceMappingURL=landingPage.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Product } from "../models/fullTextSearch";
|
|
2
|
-
interface GetLookALikeProps {
|
|
3
|
-
viewedProductId: string | number;
|
|
4
|
-
uuid: string;
|
|
5
|
-
storeID: number;
|
|
6
|
-
hasShopifyMarkets?: boolean;
|
|
7
|
-
companyLocationContext?: number;
|
|
8
|
-
}
|
|
9
|
-
export declare const debugVersion: string;
|
|
10
|
-
export declare const LookAlikeProductRecommendation: {
|
|
11
|
-
getLookALike: ({ viewedProductId, storeID, uuid, hasShopifyMarkets, companyLocationContext }: GetLookALikeProps) => Promise<Product[]>;
|
|
12
|
-
};
|
|
13
|
-
export {};
|
|
1
|
+
import { Product } from "../models/fullTextSearch";
|
|
2
|
+
interface GetLookALikeProps {
|
|
3
|
+
viewedProductId: string | number;
|
|
4
|
+
uuid: string;
|
|
5
|
+
storeID: number;
|
|
6
|
+
hasShopifyMarkets?: boolean;
|
|
7
|
+
companyLocationContext?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const debugVersion: string;
|
|
10
|
+
export declare const LookAlikeProductRecommendation: {
|
|
11
|
+
getLookALike: ({ viewedProductId, storeID, uuid, hasShopifyMarkets, companyLocationContext }: GetLookALikeProps) => Promise<Product[]>;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LookAlikeProductRecommendation = exports.debugVersion = void 0;
|
|
4
|
-
var API_1 = require("../utils/API");
|
|
5
|
-
var debug_1 = require("../utils/debug");
|
|
6
|
-
var shopifyMarkets_1 = require("../utils/shopifyMarkets");
|
|
7
|
-
var BASE_URL = "https://api.fastsimon.com";
|
|
8
|
-
exports.debugVersion = (0, debug_1.getDebugEndpoint)();
|
|
9
|
-
exports.LookAlikeProductRecommendation = {
|
|
10
|
-
getLookALike: function (_a) {
|
|
11
|
-
var viewedProductId = _a.viewedProductId, storeID = _a.storeID, uuid = _a.uuid, hasShopifyMarkets = _a.hasShopifyMarkets, companyLocationContext = _a.companyLocationContext;
|
|
12
|
-
return API_1.API.get({
|
|
13
|
-
url: "".concat(exports.debugVersion || BASE_URL, "/lookalike"),
|
|
14
|
-
params: {
|
|
15
|
-
UUID: uuid,
|
|
16
|
-
store_id: storeID,
|
|
17
|
-
product_id: parseInt(viewedProductId),
|
|
18
|
-
market_context: hasShopifyMarkets ? shopifyMarkets_1.default.getCountry() : undefined,
|
|
19
|
-
company_location_context: companyLocationContext ? companyLocationContext : undefined
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
},
|
|
23
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LookAlikeProductRecommendation = exports.debugVersion = void 0;
|
|
4
|
+
var API_1 = require("../utils/API");
|
|
5
|
+
var debug_1 = require("../utils/debug");
|
|
6
|
+
var shopifyMarkets_1 = require("../utils/shopifyMarkets");
|
|
7
|
+
var BASE_URL = "https://api.fastsimon.com";
|
|
8
|
+
exports.debugVersion = (0, debug_1.getDebugEndpoint)();
|
|
9
|
+
exports.LookAlikeProductRecommendation = {
|
|
10
|
+
getLookALike: function (_a) {
|
|
11
|
+
var viewedProductId = _a.viewedProductId, storeID = _a.storeID, uuid = _a.uuid, hasShopifyMarkets = _a.hasShopifyMarkets, companyLocationContext = _a.companyLocationContext;
|
|
12
|
+
return API_1.API.get({
|
|
13
|
+
url: "".concat(exports.debugVersion || BASE_URL, "/lookalike"),
|
|
14
|
+
params: {
|
|
15
|
+
UUID: uuid,
|
|
16
|
+
store_id: storeID,
|
|
17
|
+
product_id: parseInt(viewedProductId),
|
|
18
|
+
market_context: hasShopifyMarkets ? shopifyMarkets_1.default.getCountry() : undefined,
|
|
19
|
+
company_location_context: companyLocationContext ? companyLocationContext : undefined
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
24
|
//# sourceMappingURL=lookAlikeProductRecommendation.js.map
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { RelatedResponse, Specs, SRC_TYPES } from "../models/related";
|
|
2
|
-
export declare const debugVersion: string;
|
|
3
|
-
export declare const Related: {
|
|
4
|
-
getProducts: ({ storeID, uuid, productID, recent, specs, cartToken, withAttributes, src, hasShopifyMarkets, companyLocationContext, isPersonalizedFiltersActive, userToken }: {
|
|
5
|
-
productID: string;
|
|
6
|
-
storeID: number;
|
|
7
|
-
uuid: string;
|
|
8
|
-
recent: string[];
|
|
9
|
-
specs: Specs[];
|
|
10
|
-
cartToken: string;
|
|
11
|
-
withAttributes?: boolean
|
|
12
|
-
src?: SRC_TYPES
|
|
13
|
-
hasShopifyMarkets?: boolean
|
|
14
|
-
companyLocationContext?: number
|
|
15
|
-
isPersonalizedFiltersActive?: boolean
|
|
16
|
-
userToken?: string
|
|
17
|
-
}) => Promise<RelatedResponse>;
|
|
18
|
-
getRecentlyViewed: ({ recent, uuid, storeID, categoryID, cartToken, hasShopifyMarkets, companyLocationContext, isPersonalizedFiltersActive, userToken }: {
|
|
19
|
-
storeID: number;
|
|
20
|
-
uuid: string;
|
|
21
|
-
recent: string[];
|
|
22
|
-
categoryID?: string
|
|
23
|
-
cartToken: string;
|
|
24
|
-
hasShopifyMarkets?: boolean
|
|
25
|
-
companyLocationContext?: number
|
|
26
|
-
isPersonalizedFiltersActive?: boolean
|
|
27
|
-
userToken?: string
|
|
28
|
-
}) => Promise<RelatedResponse>;
|
|
29
|
-
getWidgetProducts: ({ storeID, uuid, productID, recent, widgetsIDS, cartToken, withAttributes, src, hasShopifyMarkets, companyLocationContext, isPersonalizedFiltersActive, userToken, abTestingVariations }: {
|
|
30
|
-
productID: string;
|
|
31
|
-
storeID: number;
|
|
32
|
-
uuid: string;
|
|
33
|
-
recent: string[];
|
|
34
|
-
widgetsIDS: string[];
|
|
35
|
-
cartToken: string;
|
|
36
|
-
withAttributes?: boolean
|
|
37
|
-
src?: SRC_TYPES
|
|
38
|
-
hasShopifyMarkets?: boolean
|
|
39
|
-
companyLocationContext?: number
|
|
40
|
-
isPersonalizedFiltersActive?: boolean
|
|
41
|
-
userToken?: string
|
|
42
|
-
abTestingVariations?: {
|
|
43
|
-
[key: string]: {
|
|
44
|
-
[key: string]: object;
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
}) => Promise<unknown>;
|
|
48
|
-
};
|
|
1
|
+
import { RelatedResponse, Specs, SRC_TYPES } from "../models/related";
|
|
2
|
+
export declare const debugVersion: string;
|
|
3
|
+
export declare const Related: {
|
|
4
|
+
getProducts: ({ storeID, uuid, productID, recent, specs, cartToken, withAttributes, src, hasShopifyMarkets, companyLocationContext, isPersonalizedFiltersActive, userToken }: {
|
|
5
|
+
productID: string;
|
|
6
|
+
storeID: number;
|
|
7
|
+
uuid: string;
|
|
8
|
+
recent: string[];
|
|
9
|
+
specs: Specs[];
|
|
10
|
+
cartToken: string;
|
|
11
|
+
withAttributes?: boolean;
|
|
12
|
+
src?: SRC_TYPES;
|
|
13
|
+
hasShopifyMarkets?: boolean;
|
|
14
|
+
companyLocationContext?: number;
|
|
15
|
+
isPersonalizedFiltersActive?: boolean;
|
|
16
|
+
userToken?: string;
|
|
17
|
+
}) => Promise<RelatedResponse>;
|
|
18
|
+
getRecentlyViewed: ({ recent, uuid, storeID, categoryID, cartToken, hasShopifyMarkets, companyLocationContext, isPersonalizedFiltersActive, userToken }: {
|
|
19
|
+
storeID: number;
|
|
20
|
+
uuid: string;
|
|
21
|
+
recent: string[];
|
|
22
|
+
categoryID?: string;
|
|
23
|
+
cartToken: string;
|
|
24
|
+
hasShopifyMarkets?: boolean;
|
|
25
|
+
companyLocationContext?: number;
|
|
26
|
+
isPersonalizedFiltersActive?: boolean;
|
|
27
|
+
userToken?: string;
|
|
28
|
+
}) => Promise<RelatedResponse>;
|
|
29
|
+
getWidgetProducts: ({ storeID, uuid, productID, recent, widgetsIDS, cartToken, withAttributes, src, hasShopifyMarkets, companyLocationContext, isPersonalizedFiltersActive, userToken, abTestingVariations }: {
|
|
30
|
+
productID: string;
|
|
31
|
+
storeID: number;
|
|
32
|
+
uuid: string;
|
|
33
|
+
recent: string[];
|
|
34
|
+
widgetsIDS: string[];
|
|
35
|
+
cartToken: string;
|
|
36
|
+
withAttributes?: boolean;
|
|
37
|
+
src?: SRC_TYPES;
|
|
38
|
+
hasShopifyMarkets?: boolean;
|
|
39
|
+
companyLocationContext?: number;
|
|
40
|
+
isPersonalizedFiltersActive?: boolean;
|
|
41
|
+
userToken?: string;
|
|
42
|
+
abTestingVariations?: {
|
|
43
|
+
[key: string]: {
|
|
44
|
+
[key: string]: object;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
}) => Promise<unknown>;
|
|
48
|
+
};
|
package/lib/services/related.js
CHANGED
|
@@ -1,115 +1,115 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Related = exports.debugVersion = void 0;
|
|
4
|
-
var API_1 = require("../utils/API");
|
|
5
|
-
var config_1 = require("../config");
|
|
6
|
-
var debug_1 = require("../utils/debug");
|
|
7
|
-
var options_1 = require("../utils/options");
|
|
8
|
-
var shopifyMarkets_1 = require("../utils/shopifyMarkets");
|
|
9
|
-
var filtersPersonalization_1 = require("../utils/filtersPersonalization");
|
|
10
|
-
var ABTesting_1 = require("../utils/ABTesting");
|
|
11
|
-
var BASE_URL = "https://api.fastsimon.com";
|
|
12
|
-
exports.debugVersion = (0, debug_1.getDebugEndpoint)();
|
|
13
|
-
exports.Related = {
|
|
14
|
-
getProducts: function (_a) {
|
|
15
|
-
var storeID = _a.storeID, uuid = _a.uuid, productID = _a.productID, _b = _a.recent, recent = _b === void 0 ? [] : _b, _c = _a.specs, specs = _c === void 0 ? [] : _c, cartToken = _a.cartToken, withAttributes = _a.withAttributes, src = _a.src, hasShopifyMarkets = _a.hasShopifyMarkets, companyLocationContext = _a.companyLocationContext, isPersonalizedFiltersActive = _a.isPersonalizedFiltersActive, userToken = _a.userToken;
|
|
16
|
-
var st = userToken || localStorage.getItem(config_1.USER_SESSION_TOKEN_LS_KEY) || localStorage.getItem('isp_token_1') || undefined;
|
|
17
|
-
var filtersPersonalization = (0, filtersPersonalization_1.isFiltersPersonalization)(false, isPersonalizedFiltersActive);
|
|
18
|
-
return API_1.API.get({
|
|
19
|
-
url: "".concat(exports.debugVersion || BASE_URL, "/related_products_suggest"),
|
|
20
|
-
params: {
|
|
21
|
-
src: src !== null && src !== void 0 ? src : "JSSDK",
|
|
22
|
-
product_id: productID,
|
|
23
|
-
UUID: uuid,
|
|
24
|
-
store_id: storeID,
|
|
25
|
-
products: JSON.stringify(recent),
|
|
26
|
-
specs: JSON.stringify(serializeSpecs(specs)),
|
|
27
|
-
cart_token: cartToken,
|
|
28
|
-
// ab_testing
|
|
29
|
-
disable_personalization: (0, options_1.getSDKABTestingOptionExist)("ab_test_disable_recommendations_personalization"),
|
|
30
|
-
with_product_attributes: withAttributes,
|
|
31
|
-
market_context: hasShopifyMarkets ? shopifyMarkets_1.default.getCountry() : undefined,
|
|
32
|
-
company_location_context: companyLocationContext ? companyLocationContext : undefined,
|
|
33
|
-
st: (st && filtersPersonalization) ? st : undefined
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
},
|
|
37
|
-
getRecentlyViewed: function (_a) {
|
|
38
|
-
var _b = _a.recent, recent = _b === void 0 ? [] : _b, uuid = _a.uuid, storeID = _a.storeID, categoryID = _a.categoryID, cartToken = _a.cartToken, hasShopifyMarkets = _a.hasShopifyMarkets, companyLocationContext = _a.companyLocationContext, isPersonalizedFiltersActive = _a.isPersonalizedFiltersActive, userToken = _a.userToken;
|
|
39
|
-
var st = userToken || localStorage.getItem(config_1.USER_SESSION_TOKEN_LS_KEY) || localStorage.getItem('isp_token_1') || undefined;
|
|
40
|
-
var filtersPersonalization = (0, filtersPersonalization_1.isFiltersPersonalization)(false, isPersonalizedFiltersActive);
|
|
41
|
-
return API_1.API.get({
|
|
42
|
-
url: "".concat(exports.debugVersion || BASE_URL, "/related_products_suggest"),
|
|
43
|
-
params: {
|
|
44
|
-
UUID: uuid,
|
|
45
|
-
store_id: storeID,
|
|
46
|
-
products: JSON.stringify(recent),
|
|
47
|
-
specs: JSON.stringify([
|
|
48
|
-
{
|
|
49
|
-
sources: "related_recently_viewed",
|
|
50
|
-
max_suggest: config_1.MAX_RECENT_COLLECTION_PRODUCTS,
|
|
51
|
-
widget_id: "isp-recently-viewed",
|
|
52
|
-
categories: categoryID,
|
|
53
|
-
personalization: true,
|
|
54
|
-
}
|
|
55
|
-
]),
|
|
56
|
-
cart_token: cartToken,
|
|
57
|
-
market_context: hasShopifyMarkets ? shopifyMarkets_1.default.getCountry() : undefined,
|
|
58
|
-
company_location_context: companyLocationContext ? companyLocationContext : undefined,
|
|
59
|
-
st: (st && filtersPersonalization) ? st : undefined
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
},
|
|
63
|
-
getWidgetProducts: function (_a) {
|
|
64
|
-
var storeID = _a.storeID, uuid = _a.uuid, productID = _a.productID, _b = _a.recent, recent = _b === void 0 ? [] : _b, _c = _a.widgetsIDS, widgetsIDS = _c === void 0 ? [] : _c, cartToken = _a.cartToken, withAttributes = _a.withAttributes, src = _a.src, hasShopifyMarkets = _a.hasShopifyMarkets, companyLocationContext = _a.companyLocationContext, isPersonalizedFiltersActive = _a.isPersonalizedFiltersActive, userToken = _a.userToken, abTestingVariations = _a.abTestingVariations;
|
|
65
|
-
var st = userToken || localStorage.getItem(config_1.USER_SESSION_TOKEN_LS_KEY) || localStorage.getItem("isp_token_1") || undefined;
|
|
66
|
-
var filtersPersonalization = (0, filtersPersonalization_1.isFiltersPersonalization)(false, isPersonalizedFiltersActive);
|
|
67
|
-
var variant_id = (0, ABTesting_1.getUserVariation)();
|
|
68
|
-
var formatedWidgetsIDS = widgetsIDS;
|
|
69
|
-
var ABTestFlag = false;
|
|
70
|
-
if (variant_id && (abTestingVariations === null || abTestingVariations === void 0 ? void 0 : abTestingVariations[variant_id]) && (abTestingVariations === null || abTestingVariations === void 0 ? void 0 : abTestingVariations[variant_id]["recommendation_widgets"])) {
|
|
71
|
-
var recommendationWidgets_1 = abTestingVariations === null || abTestingVariations === void 0 ? void 0 : abTestingVariations[variant_id]["recommendation_widgets"];
|
|
72
|
-
widgetsIDS.forEach(function (widgetid, index) {
|
|
73
|
-
if (recommendationWidgets_1[widgetid]) {
|
|
74
|
-
var mappedTo = recommendationWidgets_1[widgetid];
|
|
75
|
-
formatedWidgetsIDS[index] = mappedTo;
|
|
76
|
-
ABTestFlag = true;
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
if (ABTestFlag) {
|
|
81
|
-
console.log("%cAB Testing taking affect on the upsell & cross-sell widgets", 'font-weight: bold; font-size: 12px; color: darkgreen');
|
|
82
|
-
}
|
|
83
|
-
if (!(widgetsIDS === null || widgetsIDS === void 0 ? void 0 : widgetsIDS.length)) {
|
|
84
|
-
console.log("%c\u274C IS+ SDK Error | Widget Ids Has Not Been Provided", 'font-weight: bold; font-size: 12px; color: red');
|
|
85
|
-
return new Promise(function (resolve) { return (resolve(null)); });
|
|
86
|
-
}
|
|
87
|
-
return API_1.API.get({
|
|
88
|
-
url: "".concat(exports.debugVersion || BASE_URL, "/upsell_cross_sell_recommendation"),
|
|
89
|
-
params: {
|
|
90
|
-
request_source: src !== null && src !== void 0 ? src : "JSSDK",
|
|
91
|
-
cart_token: cartToken,
|
|
92
|
-
widgets_ids: JSON.stringify(formatedWidgetsIDS),
|
|
93
|
-
product_id: productID ? productID : undefined,
|
|
94
|
-
products: JSON.stringify(recent),
|
|
95
|
-
UUID: uuid,
|
|
96
|
-
store_id: storeID,
|
|
97
|
-
market_context: hasShopifyMarkets ? shopifyMarkets_1.default.getCountry() : undefined,
|
|
98
|
-
with_product_attributes: withAttributes,
|
|
99
|
-
company_location_context: companyLocationContext ? companyLocationContext : undefined,
|
|
100
|
-
st: (st && filtersPersonalization) ? st : undefined
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
var serializeSpecs = function (specs) { return specs.map(function (spec) {
|
|
106
|
-
var _a, _b;
|
|
107
|
-
return ({
|
|
108
|
-
sources: spec.sources.join ? spec.sources.join(",") : spec.sources,
|
|
109
|
-
max_suggest: String(spec.maxSuggestions),
|
|
110
|
-
categories: ((_b = (_a = spec.collectionIDs) !== null && _a !== void 0 ? _a : spec.categoriesIDs) !== null && _b !== void 0 ? _b : []).join(","),
|
|
111
|
-
widget_id: spec.widgetID,
|
|
112
|
-
title: ""
|
|
113
|
-
});
|
|
114
|
-
}); };
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Related = exports.debugVersion = void 0;
|
|
4
|
+
var API_1 = require("../utils/API");
|
|
5
|
+
var config_1 = require("../config");
|
|
6
|
+
var debug_1 = require("../utils/debug");
|
|
7
|
+
var options_1 = require("../utils/options");
|
|
8
|
+
var shopifyMarkets_1 = require("../utils/shopifyMarkets");
|
|
9
|
+
var filtersPersonalization_1 = require("../utils/filtersPersonalization");
|
|
10
|
+
var ABTesting_1 = require("../utils/ABTesting");
|
|
11
|
+
var BASE_URL = "https://api.fastsimon.com";
|
|
12
|
+
exports.debugVersion = (0, debug_1.getDebugEndpoint)();
|
|
13
|
+
exports.Related = {
|
|
14
|
+
getProducts: function (_a) {
|
|
15
|
+
var storeID = _a.storeID, uuid = _a.uuid, productID = _a.productID, _b = _a.recent, recent = _b === void 0 ? [] : _b, _c = _a.specs, specs = _c === void 0 ? [] : _c, cartToken = _a.cartToken, withAttributes = _a.withAttributes, src = _a.src, hasShopifyMarkets = _a.hasShopifyMarkets, companyLocationContext = _a.companyLocationContext, isPersonalizedFiltersActive = _a.isPersonalizedFiltersActive, userToken = _a.userToken;
|
|
16
|
+
var st = userToken || localStorage.getItem(config_1.USER_SESSION_TOKEN_LS_KEY) || localStorage.getItem('isp_token_1') || undefined;
|
|
17
|
+
var filtersPersonalization = (0, filtersPersonalization_1.isFiltersPersonalization)(false, isPersonalizedFiltersActive);
|
|
18
|
+
return API_1.API.get({
|
|
19
|
+
url: "".concat(exports.debugVersion || BASE_URL, "/related_products_suggest"),
|
|
20
|
+
params: {
|
|
21
|
+
src: src !== null && src !== void 0 ? src : "JSSDK",
|
|
22
|
+
product_id: productID,
|
|
23
|
+
UUID: uuid,
|
|
24
|
+
store_id: storeID,
|
|
25
|
+
products: JSON.stringify(recent),
|
|
26
|
+
specs: JSON.stringify(serializeSpecs(specs)),
|
|
27
|
+
cart_token: cartToken,
|
|
28
|
+
// ab_testing
|
|
29
|
+
disable_personalization: (0, options_1.getSDKABTestingOptionExist)("ab_test_disable_recommendations_personalization"),
|
|
30
|
+
with_product_attributes: withAttributes,
|
|
31
|
+
market_context: hasShopifyMarkets ? shopifyMarkets_1.default.getCountry() : undefined,
|
|
32
|
+
company_location_context: companyLocationContext ? companyLocationContext : undefined,
|
|
33
|
+
st: (st && filtersPersonalization) ? st : undefined
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
getRecentlyViewed: function (_a) {
|
|
38
|
+
var _b = _a.recent, recent = _b === void 0 ? [] : _b, uuid = _a.uuid, storeID = _a.storeID, categoryID = _a.categoryID, cartToken = _a.cartToken, hasShopifyMarkets = _a.hasShopifyMarkets, companyLocationContext = _a.companyLocationContext, isPersonalizedFiltersActive = _a.isPersonalizedFiltersActive, userToken = _a.userToken;
|
|
39
|
+
var st = userToken || localStorage.getItem(config_1.USER_SESSION_TOKEN_LS_KEY) || localStorage.getItem('isp_token_1') || undefined;
|
|
40
|
+
var filtersPersonalization = (0, filtersPersonalization_1.isFiltersPersonalization)(false, isPersonalizedFiltersActive);
|
|
41
|
+
return API_1.API.get({
|
|
42
|
+
url: "".concat(exports.debugVersion || BASE_URL, "/related_products_suggest"),
|
|
43
|
+
params: {
|
|
44
|
+
UUID: uuid,
|
|
45
|
+
store_id: storeID,
|
|
46
|
+
products: JSON.stringify(recent),
|
|
47
|
+
specs: JSON.stringify([
|
|
48
|
+
{
|
|
49
|
+
sources: "related_recently_viewed",
|
|
50
|
+
max_suggest: config_1.MAX_RECENT_COLLECTION_PRODUCTS,
|
|
51
|
+
widget_id: "isp-recently-viewed",
|
|
52
|
+
categories: categoryID,
|
|
53
|
+
personalization: true,
|
|
54
|
+
}
|
|
55
|
+
]),
|
|
56
|
+
cart_token: cartToken,
|
|
57
|
+
market_context: hasShopifyMarkets ? shopifyMarkets_1.default.getCountry() : undefined,
|
|
58
|
+
company_location_context: companyLocationContext ? companyLocationContext : undefined,
|
|
59
|
+
st: (st && filtersPersonalization) ? st : undefined
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
},
|
|
63
|
+
getWidgetProducts: function (_a) {
|
|
64
|
+
var storeID = _a.storeID, uuid = _a.uuid, productID = _a.productID, _b = _a.recent, recent = _b === void 0 ? [] : _b, _c = _a.widgetsIDS, widgetsIDS = _c === void 0 ? [] : _c, cartToken = _a.cartToken, withAttributes = _a.withAttributes, src = _a.src, hasShopifyMarkets = _a.hasShopifyMarkets, companyLocationContext = _a.companyLocationContext, isPersonalizedFiltersActive = _a.isPersonalizedFiltersActive, userToken = _a.userToken, abTestingVariations = _a.abTestingVariations;
|
|
65
|
+
var st = userToken || localStorage.getItem(config_1.USER_SESSION_TOKEN_LS_KEY) || localStorage.getItem("isp_token_1") || undefined;
|
|
66
|
+
var filtersPersonalization = (0, filtersPersonalization_1.isFiltersPersonalization)(false, isPersonalizedFiltersActive);
|
|
67
|
+
var variant_id = (0, ABTesting_1.getUserVariation)();
|
|
68
|
+
var formatedWidgetsIDS = widgetsIDS;
|
|
69
|
+
var ABTestFlag = false;
|
|
70
|
+
if (variant_id && (abTestingVariations === null || abTestingVariations === void 0 ? void 0 : abTestingVariations[variant_id]) && (abTestingVariations === null || abTestingVariations === void 0 ? void 0 : abTestingVariations[variant_id]["recommendation_widgets"])) {
|
|
71
|
+
var recommendationWidgets_1 = abTestingVariations === null || abTestingVariations === void 0 ? void 0 : abTestingVariations[variant_id]["recommendation_widgets"];
|
|
72
|
+
widgetsIDS.forEach(function (widgetid, index) {
|
|
73
|
+
if (recommendationWidgets_1[widgetid]) {
|
|
74
|
+
var mappedTo = recommendationWidgets_1[widgetid];
|
|
75
|
+
formatedWidgetsIDS[index] = mappedTo;
|
|
76
|
+
ABTestFlag = true;
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
if (ABTestFlag) {
|
|
81
|
+
console.log("%cAB Testing taking affect on the upsell & cross-sell widgets", 'font-weight: bold; font-size: 12px; color: darkgreen');
|
|
82
|
+
}
|
|
83
|
+
if (!(widgetsIDS === null || widgetsIDS === void 0 ? void 0 : widgetsIDS.length)) {
|
|
84
|
+
console.log("%c\u274C IS+ SDK Error | Widget Ids Has Not Been Provided", 'font-weight: bold; font-size: 12px; color: red');
|
|
85
|
+
return new Promise(function (resolve) { return (resolve(null)); });
|
|
86
|
+
}
|
|
87
|
+
return API_1.API.get({
|
|
88
|
+
url: "".concat(exports.debugVersion || BASE_URL, "/upsell_cross_sell_recommendation"),
|
|
89
|
+
params: {
|
|
90
|
+
request_source: src !== null && src !== void 0 ? src : "JSSDK",
|
|
91
|
+
cart_token: cartToken,
|
|
92
|
+
widgets_ids: JSON.stringify(formatedWidgetsIDS),
|
|
93
|
+
product_id: productID ? productID : undefined,
|
|
94
|
+
products: JSON.stringify(recent),
|
|
95
|
+
UUID: uuid,
|
|
96
|
+
store_id: storeID,
|
|
97
|
+
market_context: hasShopifyMarkets ? shopifyMarkets_1.default.getCountry() : undefined,
|
|
98
|
+
with_product_attributes: withAttributes,
|
|
99
|
+
company_location_context: companyLocationContext ? companyLocationContext : undefined,
|
|
100
|
+
st: (st && filtersPersonalization) ? st : undefined
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
var serializeSpecs = function (specs) { return specs.map(function (spec) {
|
|
106
|
+
var _a, _b;
|
|
107
|
+
return ({
|
|
108
|
+
sources: spec.sources.join ? spec.sources.join(",") : spec.sources,
|
|
109
|
+
max_suggest: String(spec.maxSuggestions),
|
|
110
|
+
categories: ((_b = (_a = spec.collectionIDs) !== null && _a !== void 0 ? _a : spec.categoriesIDs) !== null && _b !== void 0 ? _b : []).join(","),
|
|
111
|
+
widget_id: spec.widgetID,
|
|
112
|
+
title: ""
|
|
113
|
+
});
|
|
114
|
+
}); };
|
|
115
115
|
//# sourceMappingURL=related.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"related.js","sourceRoot":"","sources":["../../src/services/related.ts"],"names":[],"mappings":";;;AAAA,oCAAiC;AAEjC,oCAAoF;AACpF,wCAAgD;AAChD,4CAA4D;AAC5D,0DAAqD;AACrD,0EAAyE;AACzE,gDAAoD;AAEpD,IAAM,QAAQ,GAAG,2BAA2B,CAAC;AAEhC,QAAA,YAAY,GAAG,IAAA,wBAAgB,GAAE,CAAC;AAElC,QAAA,OAAO,GAAG;IACnB,WAAW,EAAE,UAAC,EAa+Q;YAZ3Q,OAAO,aAAA,EACP,IAAI,UAAA,EACJ,SAAS,eAAA,EACT,cAAW,EAAX,MAAM,mBAAG,EAAE,KAAA,EACX,aAAU,EAAV,KAAK,mBAAG,EAAE,KAAA,EACV,SAAS,eAAA,EACT,cAAc,oBAAA,EACd,GAAG,SAAA,EACH,iBAAiB,uBAAA,EACjB,sBAAsB,4BAAA,EACtB,2BAA2B,iCAAA,EAC3B,SAAS,eAAA;QAGvB,IAAM,EAAE,GAAG,SAAS,IAAI,YAAY,CAAC,OAAO,CAAC,kCAAyB,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,SAAS,CAAC;QAC5H,IAAM,sBAAsB,GAAG,IAAA,iDAAwB,EAAC,KAAK,EAAE,2BAA2B,CAAC,CAAC;QAE5F,OAAO,SAAG,CAAC,GAAG,CAAkB;YAC5B,GAAG,EAAE,UAAG,oBAAY,IAAI,QAAQ,8BAA2B;YAC3D,MAAM,EAAE;gBACJ,GAAG,EAAE,GAAG,aAAH,GAAG,cAAH,GAAG,GAAI,OAAO;gBACnB,UAAU,EAAE,SAAS;gBACrB,IAAI,EAAE,IAAI;gBACV,QAAQ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