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.
Files changed (85) hide show
  1. package/lib/index.js +5 -1
  2. package/lib/index.js.map +1 -1
  3. package/lib/models/autocomplete.d.ts +2 -2
  4. package/lib/models/common.d.ts +8 -7
  5. package/lib/models/common.js.map +1 -1
  6. package/lib/models/content.d.ts +5 -5
  7. package/lib/models/events.d.ts +1 -1
  8. package/lib/models/fullTextSearch.d.ts +24 -17
  9. package/lib/models/fullTextSearch.js.map +1 -1
  10. package/lib/models/lookAlikeProductRecommendation.d.ts +1 -1
  11. package/lib/models/productsInventory.d.ts +1 -1
  12. package/lib/models/related.d.ts +3 -3
  13. package/lib/models/smartCollections.d.ts +11 -3
  14. package/lib/sections/contentSearch/index.js +4 -2
  15. package/lib/sections/contentSearch/index.js.map +1 -1
  16. package/lib/sections/eventReporter/index.js +49 -34
  17. package/lib/sections/eventReporter/index.js.map +1 -1
  18. package/lib/sections/eventReporter/utils.js +1 -1
  19. package/lib/sections/eventReporter/utils.js.map +1 -1
  20. package/lib/sections/fullTextSearch/index.js +30 -20
  21. package/lib/sections/fullTextSearch/index.js.map +1 -1
  22. package/lib/sections/fullTextSearch/utils.d.ts +1 -1
  23. package/lib/sections/fullTextSearch/utils.js +39 -10
  24. package/lib/sections/fullTextSearch/utils.js.map +1 -1
  25. package/lib/sections/index.js +44 -42
  26. package/lib/sections/index.js.map +1 -1
  27. package/lib/sections/initialization/index.js +66 -27
  28. package/lib/sections/initialization/index.js.map +1 -1
  29. package/lib/sections/initialization/utils.d.ts +1 -1
  30. package/lib/sections/initialization/utils.js +10 -10
  31. package/lib/sections/initialization/utils.js.map +1 -1
  32. package/lib/sections/instantSearch/index.js +15 -11
  33. package/lib/sections/instantSearch/index.js.map +1 -1
  34. package/lib/sections/instantSearch/utils.js +18 -14
  35. package/lib/sections/instantSearch/utils.js.map +1 -1
  36. package/lib/sections/landingPage/index.js +28 -15
  37. package/lib/sections/landingPage/index.js.map +1 -1
  38. package/lib/sections/landingPage/utils.js +10 -6
  39. package/lib/sections/landingPage/utils.js.map +1 -1
  40. package/lib/sections/lookAlikeProductRecommendation/index.js +5 -2
  41. package/lib/sections/lookAlikeProductRecommendation/index.js.map +1 -1
  42. package/lib/sections/recommendations/index.js +8 -6
  43. package/lib/sections/recommendations/index.js.map +1 -1
  44. package/lib/sections/smartCollections/index.js +40 -25
  45. package/lib/sections/smartCollections/index.js.map +1 -1
  46. package/lib/sections/smartCollections/utils.d.ts +1 -1
  47. package/lib/sections/smartCollections/utils.js +35 -10
  48. package/lib/sections/smartCollections/utils.js.map +1 -1
  49. package/lib/services/autocomplete.d.ts +2 -1
  50. package/lib/services/autocomplete.js +8 -7
  51. package/lib/services/autocomplete.js.map +1 -1
  52. package/lib/services/common.d.ts +2 -1
  53. package/lib/services/common.js +16 -15
  54. package/lib/services/common.js.map +1 -1
  55. package/lib/services/content.js +2 -2
  56. package/lib/services/content.js.map +1 -1
  57. package/lib/services/fullTextSearch.js +21 -21
  58. package/lib/services/fullTextSearch.js.map +1 -1
  59. package/lib/services/landingPage.d.ts +3 -1
  60. package/lib/services/landingPage.js +14 -11
  61. package/lib/services/landingPage.js.map +1 -1
  62. package/lib/services/lookAlikeProductRecommendation.d.ts +2 -1
  63. package/lib/services/lookAlikeProductRecommendation.js +5 -4
  64. package/lib/services/lookAlikeProductRecommendation.js.map +1 -1
  65. package/lib/services/related.d.ts +5 -2
  66. package/lib/services/related.js +11 -8
  67. package/lib/services/related.js.map +1 -1
  68. package/lib/services/reporting.d.ts +1 -1
  69. package/lib/services/reporting.js +6 -6
  70. package/lib/services/reporting.js.map +1 -1
  71. package/lib/services/smartCollections.js +19 -19
  72. package/lib/services/smartCollections.js.map +1 -1
  73. package/lib/services/utils.d.ts +2 -2
  74. package/lib/utils/API.js +1 -1
  75. package/lib/utils/cookies.js +1 -1
  76. package/lib/utils/cookies.js.map +1 -1
  77. package/lib/utils/debug.d.ts +1 -1
  78. package/lib/utils/debug.js +1 -1
  79. package/lib/utils/debug.js.map +1 -1
  80. package/lib/utils/shopifyMarkets.js +2 -2
  81. package/lib/utils/shopifyMarkets.js.map +1 -1
  82. package/lib/utils/validation.js +2 -2
  83. package/lib/utils/validation.js.map +1 -1
  84. package/package.json +6 -6
  85. package/lib/services/getPricesByMarket.d.ts +0 -36
@@ -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: " + v + " missing", 'font-weight: bold; font-size: 12px; color: red');
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" + config_1.API_ERROR_MSG, 'font-weight: bold; font-size: 12px; color: red');
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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C,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.4",
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.24.2",
30
- "webpack-cli": "^4.5.0"
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/utilities": "^1.0.36",
37
- "axios": "^0.21.1",
38
- "@fast-simon/bigcommerce_customer": "1.0.44"
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 {};