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.
Files changed (165) hide show
  1. package/lib/config.d.ts +25 -25
  2. package/lib/config.js +30 -30
  3. package/lib/index.d.ts +3 -3
  4. package/lib/index.js +72 -72
  5. package/lib/index.js.map +1 -1
  6. package/lib/models/autocomplete.d.ts +73 -73
  7. package/lib/models/autocomplete.js +2 -2
  8. package/lib/models/common.d.ts +267 -267
  9. package/lib/models/common.js +65 -65
  10. package/lib/models/common.js.map +1 -1
  11. package/lib/models/content.d.ts +37 -37
  12. package/lib/models/content.js +2 -2
  13. package/lib/models/events.d.ts +113 -113
  14. package/lib/models/events.js +2 -2
  15. package/lib/models/exports.d.ts +6 -6
  16. package/lib/models/exports.js +5 -5
  17. package/lib/models/fullTextSearch.d.ts +130 -130
  18. package/lib/models/fullTextSearch.js +17 -17
  19. package/lib/models/fullTextSearch.js.map +1 -1
  20. package/lib/models/lookAlikeProductRecommendation.d.ts +8 -8
  21. package/lib/models/lookAlikeProductRecommendation.js +2 -2
  22. package/lib/models/productsInventory.d.ts +10 -10
  23. package/lib/models/productsInventory.js +2 -2
  24. package/lib/models/related.d.ts +35 -35
  25. package/lib/models/related.js +2 -2
  26. package/lib/models/smartCollections.d.ts +94 -94
  27. package/lib/models/smartCollections.js +2 -2
  28. package/lib/models/visualDiscovery.d.ts +129 -129
  29. package/lib/models/visualDiscovery.js +30 -30
  30. package/lib/models/visualDiscovery.js.map +1 -1
  31. package/lib/sections/contentSearch/index.d.ts +7 -7
  32. package/lib/sections/contentSearch/index.js +44 -44
  33. package/lib/sections/contentSearch/index.js.map +1 -1
  34. package/lib/sections/enums/index.d.ts +47 -47
  35. package/lib/sections/enums/index.js +50 -50
  36. package/lib/sections/eventReporter/index.d.ts +10 -10
  37. package/lib/sections/eventReporter/index.js +628 -628
  38. package/lib/sections/eventReporter/index.js.map +1 -1
  39. package/lib/sections/eventReporter/utils.d.ts +9 -9
  40. package/lib/sections/eventReporter/utils.js +31 -31
  41. package/lib/sections/eventReporter/utils.js.map +1 -1
  42. package/lib/sections/fullTextSearch/index.d.ts +6 -6
  43. package/lib/sections/fullTextSearch/index.js +178 -178
  44. package/lib/sections/fullTextSearch/index.js.map +1 -1
  45. package/lib/sections/fullTextSearch/utils.d.ts +17 -17
  46. package/lib/sections/fullTextSearch/utils.js +185 -181
  47. package/lib/sections/fullTextSearch/utils.js.map +1 -1
  48. package/lib/sections/index.d.ts +3 -3
  49. package/lib/sections/index.js +432 -434
  50. package/lib/sections/index.js.map +1 -1
  51. package/lib/sections/initialization/index.d.ts +8 -8
  52. package/lib/sections/initialization/index.js +150 -150
  53. package/lib/sections/initialization/index.js.map +1 -1
  54. package/lib/sections/initialization/utils.d.ts +11 -11
  55. package/lib/sections/initialization/utils.js +200 -200
  56. package/lib/sections/initialization/utils.js.map +1 -1
  57. package/lib/sections/instantSearch/index.d.ts +6 -6
  58. package/lib/sections/instantSearch/index.js +66 -66
  59. package/lib/sections/instantSearch/index.js.map +1 -1
  60. package/lib/sections/instantSearch/utils.d.ts +21 -21
  61. package/lib/sections/instantSearch/utils.js +232 -232
  62. package/lib/sections/instantSearch/utils.js.map +1 -1
  63. package/lib/sections/landingPage/index.d.ts +6 -6
  64. package/lib/sections/landingPage/index.js +95 -95
  65. package/lib/sections/landingPage/index.js.map +1 -1
  66. package/lib/sections/landingPage/utils.d.ts +14 -14
  67. package/lib/sections/landingPage/utils.js +96 -96
  68. package/lib/sections/landingPage/utils.js.map +1 -1
  69. package/lib/sections/lookAlikeProductRecommendation/index.d.ts +6 -6
  70. package/lib/sections/lookAlikeProductRecommendation/index.js +23 -23
  71. package/lib/sections/recommendations/index.d.ts +10 -10
  72. package/lib/sections/recommendations/index.js +95 -95
  73. package/lib/sections/recommendations/index.js.map +1 -1
  74. package/lib/sections/recommendations/utils.d.ts +6 -6
  75. package/lib/sections/recommendations/utils.js +82 -82
  76. package/lib/sections/recommendations/utils.js.map +1 -1
  77. package/lib/sections/smartCollections/index.d.ts +6 -6
  78. package/lib/sections/smartCollections/index.js +169 -169
  79. package/lib/sections/smartCollections/index.js.map +1 -1
  80. package/lib/sections/smartCollections/utils.d.ts +41 -41
  81. package/lib/sections/smartCollections/utils.js +286 -281
  82. package/lib/sections/smartCollections/utils.js.map +1 -1
  83. package/lib/sections/visualDiscovery/index.d.ts +22 -22
  84. package/lib/sections/visualDiscovery/index.js +261 -265
  85. package/lib/sections/visualDiscovery/index.js.map +1 -1
  86. package/lib/services/autocomplete.d.ts +24 -24
  87. package/lib/services/autocomplete.js +50 -50
  88. package/lib/services/common.d.ts +35 -35
  89. package/lib/services/common.js +94 -94
  90. package/lib/services/content.d.ts +4 -4
  91. package/lib/services/content.js +25 -25
  92. package/lib/services/fullTextSearch.d.ts +4 -4
  93. package/lib/services/fullTextSearch.js +87 -87
  94. package/lib/services/fullTextSearch.js.map +1 -1
  95. package/lib/services/landingPage.d.ts +21 -21
  96. package/lib/services/landingPage.js +44 -44
  97. package/lib/services/lookAlikeProductRecommendation.d.ts +13 -13
  98. package/lib/services/lookAlikeProductRecommendation.js +23 -23
  99. package/lib/services/related.d.ts +48 -48
  100. package/lib/services/related.js +114 -114
  101. package/lib/services/related.js.map +1 -1
  102. package/lib/services/reporting.d.ts +80 -80
  103. package/lib/services/reporting.js +258 -258
  104. package/lib/services/reporting.js.map +1 -1
  105. package/lib/services/smartCollections.d.ts +5 -5
  106. package/lib/services/smartCollections.js +93 -93
  107. package/lib/services/smartCollections.js.map +1 -1
  108. package/lib/services/utils.d.ts +5 -5
  109. package/lib/services/utils.js +25 -25
  110. package/lib/services/utils.js.map +1 -1
  111. package/lib/services/visualDiscovery.d.ts +9 -9
  112. package/lib/services/visualDiscovery.js +166 -170
  113. package/lib/services/visualDiscovery.js.map +1 -1
  114. package/lib/utils/ABTesting.d.ts +2 -2
  115. package/lib/utils/ABTesting.js +27 -28
  116. package/lib/utils/ABTesting.js.map +1 -1
  117. package/lib/utils/API.d.ts +19 -19
  118. package/lib/utils/API.js +81 -81
  119. package/lib/utils/API.js.map +1 -1
  120. package/lib/utils/ArrayUtils.d.ts +2 -2
  121. package/lib/utils/ArrayUtils.js +16 -17
  122. package/lib/utils/ArrayUtils.js.map +1 -1
  123. package/lib/utils/bindingBoxes.d.ts +23 -23
  124. package/lib/utils/bindingBoxes.js +88 -89
  125. package/lib/utils/bindingBoxes.js.map +1 -1
  126. package/lib/utils/cookies.d.ts +13 -13
  127. package/lib/utils/cookies.js +50 -50
  128. package/lib/utils/debug.d.ts +4 -4
  129. package/lib/utils/debug.js +31 -31
  130. package/lib/utils/debug.js.map +1 -1
  131. package/lib/utils/duplicationsHandler.d.ts +19 -0
  132. package/lib/utils/duplicationsHandler.js +70 -0
  133. package/lib/utils/duplicationsHandler.js.map +1 -0
  134. package/lib/utils/filtersPersonalization.d.ts +3 -3
  135. package/lib/utils/filtersPersonalization.js +39 -39
  136. package/lib/utils/filtersPersonalization.js.map +1 -1
  137. package/lib/utils/image.d.ts +6 -6
  138. package/lib/utils/image.js +153 -153
  139. package/lib/utils/image.js.map +1 -1
  140. package/lib/utils/klaviyo.js +1 -1
  141. package/lib/utils/location.d.ts +1 -1
  142. package/lib/utils/location.js +11 -11
  143. package/lib/utils/location.js.map +1 -1
  144. package/lib/utils/mappingUtil.d.ts +4 -4
  145. package/lib/utils/mappingUtil.js +16 -16
  146. package/lib/utils/options.d.ts +23 -23
  147. package/lib/utils/options.js +16 -16
  148. package/lib/utils/personalization.d.ts +2 -2
  149. package/lib/utils/personalization.js +20 -20
  150. package/lib/utils/personalization.js.map +1 -1
  151. package/lib/utils/segments.d.ts +2 -2
  152. package/lib/utils/segments.js +19 -20
  153. package/lib/utils/segments.js.map +1 -1
  154. package/lib/utils/shopifyMarkets.d.ts +3 -3
  155. package/lib/utils/shopifyMarkets.js +12 -12
  156. package/lib/utils/sortUtil.d.ts +1 -1
  157. package/lib/utils/sortUtil.js +24 -24
  158. package/lib/utils/sortUtil.js.map +1 -1
  159. package/lib/utils/updateRecentSearches.d.ts +2 -2
  160. package/lib/utils/updateRecentSearches.js +56 -57
  161. package/lib/utils/updateRecentSearches.js.map +1 -1
  162. package/lib/utils/validation.d.ts +5 -5
  163. package/lib/utils/validation.js +46 -46
  164. package/lib/utils/validation.js.map +1 -1
  165. package/package.json +3 -2
@@ -1,37 +1,37 @@
1
- export interface ContentSearchServiceProps {
2
- storeID: number;
3
- uuid: string;
4
- cdn: number;
5
- query: string;
6
- cursor?: string;
7
- }
8
- export type ContentItem = [contentTitle, contentURL, contentDescription, null, contentImage];
9
- type contentTitle = string;
10
- type contentURL = string;
11
- type contentDescription = string | null;
12
- type contentImage = string | null;
13
- export interface ContentSearchResponse {
14
- content_cursor: string;
15
- content_is_norm: "true" | "false";
16
- content_results: ContentItem[];
17
- }
18
- export interface ContentSearchProps {
19
- query: string;
20
- callback: (response: ContentSearchResult) => void;
21
- page?: number;
22
- }
23
- export interface SearchContent {
24
- title: string;
25
- url: string;
26
- description?: string;
27
- image?: string;
28
- }
29
- interface ContentSearchResult {
30
- action: "content-search";
31
- payload: ContentSearchPayload;
32
- }
33
- interface ContentSearchPayload {
34
- content: SearchContent[];
35
- page: number;
36
- }
37
- export {};
1
+ export interface ContentSearchServiceProps {
2
+ storeID: number;
3
+ uuid: string;
4
+ cdn: number;
5
+ query: string;
6
+ cursor?: string;
7
+ }
8
+ export type ContentItem = [contentTitle, contentURL, contentDescription, null, contentImage];
9
+ type contentTitle = string;
10
+ type contentURL = string;
11
+ type contentDescription = string | null;
12
+ type contentImage = string | null;
13
+ export interface ContentSearchResponse {
14
+ content_cursor: string;
15
+ content_is_norm: "true" | "false";
16
+ content_results: ContentItem[];
17
+ }
18
+ export interface ContentSearchProps {
19
+ query: string;
20
+ callback: (response: ContentSearchResult) => void;
21
+ page?: number;
22
+ }
23
+ export interface SearchContent {
24
+ title: string;
25
+ url: string;
26
+ description?: string;
27
+ image?: string;
28
+ }
29
+ interface ContentSearchResult {
30
+ action: "content-search";
31
+ payload: ContentSearchPayload;
32
+ }
33
+ interface ContentSearchPayload {
34
+ content: SearchContent[];
35
+ page: number;
36
+ }
37
+ export {};
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=content.js.map
@@ -1,113 +1,113 @@
1
- import { AppType } from "./common";
2
- import { Narrow, SortBy } from "./fullTextSearch";
3
- export interface Report<T> {
4
- eventName: EventName;
5
- data: T;
6
- targetURL?: string;
7
- time?: number;
8
- reportAppType?: AppType;
9
- callback?: ({}: {
10
- eventName: EventName;
11
- payload: any;
12
- }) => void;
13
- }
14
- export type EventName = "instantsearch-product" | "instantsearch-popular-search" | "instantsearch-category" | "search" | "collection" | "productFromSearch" | "productFromCollection" | "promoTileFromSearch" | "promoTileFromCollection" | "productFromRecommendation" | "productDirect" | "lookALikeViewSerp" | "quickViewSerp" | "lookALikeViewCollection" | "quickViewCollection" | "productFromLookALike" | "productFromQuickView" | "cartVisited" | "cartPerformed" | "collectionPreformedFromTurbolink";
15
- export interface ProductSeenAutocompleteData {
16
- query: string;
17
- productID: string;
18
- productQuery: string;
19
- }
20
- export interface CategorySeenAutocompleteData {
21
- query: string;
22
- categoryID: string;
23
- }
24
- export interface PopularSearchSeenAutocompleteData {
25
- term: string;
26
- query: string;
27
- }
28
- export interface ProductSeenSerpData {
29
- query: string;
30
- productID: string;
31
- position?: number;
32
- imageID?: string;
33
- }
34
- export interface PromotileSeenSerpData {
35
- query: string;
36
- productID: string;
37
- position?: number;
38
- imageID?: string;
39
- link: string;
40
- thumbnail: string;
41
- }
42
- export interface ProductSeenRecommendations {
43
- productID: string;
44
- sourceProductID: string;
45
- position?: number;
46
- }
47
- export interface ProductSeenFromLookALike {
48
- productID: string;
49
- originalProduct?: string;
50
- position?: number;
51
- }
52
- export interface ProductSeenCollectionData {
53
- collectionID: string;
54
- productID: string;
55
- position?: number;
56
- query?: string;
57
- imageID?: string;
58
- }
59
- export interface PromotileSeenCollectionData {
60
- collectionID: string;
61
- productID: string;
62
- position?: number;
63
- query?: string;
64
- imageID?: string;
65
- link: string;
66
- thumbnail: string;
67
- }
68
- export interface SearchPreformedData {
69
- query: string;
70
- narrowBy?: Narrow[];
71
- sortBy?: SortBy;
72
- products?: string[];
73
- pagenum?: string;
74
- rescount?: string;
75
- promoTiles?: PromotileEvent[];
76
- }
77
- export interface PromotileEvent {
78
- id: number;
79
- name: string;
80
- link: string;
81
- thumbnail: string;
82
- }
83
- export interface CollectionPreformedData {
84
- categoryID: string;
85
- query?: string;
86
- narrowBy?: Narrow[];
87
- sortBy?: SortBy;
88
- products?: string[];
89
- pagenum?: string;
90
- rescount?: string;
91
- promoTiles?: PromotileEvent[];
92
- fromTurboLink?: boolean;
93
- }
94
- export interface QuickViewSerpData {
95
- term: string;
96
- productID: string;
97
- position: number;
98
- }
99
- export interface QuickViewCollectionData {
100
- collectionID: string;
101
- productID: string;
102
- position: number;
103
- }
104
- export interface PostLoadResponse {
105
- isp_token: string;
106
- isp_segments_serving?: boolean;
107
- }
108
- export interface DirectProductViewData {
109
- productID: string;
110
- }
111
- export interface AddToCartData {
112
- productID?: string;
113
- }
1
+ import { AppType } from "./common";
2
+ import { Narrow, SortBy } from "./fullTextSearch";
3
+ export interface Report<T> {
4
+ eventName: EventName;
5
+ data: T;
6
+ targetURL?: string;
7
+ time?: number;
8
+ reportAppType?: AppType;
9
+ callback?: ({}: {
10
+ eventName: EventName;
11
+ payload: any;
12
+ }) => void;
13
+ }
14
+ export type EventName = "instantsearch-product" | "instantsearch-popular-search" | "instantsearch-category" | "search" | "collection" | "productFromSearch" | "productFromCollection" | "promoTileFromSearch" | "promoTileFromCollection" | "productFromRecommendation" | "productDirect" | "lookALikeViewSerp" | "quickViewSerp" | "lookALikeViewCollection" | "quickViewCollection" | "productFromLookALike" | "productFromQuickView" | "cartVisited" | "cartPerformed" | "collectionPreformedFromTurbolink";
15
+ export interface ProductSeenAutocompleteData {
16
+ query: string;
17
+ productID: string;
18
+ productQuery: string;
19
+ }
20
+ export interface CategorySeenAutocompleteData {
21
+ query: string;
22
+ categoryID: string;
23
+ }
24
+ export interface PopularSearchSeenAutocompleteData {
25
+ term: string;
26
+ query: string;
27
+ }
28
+ export interface ProductSeenSerpData {
29
+ query: string;
30
+ productID: string;
31
+ position?: number;
32
+ imageID?: string;
33
+ }
34
+ export interface PromotileSeenSerpData {
35
+ query: string;
36
+ productID: string;
37
+ position?: number;
38
+ imageID?: string;
39
+ link: string;
40
+ thumbnail: string;
41
+ }
42
+ export interface ProductSeenRecommendations {
43
+ productID: string;
44
+ sourceProductID: string;
45
+ position?: number;
46
+ }
47
+ export interface ProductSeenFromLookALike {
48
+ productID: string;
49
+ originalProduct?: string;
50
+ position?: number;
51
+ }
52
+ export interface ProductSeenCollectionData {
53
+ collectionID: string;
54
+ productID: string;
55
+ position?: number;
56
+ query?: string;
57
+ imageID?: string;
58
+ }
59
+ export interface PromotileSeenCollectionData {
60
+ collectionID: string;
61
+ productID: string;
62
+ position?: number;
63
+ query?: string;
64
+ imageID?: string;
65
+ link: string;
66
+ thumbnail: string;
67
+ }
68
+ export interface SearchPreformedData {
69
+ query: string;
70
+ narrowBy?: Narrow[];
71
+ sortBy?: SortBy;
72
+ products?: string[];
73
+ pagenum?: string;
74
+ rescount?: string;
75
+ promoTiles?: PromotileEvent[];
76
+ }
77
+ export interface PromotileEvent {
78
+ id: number;
79
+ name: string;
80
+ link: string;
81
+ thumbnail: string;
82
+ }
83
+ export interface CollectionPreformedData {
84
+ categoryID: string;
85
+ query?: string;
86
+ narrowBy?: Narrow[];
87
+ sortBy?: SortBy;
88
+ products?: string[];
89
+ pagenum?: string;
90
+ rescount?: string;
91
+ promoTiles?: PromotileEvent[];
92
+ fromTurboLink?: boolean;
93
+ }
94
+ export interface QuickViewSerpData {
95
+ term: string;
96
+ productID: string;
97
+ position: number;
98
+ }
99
+ export interface QuickViewCollectionData {
100
+ collectionID: string;
101
+ productID: string;
102
+ position: number;
103
+ }
104
+ export interface PostLoadResponse {
105
+ isp_token: string;
106
+ isp_segments_serving?: boolean;
107
+ }
108
+ export interface DirectProductViewData {
109
+ productID: string;
110
+ }
111
+ export interface AddToCartData {
112
+ productID?: string;
113
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=events.js.map
@@ -1,6 +1,6 @@
1
- import { FastCategory, FastTurbolinks, Currency } from "./autocomplete";
2
- import { Attribute, AttributeData, CategoryFacetValue, ColorFamilyFacetValue, Facet, FacetRequired, FacetValue, fullTextCallback, fullTextSearchProps, fullTextSearchResponse, Narrow, Product, SortBy, Variant, VariantData, FeaturedRanking, AlternativeColor } from "./fullTextSearch";
3
- import { CategoryAncestor, smartCollections, smartCollectionsCallback, SmartCollectionsResponse, smartCollectionsResults } from "./smartCollections";
4
- import { AppType, AutocompleteResults, FullTextResults, FullTextSearchProps, initProps, instantSearchProps, LookALikeProps, LookALikeResponse, Platfrom, RelatedProps, smartCollectionsProps, GetProductsProps } from "./common";
5
- import { EventName } from "./events";
6
- export { GetProductsProps, FeaturedRanking, AlternativeColor, FastTurbolinks, FastCategory, Product, AppType, instantSearchProps, initProps, RelatedProps, FullTextSearchProps, LookALikeProps, LookALikeResponse, FullTextResults, AutocompleteResults, smartCollectionsProps, Platfrom, fullTextSearchResponse, fullTextSearchProps, fullTextCallback, Narrow, Facet, FacetRequired, FacetValue, CategoryFacetValue, ColorFamilyFacetValue, AttributeData, Attribute, VariantData, Variant, EventName, SortBy, SmartCollectionsResponse, smartCollectionsResults, smartCollectionsCallback, smartCollections, CategoryAncestor, Currency };
1
+ import { FastCategory, FastTurbolinks, Currency } from "./autocomplete";
2
+ import { Attribute, AttributeData, CategoryFacetValue, ColorFamilyFacetValue, Facet, FacetRequired, FacetValue, fullTextCallback, fullTextSearchProps, fullTextSearchResponse, Narrow, Product, SortBy, Variant, VariantData, FeaturedRanking, AlternativeColor } from "./fullTextSearch";
3
+ import { CategoryAncestor, smartCollections, smartCollectionsCallback, SmartCollectionsResponse, smartCollectionsResults } from "./smartCollections";
4
+ import { AppType, AutocompleteResults, FullTextResults, FullTextSearchProps, initProps, instantSearchProps, LookALikeProps, LookALikeResponse, Platfrom, RelatedProps, smartCollectionsProps, GetProductsProps } from "./common";
5
+ import { EventName } from "./events";
6
+ export { GetProductsProps, FeaturedRanking, AlternativeColor, FastTurbolinks, FastCategory, Product, AppType, instantSearchProps, initProps, RelatedProps, FullTextSearchProps, LookALikeProps, LookALikeResponse, FullTextResults, AutocompleteResults, smartCollectionsProps, Platfrom, fullTextSearchResponse, fullTextSearchProps, fullTextCallback, Narrow, Facet, FacetRequired, FacetValue, CategoryFacetValue, ColorFamilyFacetValue, AttributeData, Attribute, VariantData, Variant, EventName, SortBy, SmartCollectionsResponse, smartCollectionsResults, smartCollectionsCallback, smartCollections, CategoryAncestor, Currency };
@@ -1,6 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FeaturedRanking = void 0;
4
- var fullTextSearch_1 = require("./fullTextSearch");
5
- Object.defineProperty(exports, "FeaturedRanking", { enumerable: true, get: function () { return fullTextSearch_1.FeaturedRanking; } });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FeaturedRanking = void 0;
4
+ var fullTextSearch_1 = require("./fullTextSearch");
5
+ Object.defineProperty(exports, "FeaturedRanking", { enumerable: true, get: function () { return fullTextSearch_1.FeaturedRanking; } });
6
6
  //# sourceMappingURL=exports.js.map
@@ -1,130 +1,130 @@
1
- import { Currency } from "./autocomplete";
2
- import { CategoryAncestor } from "./smartCollections";
3
- import { FullTextResults } from "./common";
4
- export interface fullTextSearchResponse {
5
- items: Product[];
6
- facets: Facet[];
7
- total_results: number;
8
- facets_completed?: boolean;
9
- sort_by?: SortBy;
10
- narrow: [string, string, string][];
11
- pop_products_no_results?: boolean;
12
- p: number;
13
- total_p: number;
14
- personalized_products?: number[];
15
- ancestor_categories?: CategoryAncestor[];
16
- avoid_tag_prefixes?: string;
17
- merch?: any;
18
- turbolink?: string;
19
- related_categories?: RelatedCategoryServer[];
20
- related_results?: boolean;
21
- banner_html?: string;
22
- title?: string;
23
- }
24
- export interface fullTextSearchProps {
25
- term: string;
26
- storeID: number;
27
- uuid: string;
28
- cdn: number;
29
- userToken: string;
30
- sessionStart: number;
31
- page?: number;
32
- productsPerPage?: number;
33
- sortBy?: SortBy;
34
- narrowBy?: Narrow[];
35
- facetRequired?: FacetRequired;
36
- withAttributes?: boolean;
37
- recent?: string;
38
- searchWithinSearch?: string;
39
- segments?: string[];
40
- hasShopifyMarkets?: boolean;
41
- companyLocationContext?: number;
42
- withProductTypes?: boolean;
43
- abTestingVariations?: {
44
- [key: string]: {
45
- [key: string]: object;
46
- };
47
- };
48
- disableMerchandising?: boolean;
49
- disableStrategies?: boolean;
50
- disableMerchandisingRules?: boolean;
51
- isPersonalizedFiltersActive?: boolean;
52
- disableTurbolinks?: boolean;
53
- searchPersonalization?: boolean;
54
- }
55
- export type SortBy = "price_min_to_max" | "price_max_to_min" | "creation_date" | "creation_date_oldest" | "popularity" | "reviews" | "a_to_z" | "z_to_a" | 'relevency';
56
- export declare function isSortBy(sort: string | undefined): sort is SortBy;
57
- export type Narrow = [FilterGroupName, FilterValue];
58
- type FilterGroupName = string;
59
- type FilterValue = string;
60
- export type FacetRequired = 0 | 1 | 2;
61
- export declare enum FeaturedRanking {
62
- FEATURED_RANK_NO = 0,
63
- FEATURED_RANK_ON_MATCH = 1,
64
- FEATURED_RANK_ALWAYS = 2,
65
- FEATURED_RANK_NEVER = 3
66
- }
67
- export interface Product {
68
- c: Currency;
69
- d: string;
70
- f: FeaturedRanking;
71
- id: string;
72
- iso: boolean;
73
- l: string;
74
- p: string;
75
- p_c: string;
76
- p_max: string;
77
- p_max_c: string;
78
- p_min: string;
79
- p_min_c: string;
80
- p_spl: number;
81
- review?: number;
82
- reviews_count?: number;
83
- s: string;
84
- sku: string;
85
- skus: string[];
86
- t: string;
87
- t2: string;
88
- u: string;
89
- v_c: number;
90
- v: string;
91
- vra: Variant[];
92
- vrc: object;
93
- att?: Attribute[];
94
- real_sku?: string;
95
- imageID?: string;
96
- alt?: AlternativeColor[];
97
- rec_src?: number;
98
- }
99
- export type Variant = [number, VariantData[]];
100
- export type VariantData = [string, string[]];
101
- export type Attribute = [string, AttributeData[]];
102
- export type AttributeData = string[] | string[][];
103
- export type Facet = [string, FacetValue[] | CategoryFacetValue[] | ColorFamilyFacetValue[], string, boolean, number];
104
- export type FacetValue = [string, number];
105
- export type CategoryFacetValue = [string, number, string, string];
106
- export type ColorFamilyFacetValue = [string, string, string];
107
- export type fullTextCallback = ({}: {
108
- action: "products" | "facets and products" | "turbolink";
109
- payload: FullTextResults;
110
- }) => void;
111
- export type fullTextProductsCallback = ({}: {
112
- payload: FullTextResults;
113
- }) => void;
114
- export type fullTextFacetsCallback = ({}: {
115
- payload: FullTextResults;
116
- }) => void;
117
- export interface RecentSerpProducts {
118
- id: string;
119
- time: number;
120
- }
121
- export type AlternativeColor = [AlternativeColorName, AlternativeColorURL];
122
- type AlternativeColorName = string;
123
- type AlternativeColorURL = string;
124
- export interface RelatedCategoryServer {
125
- id: string;
126
- l: string;
127
- t: string;
128
- u: string;
129
- }
130
- export {};
1
+ import { Currency } from "./autocomplete";
2
+ import { CategoryAncestor } from "./smartCollections";
3
+ import { FullTextResults } from "./common";
4
+ export interface fullTextSearchResponse {
5
+ items: Product[];
6
+ facets: Facet[];
7
+ total_results: number;
8
+ facets_completed?: boolean;
9
+ sort_by?: SortBy;
10
+ narrow: [string, string, string][];
11
+ pop_products_no_results?: boolean;
12
+ p: number;
13
+ total_p: number;
14
+ personalized_products?: number[];
15
+ ancestor_categories?: CategoryAncestor[];
16
+ avoid_tag_prefixes?: string;
17
+ merch?: any;
18
+ turbolink?: string;
19
+ related_categories?: RelatedCategoryServer[];
20
+ related_results?: boolean;
21
+ banner_html?: string;
22
+ title?: string;
23
+ }
24
+ export interface fullTextSearchProps {
25
+ term: string;
26
+ storeID: number;
27
+ uuid: string;
28
+ cdn: number;
29
+ userToken: string;
30
+ sessionStart: number;
31
+ page?: number;
32
+ productsPerPage?: number;
33
+ sortBy?: SortBy;
34
+ narrowBy?: Narrow[];
35
+ facetRequired?: FacetRequired;
36
+ withAttributes?: boolean;
37
+ recent?: string;
38
+ searchWithinSearch?: string;
39
+ segments?: string[];
40
+ hasShopifyMarkets?: boolean;
41
+ companyLocationContext?: number;
42
+ withProductTypes?: boolean;
43
+ abTestingVariations?: {
44
+ [key: string]: {
45
+ [key: string]: object;
46
+ };
47
+ };
48
+ disableMerchandising?: boolean;
49
+ disableStrategies?: boolean;
50
+ disableMerchandisingRules?: boolean;
51
+ isPersonalizedFiltersActive?: boolean;
52
+ disableTurbolinks?: boolean;
53
+ searchPersonalization?: boolean;
54
+ }
55
+ export type SortBy = "price_min_to_max" | "price_max_to_min" | "creation_date" | "creation_date_oldest" | "popularity" | "reviews" | "a_to_z" | "z_to_a" | 'relevency';
56
+ export declare function isSortBy(sort: string | undefined): sort is SortBy;
57
+ export type Narrow = [FilterGroupName, FilterValue];
58
+ type FilterGroupName = string;
59
+ type FilterValue = string;
60
+ export type FacetRequired = 0 | 1 | 2;
61
+ export declare enum FeaturedRanking {
62
+ FEATURED_RANK_NO = 0,
63
+ FEATURED_RANK_ON_MATCH = 1,
64
+ FEATURED_RANK_ALWAYS = 2,
65
+ FEATURED_RANK_NEVER = 3
66
+ }
67
+ export interface Product {
68
+ c: Currency;
69
+ d: string;
70
+ f: FeaturedRanking;
71
+ id: string;
72
+ iso: boolean;
73
+ l: string;
74
+ p: string;
75
+ p_c: string;
76
+ p_max: string;
77
+ p_max_c: string;
78
+ p_min: string;
79
+ p_min_c: string;
80
+ p_spl: number;
81
+ review?: number;
82
+ reviews_count?: number;
83
+ s: string;
84
+ sku: string;
85
+ skus: string[];
86
+ t: string;
87
+ t2: string;
88
+ u: string;
89
+ v_c: number;
90
+ v: string;
91
+ vra: Variant[];
92
+ vrc: object;
93
+ att?: Attribute[];
94
+ real_sku?: string;
95
+ imageID?: string;
96
+ alt?: AlternativeColor[];
97
+ rec_src?: number;
98
+ }
99
+ export type Variant = [number, VariantData[]];
100
+ export type VariantData = [string, string[]];
101
+ export type Attribute = [string, AttributeData[]];
102
+ export type AttributeData = string[] | string[][];
103
+ export type Facet = [string, FacetValue[] | CategoryFacetValue[] | ColorFamilyFacetValue[], string, boolean, number];
104
+ export type FacetValue = [string, number];
105
+ export type CategoryFacetValue = [string, number, string, string];
106
+ export type ColorFamilyFacetValue = [string, string, string];
107
+ export type fullTextCallback = ({}: {
108
+ action: "products" | "facets and products" | "turbolink";
109
+ payload: FullTextResults;
110
+ }) => void;
111
+ export type fullTextProductsCallback = ({}: {
112
+ payload: FullTextResults;
113
+ }) => void;
114
+ export type fullTextFacetsCallback = ({}: {
115
+ payload: FullTextResults;
116
+ }) => void;
117
+ export interface RecentSerpProducts {
118
+ id: string;
119
+ time: number;
120
+ }
121
+ export type AlternativeColor = [AlternativeColorName, AlternativeColorURL];
122
+ type AlternativeColorName = string;
123
+ type AlternativeColorURL = string;
124
+ export interface RelatedCategoryServer {
125
+ id: string;
126
+ l: string;
127
+ t: string;
128
+ u: string;
129
+ }
130
+ export {};
@@ -1,18 +1,18 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FeaturedRanking = exports.isSortBy = void 0;
4
- function isSortBy(sort) {
5
- if (!sort) {
6
- return false;
7
- }
8
- return (["creation_date", "a_to_z", "z_to_a", "creation_date_oldest", "reviews", "relevency", "price_min_to_max", "price_max_to_min", "popularity"]).includes(sort);
9
- }
10
- exports.isSortBy = isSortBy;
11
- var FeaturedRanking;
12
- (function (FeaturedRanking) {
13
- FeaturedRanking[FeaturedRanking["FEATURED_RANK_NO"] = 0] = "FEATURED_RANK_NO";
14
- FeaturedRanking[FeaturedRanking["FEATURED_RANK_ON_MATCH"] = 1] = "FEATURED_RANK_ON_MATCH";
15
- FeaturedRanking[FeaturedRanking["FEATURED_RANK_ALWAYS"] = 2] = "FEATURED_RANK_ALWAYS";
16
- FeaturedRanking[FeaturedRanking["FEATURED_RANK_NEVER"] = 3] = "FEATURED_RANK_NEVER";
17
- })(FeaturedRanking = exports.FeaturedRanking || (exports.FeaturedRanking = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FeaturedRanking = void 0;
4
+ exports.isSortBy = isSortBy;
5
+ function isSortBy(sort) {
6
+ if (!sort) {
7
+ return false;
8
+ }
9
+ return (["creation_date", "a_to_z", "z_to_a", "creation_date_oldest", "reviews", "relevency", "price_min_to_max", "price_max_to_min", "popularity"]).includes(sort);
10
+ }
11
+ var FeaturedRanking;
12
+ (function (FeaturedRanking) {
13
+ FeaturedRanking[FeaturedRanking["FEATURED_RANK_NO"] = 0] = "FEATURED_RANK_NO";
14
+ FeaturedRanking[FeaturedRanking["FEATURED_RANK_ON_MATCH"] = 1] = "FEATURED_RANK_ON_MATCH";
15
+ FeaturedRanking[FeaturedRanking["FEATURED_RANK_ALWAYS"] = 2] = "FEATURED_RANK_ALWAYS";
16
+ FeaturedRanking[FeaturedRanking["FEATURED_RANK_NEVER"] = 3] = "FEATURED_RANK_NEVER";
17
+ })(FeaturedRanking || (exports.FeaturedRanking = FeaturedRanking = {}));
18
18
  //# sourceMappingURL=fullTextSearch.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fullTextSearch.js","sourceRoot":"","sources":["../../src/models/fullTextSearch.ts"],"names":[],"mappings":";;;AAoEA,SAAgB,QAAQ,CAAC,IAAwB;IAC7C,IAAI,CAAC,IAAI,EAAE;QACP,OAAO,KAAK,CAAC;KAChB;IAED,OAAO,CAAC,CAAC,eAAe,EAAE,QAAQ,EAAE,QAAQ,EAAE,sBAAsB,EAAE,SAAS,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACxK,CAAC;AAND,4BAMC;AAQD,IAAY,eAKX;AALD,WAAY,eAAe;IACvB,6EAAgB,CAAA;IAChB,yFAAsB,CAAA;IACtB,qFAAoB,CAAA;IACpB,mFAAmB,CAAA;AACvB,CAAC,EALW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAK1B"}
1
+ {"version":3,"file":"fullTextSearch.js","sourceRoot":"","sources":["../../src/models/fullTextSearch.ts"],"names":[],"mappings":";;;AAoEA,4BAMC;AAND,SAAgB,QAAQ,CAAC,IAAwB;IAC7C,IAAI,CAAC,IAAI,EAAE,CAAC;QACR,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,OAAO,CAAC,CAAC,eAAe,EAAE,QAAQ,EAAE,QAAQ,EAAE,sBAAsB,EAAE,SAAS,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACxK,CAAC;AAQD,IAAY,eAKX;AALD,WAAY,eAAe;IACvB,6EAAgB,CAAA;IAChB,yFAAsB,CAAA;IACtB,qFAAoB,CAAA;IACpB,mFAAmB,CAAA;AACvB,CAAC,EALW,eAAe,+BAAf,eAAe,QAK1B"}
@@ -1,8 +1,8 @@
1
- import { Report } from "./events";
2
- import { SDKUtils } from "./common";
3
- export interface LookAlikeEvent<T> {
4
- self: SDKUtils;
5
- report: Report<T>;
6
- type: LookAlikeEventType;
7
- }
8
- export type LookAlikeEventType = "Quick View" | "Look A Like";
1
+ import { Report } from "./events";
2
+ import { SDKUtils } from "./common";
3
+ export interface LookAlikeEvent<T> {
4
+ self: SDKUtils;
5
+ report: Report<T>;
6
+ type: LookAlikeEventType;
7
+ }
8
+ export type LookAlikeEventType = "Quick View" | "Look A Like";