fast-simon-sdk 1.3.4 → 1.3.6
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/index.js +5 -1
- package/lib/index.js.map +1 -1
- package/lib/models/autocomplete.d.ts +2 -2
- package/lib/models/common.d.ts +8 -7
- package/lib/models/common.js.map +1 -1
- package/lib/models/content.d.ts +5 -5
- package/lib/models/events.d.ts +1 -1
- package/lib/models/fullTextSearch.d.ts +24 -17
- package/lib/models/fullTextSearch.js.map +1 -1
- package/lib/models/lookAlikeProductRecommendation.d.ts +1 -1
- package/lib/models/productsInventory.d.ts +1 -1
- package/lib/models/related.d.ts +3 -3
- package/lib/models/smartCollections.d.ts +11 -3
- package/lib/sections/contentSearch/index.js +4 -2
- package/lib/sections/contentSearch/index.js.map +1 -1
- package/lib/sections/eventReporter/index.js +49 -34
- package/lib/sections/eventReporter/index.js.map +1 -1
- package/lib/sections/eventReporter/utils.js +1 -1
- package/lib/sections/eventReporter/utils.js.map +1 -1
- package/lib/sections/fullTextSearch/index.js +30 -20
- package/lib/sections/fullTextSearch/index.js.map +1 -1
- package/lib/sections/fullTextSearch/utils.d.ts +1 -1
- package/lib/sections/fullTextSearch/utils.js +39 -10
- package/lib/sections/fullTextSearch/utils.js.map +1 -1
- package/lib/sections/index.js +44 -42
- package/lib/sections/index.js.map +1 -1
- package/lib/sections/initialization/index.js +66 -27
- package/lib/sections/initialization/index.js.map +1 -1
- package/lib/sections/initialization/utils.d.ts +1 -1
- package/lib/sections/initialization/utils.js +10 -10
- package/lib/sections/initialization/utils.js.map +1 -1
- package/lib/sections/instantSearch/index.js +15 -11
- package/lib/sections/instantSearch/index.js.map +1 -1
- package/lib/sections/instantSearch/utils.js +18 -14
- package/lib/sections/instantSearch/utils.js.map +1 -1
- package/lib/sections/landingPage/index.js +28 -15
- package/lib/sections/landingPage/index.js.map +1 -1
- package/lib/sections/landingPage/utils.js +10 -6
- package/lib/sections/landingPage/utils.js.map +1 -1
- package/lib/sections/lookAlikeProductRecommendation/index.js +5 -2
- package/lib/sections/lookAlikeProductRecommendation/index.js.map +1 -1
- package/lib/sections/recommendations/index.js +8 -6
- package/lib/sections/recommendations/index.js.map +1 -1
- package/lib/sections/smartCollections/index.js +40 -25
- package/lib/sections/smartCollections/index.js.map +1 -1
- package/lib/sections/smartCollections/utils.d.ts +1 -1
- package/lib/sections/smartCollections/utils.js +35 -10
- package/lib/sections/smartCollections/utils.js.map +1 -1
- package/lib/services/autocomplete.d.ts +2 -1
- package/lib/services/autocomplete.js +8 -7
- package/lib/services/autocomplete.js.map +1 -1
- package/lib/services/common.d.ts +2 -1
- package/lib/services/common.js +16 -15
- package/lib/services/common.js.map +1 -1
- package/lib/services/content.js +2 -2
- package/lib/services/content.js.map +1 -1
- package/lib/services/fullTextSearch.js +21 -21
- package/lib/services/fullTextSearch.js.map +1 -1
- package/lib/services/landingPage.d.ts +3 -1
- package/lib/services/landingPage.js +14 -11
- package/lib/services/landingPage.js.map +1 -1
- package/lib/services/lookAlikeProductRecommendation.d.ts +2 -1
- package/lib/services/lookAlikeProductRecommendation.js +5 -4
- package/lib/services/lookAlikeProductRecommendation.js.map +1 -1
- package/lib/services/related.d.ts +5 -2
- package/lib/services/related.js +11 -8
- package/lib/services/related.js.map +1 -1
- package/lib/services/reporting.d.ts +1 -1
- package/lib/services/reporting.js +6 -6
- package/lib/services/reporting.js.map +1 -1
- package/lib/services/smartCollections.js +19 -19
- package/lib/services/smartCollections.js.map +1 -1
- package/lib/services/utils.d.ts +2 -2
- package/lib/utils/API.js +1 -1
- package/lib/utils/cookies.js +1 -1
- package/lib/utils/cookies.js.map +1 -1
- package/lib/utils/debug.d.ts +1 -1
- package/lib/utils/debug.js +1 -1
- package/lib/utils/debug.js.map +1 -1
- package/lib/utils/shopifyMarkets.js +2 -2
- package/lib/utils/shopifyMarkets.js.map +1 -1
- package/lib/utils/validation.js +2 -2
- package/lib/utils/validation.js.map +1 -1
- package/package.json +6 -6
- package/lib/services/getPricesByMarket.d.ts +0 -36
package/lib/utils/validation.js
CHANGED
|
@@ -14,7 +14,7 @@ var validateParams = function (validators, props) {
|
|
|
14
14
|
for (var _i = 0, validators_1 = validators; _i < validators_1.length; _i++) {
|
|
15
15
|
var v = validators_1[_i];
|
|
16
16
|
if (!(v in props)) {
|
|
17
|
-
console.log("%c\u274C IS+ SDK Error | param: "
|
|
17
|
+
console.log("%c\u274C IS+ SDK Error | param: ".concat(v, " missing"), 'font-weight: bold; font-size: 12px; color: red');
|
|
18
18
|
return false;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -23,7 +23,7 @@ var validateParams = function (validators, props) {
|
|
|
23
23
|
exports.validateParams = validateParams;
|
|
24
24
|
var isValidAPIUser = function (sdkUtils) {
|
|
25
25
|
if (!sdkUtils.data.dashboard.using_isp_api) {
|
|
26
|
-
console.log("%c"
|
|
26
|
+
console.log("%c".concat(config_1.API_ERROR_MSG), 'font-weight: bold; font-size: 12px; color: red');
|
|
27
27
|
return false;
|
|
28
28
|
}
|
|
29
29
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/utils/validation.ts"],"names":[],"mappings":";;;AACA,oCAAwC;AAEjC,IAAM,YAAY,GAAG,UAAC,IAAY;IACrC,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;QAC9B,OAAO,IAAI,CAAC;KACf;IACD,OAAO,CAAC,GAAG,CAAC,uCAAkC,EAAE,gDAAgD,CAAC,CAAC;IAClG,OAAO,KAAK,CAAC;AACjB,CAAC,CAAC;AANW,QAAA,YAAY,gBAMvB;AAEK,IAAM,cAAc,GAAG,UAAC,UAAoB,EAAE,KAAa;IAC9D,KAAgB,UAAU,EAAV,yBAAU,EAAV,wBAAU,EAAV,IAAU,EAAE;QAAvB,IAAM,CAAC,mBAAA;QACR,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,EAAE;YACf,OAAO,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/utils/validation.ts"],"names":[],"mappings":";;;AACA,oCAAwC;AAEjC,IAAM,YAAY,GAAG,UAAC,IAAY;IACrC,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;QAC9B,OAAO,IAAI,CAAC;KACf;IACD,OAAO,CAAC,GAAG,CAAC,uCAAkC,EAAE,gDAAgD,CAAC,CAAC;IAClG,OAAO,KAAK,CAAC;AACjB,CAAC,CAAC;AANW,QAAA,YAAY,gBAMvB;AAEK,IAAM,cAAc,GAAG,UAAC,UAAoB,EAAE,KAAa;IAC9D,KAAgB,UAAU,EAAV,yBAAU,EAAV,wBAAU,EAAV,IAAU,EAAE;QAAvB,IAAM,CAAC,mBAAA;QACR,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,EAAE;YACf,OAAO,CAAC,GAAG,CAAC,0CAA8B,CAAC,aAAU,EAAE,gDAAgD,CAAC,CAAC;YACzG,OAAO,KAAK,CAAC;SAChB;KACJ;IACD,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC;AARW,QAAA,cAAc,kBAQzB;AAEK,IAAM,cAAc,GAAG,UAAC,QAAkB;IAC7C,IAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,EAAC;QACtC,OAAO,CAAC,GAAG,CAAC,YAAK,sBAAa,CAAE,EAAE,gDAAgD,CAAC,CAAC;QACpF,OAAO,KAAK,CAAC;KAChB;IACD,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC;AANW,QAAA,cAAc,kBAMzB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fast-simon-sdk",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.6",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Fast Simon inc",
|
|
6
6
|
"url": "",
|
|
@@ -26,15 +26,15 @@
|
|
|
26
26
|
"ts-loader": "^8.0.17",
|
|
27
27
|
"typescript": "^4.2.2",
|
|
28
28
|
"unminified-webpack-plugin": "^3.0.0",
|
|
29
|
-
"webpack": "^5.
|
|
30
|
-
"webpack-cli": "^4.
|
|
29
|
+
"webpack": "^5.92.0",
|
|
30
|
+
"webpack-cli": "^4.10.0"
|
|
31
31
|
},
|
|
32
32
|
"files": [
|
|
33
33
|
"lib/**/*"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@fast-simon/
|
|
37
|
-
"
|
|
38
|
-
"
|
|
36
|
+
"@fast-simon/bigcommerce_customer": "1.0.44",
|
|
37
|
+
"@fast-simon/utilities": "^1.0.41",
|
|
38
|
+
"axios": "^0.21.1"
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export interface GraphQLResponse {
|
|
2
|
-
data: {
|
|
3
|
-
nodes: ProductNode[];
|
|
4
|
-
};
|
|
5
|
-
}
|
|
6
|
-
export interface ProductNode {
|
|
7
|
-
id: string;
|
|
8
|
-
variants: {
|
|
9
|
-
edges: VariantEdge[];
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export interface VariantEdge {
|
|
13
|
-
node: VariantNode;
|
|
14
|
-
}
|
|
15
|
-
export interface VariantNode {
|
|
16
|
-
id: string;
|
|
17
|
-
price: {
|
|
18
|
-
amount: string;
|
|
19
|
-
currencyCode: string;
|
|
20
|
-
};
|
|
21
|
-
compareAtPrice: {
|
|
22
|
-
amount: string;
|
|
23
|
-
currencyCode: string;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
interface Product {
|
|
27
|
-
id: string;
|
|
28
|
-
p_spl_id?: string;
|
|
29
|
-
[key: string]: any;
|
|
30
|
-
}
|
|
31
|
-
export default function getPricesByMarket(products: Product[], access_token: string): Promise<Record<string, {
|
|
32
|
-
price: string;
|
|
33
|
-
currency: string;
|
|
34
|
-
comparePrice?: string | undefined;
|
|
35
|
-
}>>;
|
|
36
|
-
export {};
|