@envive-ai/react-hooks 0.2.5 → 0.2.6-alpha

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 (861) hide show
  1. package/dist/AmplitudeOperations-CDe6oRn4.cjs +41 -0
  2. package/dist/AmplitudeOperations-zFjk1Mkm.js +34 -0
  3. package/dist/{NewOrgConfig-B98Y9tMb.js → NewOrgConfig-ChNJ3ZtC.js} +2 -2
  4. package/dist/{NewOrgConfig-ZbBKiByQ.cjs → NewOrgConfig-KHz61ikr.cjs} +2 -2
  5. package/dist/TrackComponentVisibleEvent-f8ahqV1g.js +53 -0
  6. package/dist/TrackComponentVisibleEvent-uEzgBXb9.cjs +60 -0
  7. package/dist/amplitudeContext-CRFxGj_x.d.ts +52 -0
  8. package/dist/amplitudeContext-ZkerrMUa.d.cts +52 -0
  9. package/dist/api-1-73JxnF.js +166 -0
  10. package/dist/api-ZNG6wObS.cjs +239 -0
  11. package/dist/application/models/graphql/index.cjs +3 -3
  12. package/dist/application/models/graphql/index.d.cts +2 -2
  13. package/dist/application/models/graphql/index.d.ts +2 -2
  14. package/dist/application/models/graphql/index.js +2 -3
  15. package/dist/application/models/guards/api/index.cjs +3 -3
  16. package/dist/application/models/guards/api/index.d.cts +2 -2
  17. package/dist/application/models/guards/api/index.d.ts +2 -2
  18. package/dist/application/models/guards/api/index.js +3 -3
  19. package/dist/application/models/guards/utils.cjs +1 -1
  20. package/dist/application/models/guards/utils.d.ts +1 -1
  21. package/dist/application/models/guards/utils.js +1 -1
  22. package/dist/application/models/index.cjs +7 -23
  23. package/dist/application/models/index.d.cts +167 -11
  24. package/dist/application/models/index.d.ts +168 -12
  25. package/dist/application/models/index.js +7 -11
  26. package/dist/application/utils/index.cjs +19 -19
  27. package/dist/application/utils/index.d.cts +14 -63
  28. package/dist/application/utils/index.d.ts +16 -65
  29. package/dist/application/utils/index.js +19 -19
  30. package/dist/{atomStore-DXTVqiKc.js → atomStore-DAQvNPkh.js} +1 -1
  31. package/dist/{atomStore-DNji91Im.cjs → atomStore-DD9g7Zw2.cjs} +1 -1
  32. package/dist/atoms/app/index.cjs +19 -19
  33. package/dist/atoms/app/index.d.cts +9 -20
  34. package/dist/atoms/app/index.d.ts +8 -19
  35. package/dist/atoms/app/index.js +19 -19
  36. package/dist/atoms/atomStore/index.cjs +1 -1
  37. package/dist/atoms/atomStore/index.js +1 -1
  38. package/dist/atoms/chat/index.cjs +21 -21
  39. package/dist/atoms/chat/index.d.cts +37 -45
  40. package/dist/atoms/chat/index.d.ts +35 -43
  41. package/dist/atoms/chat/index.js +21 -21
  42. package/dist/atoms/globalSearch/index.cjs +1 -1
  43. package/dist/atoms/globalSearch/index.d.cts +1 -1
  44. package/dist/atoms/globalSearch/index.d.ts +5 -5
  45. package/dist/atoms/globalSearch/index.js +1 -1
  46. package/dist/atoms/org/index.cjs +10 -11
  47. package/dist/atoms/org/index.d.cts +19 -31
  48. package/dist/atoms/org/index.d.ts +19 -31
  49. package/dist/atoms/org/index.js +2 -3
  50. package/dist/atoms/search/index.cjs +7 -47
  51. package/dist/atoms/search/index.d.cts +76 -14
  52. package/dist/atoms/search/index.d.ts +76 -14
  53. package/dist/atoms/search/index.js +7 -29
  54. package/dist/atoms/search/utils.cjs +1 -1
  55. package/dist/atoms/search/utils.d.cts +1 -1
  56. package/dist/atoms/search/utils.d.ts +1 -1
  57. package/dist/atoms/search/utils.js +1 -1
  58. package/dist/cdnContext-BLNiW2HT.cjs +53 -0
  59. package/dist/cdnContext-DT6J5nCw.js +38 -0
  60. package/dist/chat-C0cgfkL8.js +230 -0
  61. package/dist/chat-DULmjtx1.cjs +330 -0
  62. package/dist/chatState-BrSfXIV4.cjs +120 -0
  63. package/dist/chatState-Cn8JGAlH.js +34 -0
  64. package/dist/config/index.d.cts +4 -4
  65. package/dist/config/index.d.ts +4 -4
  66. package/dist/config/locators/components/chat/index.d.cts +1 -1
  67. package/dist/config/locators/components/chat/index.d.ts +1 -1
  68. package/dist/config/locators/components/chat/variants/index.d.cts +1 -1
  69. package/dist/config/locators/components/chat/variants/index.d.ts +1 -1
  70. package/dist/config/locators/components/common/index.d.cts +1 -1
  71. package/dist/config/locators/components/common/index.d.ts +1 -1
  72. package/dist/config/locators/components/index.d.cts +1 -1
  73. package/dist/config/locators/components/index.d.ts +1 -1
  74. package/dist/config/locators/components/search/index.d.cts +1 -1
  75. package/dist/config/locators/components/search/index.d.ts +1 -1
  76. package/dist/config/locators/index.d.cts +4 -4
  77. package/dist/config/locators/index.d.ts +4 -4
  78. package/dist/contexts/amplitudeContext/index.cjs +19 -19
  79. package/dist/contexts/amplitudeContext/index.d.cts +1 -1
  80. package/dist/contexts/amplitudeContext/index.d.ts +1 -1
  81. package/dist/contexts/amplitudeContext/index.js +19 -19
  82. package/dist/contexts/cdnContext/index.cjs +4 -4
  83. package/dist/contexts/cdnContext/index.d.cts +2 -6
  84. package/dist/contexts/cdnContext/index.d.ts +2 -6
  85. package/dist/contexts/cdnContext/index.js +4 -4
  86. package/dist/contexts/enviveConfigContext/index.cjs +4 -4
  87. package/dist/contexts/enviveConfigContext/index.d.cts +3 -24
  88. package/dist/contexts/enviveConfigContext/index.d.ts +3 -24
  89. package/dist/contexts/enviveConfigContext/index.js +4 -4
  90. package/dist/contexts/enviveCssContext/index.cjs +15 -19
  91. package/dist/contexts/enviveCssContext/index.d.cts +3 -5
  92. package/dist/contexts/enviveCssContext/index.d.ts +3 -5
  93. package/dist/contexts/enviveCssContext/index.js +15 -19
  94. package/dist/contexts/featureFlagContext/index.cjs +9 -10
  95. package/dist/contexts/featureFlagContext/index.d.cts +3 -11
  96. package/dist/contexts/featureFlagContext/index.d.ts +3 -11
  97. package/dist/contexts/featureFlagContext/index.js +6 -7
  98. package/dist/contexts/featureFlagServiceContext/index.cjs +4 -3
  99. package/dist/contexts/featureFlagServiceContext/index.d.cts +1 -4
  100. package/dist/contexts/featureFlagServiceContext/index.d.ts +1 -4
  101. package/dist/contexts/featureFlagServiceContext/index.js +4 -3
  102. package/dist/contexts/graphqlContext/index.cjs +8 -13
  103. package/dist/contexts/graphqlContext/index.d.cts +11 -14
  104. package/dist/contexts/graphqlContext/index.d.ts +11 -14
  105. package/dist/contexts/graphqlContext/index.js +8 -13
  106. package/dist/contexts/localStorageContext/index.cjs +3 -3
  107. package/dist/contexts/localStorageContext/index.d.cts +3 -22
  108. package/dist/contexts/localStorageContext/index.d.ts +3 -22
  109. package/dist/contexts/localStorageContext/index.js +4 -3
  110. package/dist/contexts/newOrgConfigContext/index.cjs +13 -17
  111. package/dist/contexts/newOrgConfigContext/index.d.cts +12 -15
  112. package/dist/contexts/newOrgConfigContext/index.d.ts +12 -15
  113. package/dist/contexts/newOrgConfigContext/index.js +13 -17
  114. package/dist/contexts/searchContext/index.cjs +24 -24
  115. package/dist/contexts/searchContext/index.d.cts +2 -7
  116. package/dist/contexts/searchContext/index.d.ts +2 -7
  117. package/dist/contexts/searchContext/index.js +24 -24
  118. package/dist/contexts/sessionStorageContext/index.cjs +2 -2
  119. package/dist/contexts/sessionStorageContext/index.d.cts +2 -6
  120. package/dist/contexts/sessionStorageContext/index.d.ts +2 -6
  121. package/dist/contexts/sessionStorageContext/index.js +2 -2
  122. package/dist/contexts/shopifyUrlContext/index.cjs +2 -2
  123. package/dist/contexts/shopifyUrlContext/index.d.cts +2 -11
  124. package/dist/contexts/shopifyUrlContext/index.d.ts +2 -11
  125. package/dist/contexts/shopifyUrlContext/index.js +2 -2
  126. package/dist/contexts/systemSettingsContext/index.cjs +4 -4
  127. package/dist/contexts/systemSettingsContext/index.d.cts +6 -16
  128. package/dist/contexts/systemSettingsContext/index.d.ts +4 -14
  129. package/dist/contexts/systemSettingsContext/index.js +4 -4
  130. package/dist/contexts/userIdentityContext/index.cjs +19 -19
  131. package/dist/contexts/userIdentityContext/index.d.cts +11 -2
  132. package/dist/contexts/userIdentityContext/index.d.ts +11 -2
  133. package/dist/contexts/userIdentityContext/index.js +19 -19
  134. package/dist/dist-BZX_Mgfn.cjs +6019 -0
  135. package/dist/dist-CIM4YRqp.js +5923 -0
  136. package/dist/domObserver-DKcas6tl.js +285 -0
  137. package/dist/{domObserver-v9ODTyfT.js → domObserver-Do6RAJdf.cjs} +23 -4
  138. package/dist/enviveConfig-DaotBKMS.cjs +130 -0
  139. package/dist/enviveConfig-DrvYlCYG.js +62 -0
  140. package/dist/enviveConfigContext--89ejDs5.cjs +60 -0
  141. package/dist/enviveConfigContext-BCnzgk4M.js +45 -0
  142. package/dist/events/index.cjs +2 -3
  143. package/dist/events/index.d.cts +2 -15
  144. package/dist/events/index.d.ts +2 -15
  145. package/dist/events/index.js +2 -2
  146. package/dist/events-CgFGtanE.cjs +69 -0
  147. package/dist/events-WOOrnUAx.js +63 -0
  148. package/dist/exceptions/index.cjs +4 -0
  149. package/dist/exceptions/index.d.cts +12 -0
  150. package/dist/exceptions/index.d.ts +12 -0
  151. package/dist/exceptions/index.js +3 -0
  152. package/dist/exceptions-BiSWJEl2.cjs +32 -0
  153. package/dist/exceptions-DSv0ZaH0.js +20 -0
  154. package/dist/featureFlagServiceContext-B7je7VZV.d.cts +24 -0
  155. package/dist/featureFlagServiceContext-BztKnBPk.cjs +66 -0
  156. package/dist/featureFlagServiceContext-DpdlcjNb.js +46 -0
  157. package/dist/featureFlagServiceContext-ahy3jou0.d.ts +24 -0
  158. package/dist/{globalSearch-FBk2epe8.cjs → globalSearch-Cpc8egsM.cjs} +1 -1
  159. package/dist/{globalSearch-Ccxq8hNF.js → globalSearch-nmrfGLOn.js} +1 -1
  160. package/dist/graphql-CWNkUHFV.js +46 -0
  161. package/dist/graphql-DT-H-lta.cjs +70 -0
  162. package/dist/graphqlContext-B181y-sa.cjs +111 -0
  163. package/dist/graphqlContext-CWulFxxC.js +96 -0
  164. package/dist/hooks/AmplitudeOperations/index.cjs +21 -22
  165. package/dist/hooks/AmplitudeOperations/index.d.cts +2 -2
  166. package/dist/hooks/AmplitudeOperations/index.d.ts +2 -2
  167. package/dist/hooks/AmplitudeOperations/index.js +20 -21
  168. package/dist/hooks/AppDetails/index.cjs +22 -22
  169. package/dist/hooks/AppDetails/index.d.cts +3 -23
  170. package/dist/hooks/AppDetails/index.d.ts +3 -23
  171. package/dist/hooks/AppDetails/index.js +22 -22
  172. package/dist/hooks/CdnOperations/index.cjs +4 -4
  173. package/dist/hooks/CdnOperations/index.js +4 -4
  174. package/dist/hooks/ChatToggle/index.cjs +24 -24
  175. package/dist/hooks/ChatToggle/index.d.cts +2 -2
  176. package/dist/hooks/ChatToggle/index.d.ts +2 -2
  177. package/dist/hooks/ChatToggle/index.js +22 -22
  178. package/dist/hooks/ChatToggleAnalytics/index.cjs +23 -24
  179. package/dist/hooks/ChatToggleAnalytics/index.d.cts +2 -2
  180. package/dist/hooks/ChatToggleAnalytics/index.d.ts +2 -2
  181. package/dist/hooks/ChatToggleAnalytics/index.js +22 -23
  182. package/dist/hooks/CustomerSupportHandoff/index.cjs +2 -2
  183. package/dist/hooks/CustomerSupportHandoff/index.js +2 -2
  184. package/dist/hooks/Debounce/index.cjs +20 -2
  185. package/dist/hooks/Debounce/index.js +18 -2
  186. package/dist/hooks/ElementObserver/index.cjs +4 -6
  187. package/dist/hooks/ElementObserver/index.d.cts +4 -25
  188. package/dist/hooks/ElementObserver/index.d.ts +4 -25
  189. package/dist/hooks/ElementObserver/index.js +4 -6
  190. package/dist/hooks/GrabAndScroll/index.cjs +1 -1
  191. package/dist/hooks/GrabAndScroll/index.d.cts +2 -2
  192. package/dist/hooks/GrabAndScroll/index.js +1 -1
  193. package/dist/hooks/GraphQLConfig/index.cjs +9 -14
  194. package/dist/hooks/GraphQLConfig/index.d.cts +2 -13
  195. package/dist/hooks/GraphQLConfig/index.d.ts +2 -13
  196. package/dist/hooks/GraphQLConfig/index.js +9 -14
  197. package/dist/hooks/IdentifyUser/index.cjs +19 -19
  198. package/dist/hooks/IdentifyUser/index.js +19 -19
  199. package/dist/hooks/ImageResolver/index.cjs +20 -29
  200. package/dist/hooks/ImageResolver/index.js +20 -29
  201. package/dist/hooks/Intersection/index.cjs +1 -1
  202. package/dist/hooks/Intersection/index.js +1 -1
  203. package/dist/hooks/LocalStorageOperations/index.cjs +8 -7
  204. package/dist/hooks/LocalStorageOperations/index.js +4 -3
  205. package/dist/hooks/MessageFilter/index.cjs +3 -12
  206. package/dist/hooks/MessageFilter/index.d.cts +2 -17
  207. package/dist/hooks/MessageFilter/index.d.ts +2 -17
  208. package/dist/hooks/MessageFilter/index.js +2 -11
  209. package/dist/hooks/NewOrgConfig/index.cjs +14 -18
  210. package/dist/hooks/NewOrgConfig/index.d.cts +3 -16
  211. package/dist/hooks/NewOrgConfig/index.d.ts +3 -16
  212. package/dist/hooks/NewOrgConfig/index.js +14 -18
  213. package/dist/hooks/Search/index.cjs +332 -167
  214. package/dist/hooks/Search/index.d.cts +3 -57
  215. package/dist/hooks/Search/index.d.ts +3 -57
  216. package/dist/hooks/Search/index.js +320 -156
  217. package/dist/hooks/SearchOperations/index.cjs +25 -25
  218. package/dist/hooks/SearchOperations/index.d.cts +2 -3
  219. package/dist/hooks/SearchOperations/index.d.ts +2 -3
  220. package/dist/hooks/SearchOperations/index.js +25 -25
  221. package/dist/hooks/SessionStorageOperations/index.cjs +2 -2
  222. package/dist/hooks/SessionStorageOperations/index.js +2 -2
  223. package/dist/hooks/ShopifyUrlOperations/index.cjs +3 -3
  224. package/dist/hooks/ShopifyUrlOperations/index.d.cts +3 -5
  225. package/dist/hooks/ShopifyUrlOperations/index.d.ts +3 -5
  226. package/dist/hooks/ShopifyUrlOperations/index.js +3 -3
  227. package/dist/hooks/SnapCalculator/index.cjs +1 -1
  228. package/dist/hooks/SnapCalculator/index.d.cts +4 -3
  229. package/dist/hooks/SnapCalculator/index.d.ts +4 -3
  230. package/dist/hooks/SnapCalculator/index.js +1 -1
  231. package/dist/hooks/SystemSettingsContext/index.cjs +17 -6
  232. package/dist/hooks/SystemSettingsContext/index.d.cts +5 -15
  233. package/dist/hooks/SystemSettingsContext/index.d.ts +5 -15
  234. package/dist/hooks/SystemSettingsContext/index.js +15 -6
  235. package/dist/hooks/TrackComponentVisibleEvent/index.cjs +21 -21
  236. package/dist/hooks/TrackComponentVisibleEvent/index.d.cts +2 -3
  237. package/dist/hooks/TrackComponentVisibleEvent/index.d.ts +2 -3
  238. package/dist/hooks/TrackComponentVisibleEvent/index.js +21 -21
  239. package/dist/hooks/UpdateAnalyticsProps/index.cjs +21 -21
  240. package/dist/hooks/UpdateAnalyticsProps/index.js +20 -20
  241. package/dist/hooks/utils.d.cts +20 -13
  242. package/dist/hooks/utils.d.ts +20 -13
  243. package/dist/{index-LTdMHOxj.d.ts → index-B4cSHxVN.d.ts} +1 -1
  244. package/dist/{index-DzbkQtaK.d.cts → index-BQpWG3Jm.d.cts} +1 -1
  245. package/dist/index-BVZbvpx_.d.cts +11 -0
  246. package/dist/index-CEmUfoZa.d.ts +42 -0
  247. package/dist/index-CMZcE7pk.d.cts +224 -0
  248. package/dist/{index-DBqgBV9N.d.ts → index-CYGpI6hE.d.ts} +1 -1
  249. package/dist/{index-9NE86em3.d.cts → index-ClVBVK15.d.cts} +1 -1
  250. package/dist/{index-nDWHlouq.d.ts → index-Clf4wYaJ.d.ts} +1 -1
  251. package/dist/index-DeQte6mb.d.ts +11 -0
  252. package/dist/index-Dzv6WwSZ.d.ts +224 -0
  253. package/dist/{index-FQjyuD3D.d.cts → index-ca7Qn8o0.d.cts} +1 -1
  254. package/dist/{index-DHgVW8ey.d.ts → index-dngXrfnT.d.ts} +1 -1
  255. package/dist/index-qOBU4GEh.d.cts +42 -0
  256. package/dist/{index-Da1s8h5C.d.cts → index-w64il54a.d.cts} +1 -1
  257. package/dist/interceptors/index.cjs +28 -3
  258. package/dist/interceptors/index.d.cts +4 -15
  259. package/dist/interceptors/index.d.ts +4 -15
  260. package/dist/interceptors/index.js +25 -3
  261. package/dist/localStorageContext-DSpmlfyr.js +90 -0
  262. package/dist/localStorageContext-DbWl7Row.cjs +104 -0
  263. package/dist/{logger-TBIl4uIH.cjs → logger-BF6iGSVd.cjs} +1 -1
  264. package/dist/{logger-W3lqg-4b.js → logger-DCs3_11o.js} +1 -1
  265. package/dist/models-158fyHt9.cjs +1305 -0
  266. package/dist/models-DEJUuKYQ.js +1118 -0
  267. package/dist/newOrgConfigAtom-BuQE_zPK.js +8 -0
  268. package/dist/{newOrgConfigAtom-A4BEeHMf.cjs → newOrgConfigAtom-rrYHmp1b.cjs} +1 -1
  269. package/dist/newOrgConfigContext-BVrzYatq.cjs +68 -0
  270. package/dist/newOrgConfigContext-C0LzIRJ7.js +53 -0
  271. package/dist/nodeSelector-CbWcUbuc.d.ts +28 -0
  272. package/dist/nodeSelector-Cj-Xl1LP.d.cts +28 -0
  273. package/dist/org-CVjyv-gv.cjs +111 -0
  274. package/dist/org-Ct9Vjv1J.js +32 -0
  275. package/dist/search-C0TAcTeY.cjs +312 -0
  276. package/dist/search-DLHzcbfP.js +233 -0
  277. package/dist/searchContext-Dmtue5QO.js +129 -0
  278. package/dist/searchContext-l_23fiuP.cjs +145 -0
  279. package/dist/searchServiceAdapter-B0h7psvh.js +16 -0
  280. package/dist/searchServiceAdapter-BclWy4fE.cjs +34 -0
  281. package/dist/sessionStorageContext-BOyr7mIM.cjs +66 -0
  282. package/dist/sessionStorageContext-ClXN9eX4.js +52 -0
  283. package/dist/shopifyUrlContext-G9eqIcsL.cjs +75 -0
  284. package/dist/shopifyUrlContext-WAm0pnPh.js +61 -0
  285. package/dist/src/application/commerce-api.js +406 -0
  286. package/dist/src/application/logging/logger.js +16 -0
  287. package/dist/src/application/models/graphql/index.js +3 -0
  288. package/dist/src/application/models/graphql/queries/getMerchantColorsQuery.js +13 -0
  289. package/dist/src/application/models/graphql/queries/getMerchantFrontendConfigQuery.js +13 -0
  290. package/dist/src/application/models/graphql/queries/getMerchantOrgIdQuery.js +10 -0
  291. package/dist/src/application/models/guards/api/index.js +12 -0
  292. package/dist/src/application/models/guards/api/isApiFormResponse.js +59 -0
  293. package/dist/src/application/models/guards/api/isApiFormSubmittedResponseAttributes.js +22 -0
  294. package/dist/src/application/models/guards/api/isApiOrderResponseAttributes.js +91 -0
  295. package/dist/src/application/models/guards/api/isApiOrgConfigResults.js +188 -0
  296. package/dist/src/application/models/guards/api/isApiOrganizationConfig.js +115 -0
  297. package/dist/src/application/models/guards/api/isApiPDPEventAttributes.js +16 -0
  298. package/dist/src/application/models/guards/api/isApiPLPEventAttributes.js +26 -0
  299. package/dist/src/application/models/guards/api/isApiPageResponseAttributes.js +15 -0
  300. package/dist/src/application/models/guards/api/isApiProductResponseAttributes.js +65 -0
  301. package/dist/src/application/models/guards/api/isApiProductSearchAttributes.js +15 -0
  302. package/dist/src/application/models/guards/api/isApiProductSearchFilterAttributes.js +10 -0
  303. package/dist/src/application/models/guards/api/isApiQueryTypedEventAttributes.js +4 -0
  304. package/dist/src/application/models/guards/api/isApiResponse.js +33 -0
  305. package/dist/src/application/models/guards/api/isApiReviewResponseAttributes.js +22 -0
  306. package/dist/src/application/models/guards/api/isApiReviewRichInformation.js +23 -0
  307. package/dist/src/application/models/guards/api/isApiSearchEventAttributes.js +20 -0
  308. package/dist/src/application/models/guards/api/isApiSuggestion.js +24 -0
  309. package/dist/src/application/models/guards/api/isApiSuggestionClickedEventAttributes.js +4 -0
  310. package/dist/src/application/models/guards/api/isApiTextResponseAttributes.js +4 -0
  311. package/dist/src/application/models/guards/api/isApiUserEvent.js +18 -0
  312. package/dist/src/application/models/guards/graphQL/isGraphQLColorsConfig.js +41 -0
  313. package/dist/src/application/models/guards/isBaseEcommerceEvent.js +14 -0
  314. package/dist/src/application/models/guards/isGA4EcommerceEvent.js +14 -0
  315. package/dist/src/application/models/guards/isLegacyUAEcommerceEvent.js +14 -0
  316. package/dist/src/application/models/guards/isMobilePLPChatPlacementParameter.js +4 -0
  317. package/dist/src/application/models/guards/isSpanxTakeAQuizCtaParameter.js +1 -0
  318. package/dist/src/application/models/guards/isVariantInfo.js +28 -0
  319. package/dist/src/application/models/guards/utils.js +34 -0
  320. package/dist/src/application/models/index.js +34 -0
  321. package/dist/src/application/models/utils/snakeToCamelTransformer.js +71 -0
  322. package/dist/src/application/models/utils/stringToFulfillmentDisplayStatusEnumValue.js +65 -0
  323. package/dist/src/application/models/validators/validateGraphQLColorsConfig.js +9 -0
  324. package/dist/src/application/models/validators/validateGraphQLFrontendConfig.js +420 -0
  325. package/dist/src/application/models/validators/validateGraphQLOrgId.js +6 -0
  326. package/dist/src/application/models/validators/validateMobilePLPChatPlacementParameter.js +9 -0
  327. package/dist/src/application/models/validators/validateOrgConfigResults.js +44 -0
  328. package/dist/src/application/models/validators/validateOrganizationConfig.js +34 -0
  329. package/dist/src/application/models/validators/validateResponse.js +173 -0
  330. package/dist/src/application/models/validators/validateSuggestion.js +13 -0
  331. package/dist/src/application/models/validators/validateUserEvent.js +91 -0
  332. package/dist/src/application/utils/analyticsUtils.js +94 -0
  333. package/dist/src/application/utils/coreContextToApiContext.js +8 -0
  334. package/dist/src/application/utils/coreUserEventToApiUserEvent.js +90 -0
  335. package/dist/src/application/utils/divideArray.js +7 -0
  336. package/dist/src/application/utils/domObserver.js +85 -0
  337. package/dist/src/application/utils/elementObserver.js +186 -0
  338. package/dist/src/application/utils/imageFilter.js +11 -0
  339. package/dist/src/application/utils/index.js +21 -0
  340. package/dist/src/application/utils/merchantUtils.js +15 -0
  341. package/dist/src/application/utils/messageFromFormSubmittedEvent.js +19 -0
  342. package/dist/src/application/utils/messageFromQueryEvent.js +35 -0
  343. package/dist/src/application/utils/messageFromResponse.js +123 -0
  344. package/dist/src/application/utils/messageFromSuggestionEvent.js +27 -0
  345. package/dist/src/application/utils/mouseEventTypes.js +1 -0
  346. package/dist/src/application/utils/mutationHelper.js +33 -0
  347. package/dist/src/application/utils/nextMessageRequestToApiRequest.js +29 -0
  348. package/dist/src/application/utils/nodeSelector.js +101 -0
  349. package/dist/src/application/utils/overrides.js +144 -0
  350. package/dist/src/application/utils/stringUtils.js +47 -0
  351. package/dist/src/application/utils/supportedEventRequestToApiRequest.js +7 -0
  352. package/dist/src/application/utils/urlsParser.js +33 -0
  353. package/dist/src/application/utils/validation.js +5 -0
  354. package/dist/src/atoms/amplitude/amplitudeTrackEventAtom.js +4 -0
  355. package/dist/src/atoms/app/index.js +23 -0
  356. package/dist/src/atoms/app/variant.js +102 -0
  357. package/dist/src/atoms/atomStore/atomStore.js +28 -0
  358. package/dist/src/atoms/atomStore/index.js +1 -0
  359. package/dist/src/atoms/chat/chatState.js +33 -0
  360. package/dist/src/atoms/chat/form.js +16 -0
  361. package/dist/src/atoms/chat/index.js +23 -0
  362. package/dist/src/atoms/chat/lastMessage.js +10 -0
  363. package/dist/src/atoms/chat/messageQueue.js +68 -0
  364. package/dist/src/atoms/chat/performanceMetrics.js +70 -0
  365. package/dist/src/atoms/chat/renderedWidgetRefs.js +24 -0
  366. package/dist/src/atoms/chat/replies.js +43 -0
  367. package/dist/src/atoms/chat/suggestions.js +29 -0
  368. package/dist/src/atoms/envive/enviveConfig.js +67 -0
  369. package/dist/src/atoms/globalSearch/globalSearch.js +8 -0
  370. package/dist/src/atoms/globalSearch/index.js +1 -0
  371. package/dist/src/atoms/org/customerService.js +6 -0
  372. package/dist/src/atoms/org/graphqlConfig.js +8 -0
  373. package/dist/src/atoms/org/index.js +4 -0
  374. package/dist/src/atoms/org/newOrgConfigAtom.js +2 -0
  375. package/dist/src/atoms/org/orgAnalyticsConfig.js +8 -0
  376. package/dist/src/atoms/search/index.js +1 -0
  377. package/dist/src/atoms/search/productFilters.js +163 -0
  378. package/dist/src/atoms/search/productRetrievalAPI.js +50 -0
  379. package/dist/src/atoms/search/productRetrievalAdapter.js +14 -0
  380. package/dist/src/atoms/search/productSorter.js +13 -0
  381. package/dist/src/atoms/search/searchAPI.js +140 -0
  382. package/dist/src/atoms/search/searchServiceAdapter.js +14 -0
  383. package/dist/src/atoms/search/utils.js +15 -0
  384. package/dist/src/config/index.js +1 -0
  385. package/dist/src/config/locators/components/chat/entrypoints.js +10 -0
  386. package/dist/src/config/locators/components/chat/index.js +21 -0
  387. package/dist/src/config/locators/components/chat/preview.js +11 -0
  388. package/dist/src/config/locators/components/chat/variants/index.js +12 -0
  389. package/dist/src/config/locators/components/common/buttons.js +6 -0
  390. package/dist/src/config/locators/components/common/cards.js +17 -0
  391. package/dist/src/config/locators/components/common/index.js +4 -0
  392. package/dist/src/config/locators/components/common/links.js +1 -0
  393. package/dist/src/config/locators/components/common/tables.js +1 -0
  394. package/dist/src/config/locators/components/floating-button.js +2 -0
  395. package/dist/src/config/locators/components/index.js +3 -0
  396. package/dist/src/config/locators/components/report-issue.js +13 -0
  397. package/dist/src/config/locators/components/search/index.js +5 -0
  398. package/dist/src/config/locators/components/shadow-dom.js +1 -0
  399. package/dist/src/config/locators/embedded.js +20 -0
  400. package/dist/src/config/locators/index.js +4 -0
  401. package/dist/src/contexts/amplitudeContext/amplitudeContext.js +292 -0
  402. package/dist/src/contexts/amplitudeContext/index.js +1 -0
  403. package/dist/src/contexts/cdnContext/cdnContext.js +28 -0
  404. package/dist/src/contexts/cdnContext/index.js +1 -0
  405. package/dist/src/contexts/enviveConfigContext/enviveConfigContext.js +37 -0
  406. package/dist/src/contexts/enviveConfigContext/index.js +1 -0
  407. package/dist/src/contexts/enviveCssContext/enviveCssContext.js +31 -0
  408. package/dist/src/contexts/enviveCssContext/index.js +1 -0
  409. package/dist/src/contexts/featureFlagContext/featureFlagContext.js +109 -0
  410. package/dist/src/contexts/featureFlagContext/index.js +1 -0
  411. package/dist/src/contexts/featureFlagServiceContext/featureFlagServiceContext.js +47 -0
  412. package/dist/src/contexts/featureFlagServiceContext/index.js +1 -0
  413. package/dist/src/contexts/graphqlContext/graphqlContext.js +87 -0
  414. package/dist/src/contexts/graphqlContext/index.js +1 -0
  415. package/dist/src/contexts/localStorageContext/index.js +1 -0
  416. package/dist/src/contexts/localStorageContext/localStorageContext.js +95 -0
  417. package/dist/src/contexts/newOrgConfigContext/index.js +1 -0
  418. package/dist/src/contexts/newOrgConfigContext/newOrgConfigContext.js +33 -0
  419. package/dist/src/contexts/searchContext/index.js +1 -0
  420. package/dist/src/contexts/searchContext/searchContext.js +131 -0
  421. package/dist/src/contexts/sessionStorageContext/index.js +1 -0
  422. package/dist/src/contexts/sessionStorageContext/sessionStorageContext.js +43 -0
  423. package/dist/src/contexts/shopifyUrlContext/index.js +1 -0
  424. package/dist/src/contexts/shopifyUrlContext/shopifyUrlContext.js +62 -0
  425. package/dist/src/contexts/systemSettingsContext/index.js +1 -0
  426. package/dist/src/contexts/systemSettingsContext/systemSettingsContext.js +29 -0
  427. package/dist/src/contexts/userIdentityContext/index.js +1 -0
  428. package/dist/src/contexts/userIdentityContext/userIdentityContext.js +118 -0
  429. package/dist/src/events/index.js +51 -0
  430. package/dist/src/events/registerAnalyticsListeners.js +32 -0
  431. package/dist/src/exceptions/index.js +2 -0
  432. package/dist/src/exceptions/sessionExceptions.js +6 -0
  433. package/dist/src/exceptions/unsupportedProductExceptions.js +6 -0
  434. package/dist/src/hooks/AmplitudeOperations/index.js +1 -0
  435. package/dist/src/hooks/AmplitudeOperations/useAmplitudeOperations.js +24 -0
  436. package/dist/src/hooks/AppDetails/index.js +1 -0
  437. package/dist/src/hooks/AppDetails/useAppDetails.js +26 -0
  438. package/dist/src/hooks/BlockBackButton/index.js +1 -0
  439. package/dist/src/hooks/BlockBackButton/useBlockBackButton.js +23 -0
  440. package/dist/src/hooks/CdnOperations/index.js +1 -0
  441. package/dist/src/hooks/CdnOperations/useCdnOperations.js +13 -0
  442. package/dist/src/hooks/ChatToggle/index.js +1 -0
  443. package/dist/src/hooks/ChatToggle/useChatToggle.js +50 -0
  444. package/dist/src/hooks/ChatToggleAnalytics/index.js +1 -0
  445. package/dist/src/hooks/ChatToggleAnalytics/useChatToggleAnalytics.js +11 -0
  446. package/dist/src/hooks/CustomerSupportHandoff/index.js +1 -0
  447. package/dist/src/hooks/CustomerSupportHandoff/useCustomerSupportHandoff.js +32 -0
  448. package/dist/src/hooks/Debounce/index.js +1 -0
  449. package/dist/src/hooks/Debounce/useDebounce.js +13 -0
  450. package/dist/src/hooks/ElementObserver/index.js +1 -0
  451. package/dist/src/hooks/ElementObserver/useElementObserver.js +208 -0
  452. package/dist/src/hooks/GrabAndScroll/index.js +1 -0
  453. package/dist/src/hooks/GrabAndScroll/useGrabAndScroll.js +105 -0
  454. package/dist/src/hooks/GraphQLConfig/index.js +1 -0
  455. package/dist/src/hooks/GraphQLConfig/useGraphQLConfig.js +54 -0
  456. package/dist/src/hooks/IdentifyUser/index.js +1 -0
  457. package/dist/src/hooks/IdentifyUser/useIdentifyUser.js +28 -0
  458. package/dist/src/hooks/ImageResolver/index.js +1 -0
  459. package/dist/src/hooks/ImageResolver/useImageResolver.js +45 -0
  460. package/dist/src/hooks/Intersection/index.js +1 -0
  461. package/dist/src/hooks/Intersection/useIntersection.js +20 -0
  462. package/dist/src/hooks/IsSmallScreen/index.js +1 -0
  463. package/dist/src/hooks/IsSmallScreen/useIsSmallScreen.js +16 -0
  464. package/dist/src/hooks/LocalStorageOperations/index.js +1 -0
  465. package/dist/src/hooks/LocalStorageOperations/useLocalStorageOperations.js +64 -0
  466. package/dist/src/hooks/MessageFilter/index.js +1 -0
  467. package/dist/src/hooks/MessageFilter/useMessageFilter.js +37 -0
  468. package/dist/src/hooks/MessageScrollObserver/index.js +1 -0
  469. package/dist/src/hooks/MessageScrollObserver/useMessageScrollObserver.js +35 -0
  470. package/dist/src/hooks/NewOrgConfig/index.js +1 -0
  471. package/dist/src/hooks/NewOrgConfig/useNewOrgConfig.js +5 -0
  472. package/dist/src/hooks/Search/index.js +1 -0
  473. package/dist/src/hooks/Search/useRecommendedProducts.js +35 -0
  474. package/dist/src/hooks/Search/useSearch.js +224 -0
  475. package/dist/src/hooks/Search/useSearchInput.js +183 -0
  476. package/dist/src/hooks/SearchOperations/index.js +1 -0
  477. package/dist/src/hooks/SearchOperations/useSearchOperations.js +78 -0
  478. package/dist/src/hooks/SessionStorageOperations/index.js +1 -0
  479. package/dist/src/hooks/SessionStorageOperations/useSessionStorageOperations.js +20 -0
  480. package/dist/src/hooks/ShopifyUrlOperations/index.js +1 -0
  481. package/dist/src/hooks/ShopifyUrlOperations/useShopifyUrlOperations.js +34 -0
  482. package/dist/src/hooks/SnapCalculator/index.js +1 -0
  483. package/dist/src/hooks/SnapCalculator/useSnapCalculator.js +22 -0
  484. package/dist/src/hooks/SystemSettingsContext/index.js +1 -0
  485. package/dist/src/hooks/SystemSettingsContext/useSystemSettingsContext.js +9 -0
  486. package/dist/src/hooks/TrackComponentVisibleEvent/index.js +1 -0
  487. package/dist/src/hooks/TrackComponentVisibleEvent/useTrackComponentVisibleEvent.js +45 -0
  488. package/dist/src/hooks/UpdateAnalyticsProps/index.js +1 -0
  489. package/dist/src/hooks/UpdateAnalyticsProps/useUpdateAnalyticsProps.js +43 -0
  490. package/dist/src/hooks/utils.js +116 -0
  491. package/dist/src/interceptors/index.js +1 -0
  492. package/dist/src/interceptors/useMessageInterceptor.js +24 -0
  493. package/dist/src/types/ApiResponse.js +1 -0
  494. package/dist/src/types/FilterAttribute.js +3 -0
  495. package/dist/src/types/Message.js +24 -0
  496. package/dist/src/types/Suggestion.js +3 -0
  497. package/dist/src/types/index.js +4 -0
  498. package/dist/src/util/colorVar.js +3 -0
  499. package/dist/src/util/configVersion.js +4 -0
  500. package/dist/src/util/domInsertion.js +16 -0
  501. package/dist/systemSettingsContext-Cb5kczBD.cjs +60 -0
  502. package/dist/systemSettingsContext-CksCdpiU.js +39 -0
  503. package/dist/types/index.cjs +3 -33
  504. package/dist/types/index.d.cts +2 -3
  505. package/dist/types/index.d.ts +2 -3
  506. package/dist/types/index.js +2 -30
  507. package/dist/types-18QXD2rd.cjs +39 -0
  508. package/dist/types-DQC1pHqD.js +27 -0
  509. package/dist/urlsParser-C-Vzs--G.cjs +78 -0
  510. package/dist/urlsParser-G7Ocwg0M.js +42 -0
  511. package/dist/useAppDetails-BJFRSYbI.js +30 -0
  512. package/dist/useAppDetails-Czn-5FzP.cjs +38 -0
  513. package/dist/useGraphQLConfig-BEtX5pDM.cjs +76 -0
  514. package/dist/useGraphQLConfig-Dkcrz1YL.js +63 -0
  515. package/dist/{useIntersection-BJRFGG0f.js → useIntersection-BWiHkpKL.js} +1 -1
  516. package/dist/{useIntersection-CYRvxtRN.cjs → useIntersection-DZHz44BY.cjs} +1 -1
  517. package/dist/{utils-DIvMgPe8.js → utils-CEKzBcN2.js} +1 -1
  518. package/dist/utils-CPvqOk0g.cjs +1546 -0
  519. package/dist/{utils-Buo4KU5l.cjs → utils-CqVRbvfN.cjs} +1 -1
  520. package/dist/{utils-CDw74BCO.cjs → utils-CsMbZmRw.cjs} +1 -1
  521. package/dist/{utils-BRNaQkCK.js → utils-DQhbbAnt.js} +1 -1
  522. package/dist/utils-D_kATUj6.js +1 -1
  523. package/dist/utils-N47VsL9W.js +1364 -0
  524. package/dist/utils-hYTjy7hJ.cjs +1 -1
  525. package/dist/{utils-DyTiotQz.d.ts → utils-wWki3L1d.d.ts} +1 -1
  526. package/package.json +7 -25
  527. package/src/application/commerce-api.ts +38 -37
  528. package/src/application/models/graphql/index.ts +1 -0
  529. package/src/application/models/graphql/queries/getMerchantColorsQuery.ts +1 -23
  530. package/src/application/models/graphql/queries/getMerchantFrontendConfigQuery.ts +1 -89
  531. package/src/application/models/guards/api/isApiFormResponse.ts +4 -4
  532. package/src/application/models/guards/api/isApiFormSubmittedResponseAttributes.ts +2 -2
  533. package/src/application/models/guards/api/isApiOrderResponseAttributes.ts +2 -20
  534. package/src/application/models/guards/api/isApiOrgConfigResults.ts +3 -9
  535. package/src/application/models/guards/api/isApiOrganizationConfig.ts +8 -32
  536. package/src/application/models/guards/api/isApiPDPEventAttributes.ts +8 -5
  537. package/src/application/models/guards/api/isApiPLPEventAttributes.ts +14 -10
  538. package/src/application/models/guards/api/isApiPageResponseAttributes.ts +1 -1
  539. package/src/application/models/guards/api/isApiProductResponseAttributes.ts +2 -4
  540. package/src/application/models/guards/api/isApiProductSearchAttributes.ts +9 -6
  541. package/src/application/models/guards/api/isApiProductSearchFilterAttributes.ts +7 -4
  542. package/src/application/models/guards/api/isApiQueryTypedEventAttributes.ts +8 -3
  543. package/src/application/models/guards/api/isApiResponse.ts +22 -15
  544. package/src/application/models/guards/api/isApiReviewResponseAttributes.ts +1 -1
  545. package/src/application/models/guards/api/isApiReviewRichInformation.ts +1 -1
  546. package/src/application/models/guards/api/isApiTextResponseAttributes.ts +1 -1
  547. package/src/application/models/guards/graphQL/isGraphQLColorsConfig.ts +1 -1
  548. package/src/application/models/guards/isBaseEcommerceEvent.ts +1 -2
  549. package/src/application/models/guards/isGA4EcommerceEvent.ts +1 -1
  550. package/src/application/models/guards/isLegacyUAEcommerceEvent.ts +1 -1
  551. package/src/application/models/guards/isMobilePLPChatPlacementParameter.ts +1 -3
  552. package/src/application/models/guards/isSpanxTakeAQuizCtaParameter.ts +5 -3
  553. package/src/application/models/guards/isVariantInfo.ts +6 -1
  554. package/src/application/models/index.ts +30 -95
  555. package/src/application/models/utils/snakeToCamelTransformer.ts +8 -8
  556. package/src/application/models/validators/validateGraphQLColorsConfig.ts +6 -2
  557. package/src/application/models/validators/validateGraphQLFrontendConfig.ts +6 -6
  558. package/src/application/models/validators/validateMobilePLPChatPlacementParameter.ts +5 -3
  559. package/src/application/models/validators/validateOrgConfigResults.ts +6 -5
  560. package/src/application/models/validators/validateOrganizationConfig.ts +11 -8
  561. package/src/application/models/validators/validateResponse.ts +66 -44
  562. package/src/application/models/validators/validateSuggestion.ts +1 -1
  563. package/src/application/models/validators/validateUserEvent.ts +23 -12
  564. package/src/application/utils/analyticsUtils.ts +16 -38
  565. package/src/application/utils/coreContextToApiContext.ts +3 -1
  566. package/src/application/utils/coreUserEventToApiUserEvent.ts +2 -2
  567. package/src/application/utils/elementObserver.ts +1 -1
  568. package/src/application/utils/imageFilter.ts +5 -2
  569. package/src/application/utils/index.ts +20 -21
  570. package/src/application/utils/messageFromFormSubmittedEvent.ts +1 -1
  571. package/src/application/utils/messageFromQueryEvent.ts +1 -1
  572. package/src/application/utils/messageFromResponse.ts +14 -10
  573. package/src/application/utils/messageFromSuggestionEvent.ts +6 -4
  574. package/src/application/utils/mouseEventTypes.ts +1 -1
  575. package/src/application/utils/nextMessageRequestToApiRequest.ts +1 -1
  576. package/src/application/utils/overrides.ts +1 -49
  577. package/src/application/utils/supportedEventRequestToApiRequest.ts +3 -1
  578. package/src/application/utils/urlsParser.ts +1 -7
  579. package/src/atoms/app/index.ts +15 -25
  580. package/src/atoms/app/variant.ts +1 -1
  581. package/src/atoms/chat/chatState.ts +9 -14
  582. package/src/atoms/chat/form.ts +1 -1
  583. package/src/atoms/chat/messageQueue.ts +25 -50
  584. package/src/atoms/chat/replies.ts +40 -43
  585. package/src/atoms/chat/suggestions.ts +34 -29
  586. package/src/atoms/envive/enviveConfig.ts +14 -20
  587. package/src/atoms/org/customerService.ts +4 -8
  588. package/src/atoms/org/graphqlConfig.ts +7 -15
  589. package/src/atoms/org/index.ts +4 -6
  590. package/src/atoms/org/newOrgConfigAtom.ts +2 -2
  591. package/src/atoms/org/orgAnalyticsConfig.ts +1 -1
  592. package/src/atoms/search/index.ts +0 -1
  593. package/src/atoms/search/productFilters.ts +72 -52
  594. package/src/atoms/search/productRetrievalAPI.ts +72 -0
  595. package/src/atoms/search/productRetrievalAdapter.ts +28 -0
  596. package/src/atoms/search/productSorter.ts +2 -2
  597. package/src/atoms/search/searchAPI.ts +42 -60
  598. package/src/atoms/search/searchServiceAdapter.ts +1 -1
  599. package/src/contexts/amplitudeContext/amplitudeContext.tsx +104 -143
  600. package/src/contexts/cdnContext/cdnContext.tsx +9 -16
  601. package/src/contexts/enviveConfigContext/enviveConfigContext.tsx +6 -27
  602. package/src/contexts/enviveCssContext/enviveCssContext.tsx +5 -12
  603. package/src/contexts/featureFlagContext/featureFlagContext.tsx +27 -48
  604. package/src/contexts/featureFlagServiceContext/featureFlagServiceContext.tsx +11 -3
  605. package/src/contexts/graphqlContext/graphqlContext.tsx +40 -95
  606. package/src/contexts/localStorageContext/localStorageContext.tsx +26 -60
  607. package/src/contexts/newOrgConfigContext/newOrgConfigContext.tsx +10 -22
  608. package/src/contexts/searchContext/searchContext.tsx +29 -49
  609. package/src/contexts/sessionStorageContext/sessionStorageContext.tsx +12 -33
  610. package/src/contexts/shopifyUrlContext/shopifyUrlContext.tsx +20 -37
  611. package/src/contexts/systemSettingsContext/systemSettingsContext.tsx +8 -21
  612. package/src/contexts/userIdentityContext/userIdentityContext.tsx +33 -77
  613. package/src/events/index.ts +8 -5
  614. package/src/events/registerAnalyticsListeners.ts +10 -13
  615. package/src/exceptions/index.ts +2 -0
  616. package/src/{types/exceptions → exceptions}/unsupportedProductExceptions.ts +2 -2
  617. package/src/global.d.ts +8 -0
  618. package/src/hooks/AmplitudeOperations/useAmplitudeOperations.ts +6 -11
  619. package/src/hooks/AppDetails/useAppDetails.ts +10 -24
  620. package/src/hooks/ChatToggle/useChatToggle.ts +7 -19
  621. package/src/hooks/ChatToggleAnalytics/useChatToggleAnalytics.ts +4 -4
  622. package/src/hooks/CustomerSupportHandoff/useCustomerSupportHandoff.ts +1 -1
  623. package/src/hooks/ElementObserver/useElementObserver.ts +14 -32
  624. package/src/hooks/GrabAndScroll/useGrabAndScroll.ts +125 -124
  625. package/src/hooks/GraphQLConfig/useGraphQLConfig.ts +5 -7
  626. package/src/hooks/ImageResolver/useImageResolver.ts +24 -31
  627. package/src/hooks/LocalStorageOperations/useLocalStorageOperations.ts +12 -19
  628. package/src/hooks/MessageFilter/useMessageFilter.ts +1 -7
  629. package/src/hooks/Search/useRecommendedProducts.ts +50 -0
  630. package/src/hooks/Search/useSearch.tsx +80 -210
  631. package/src/hooks/Search/useSearchInput.ts +227 -0
  632. package/src/hooks/SearchOperations/useSearchOperations.ts +8 -12
  633. package/src/hooks/ShopifyUrlOperations/useShopifyUrlOperations.ts +8 -14
  634. package/src/hooks/SnapCalculator/useSnapCalculator.ts +1 -2
  635. package/src/hooks/TrackComponentVisibleEvent/useTrackComponentVisibleEvent.ts +8 -11
  636. package/src/hooks/UpdateAnalyticsProps/useUpdateAnalyticsProps.ts +11 -25
  637. package/src/hooks/utils.ts +19 -29
  638. package/src/interceptors/index.ts +1 -2
  639. package/src/interceptors/useMessageInterceptor.ts +10 -6
  640. package/src/{application/models/api/response.ts → types/ApiResponse.ts} +35 -29
  641. package/src/types/FilterAttribute.ts +35 -0
  642. package/src/{application/models/message.ts → types/Message.ts} +38 -34
  643. package/src/types/Suggestion.ts +6 -0
  644. package/src/types/index.ts +4 -4
  645. package/src/util/colorVar.ts +4 -0
  646. package/src/util/configVersion.ts +4 -0
  647. package/src/util/domInsertion.ts +17 -0
  648. package/dist/SystemSettingsContext-CO5c1L62.cjs +0 -20
  649. package/dist/SystemSettingsContext-CXmUlH8i.js +0 -13
  650. package/dist/TrackComponentVisibleEvent-B0WO3ArV.js +0 -52
  651. package/dist/TrackComponentVisibleEvent-LRE9MYzL.cjs +0 -59
  652. package/dist/amplitudeContext-B73xamNe.d.cts +0 -52
  653. package/dist/amplitudeContext-DXnJi0V1.d.ts +0 -52
  654. package/dist/api-BWSsazAG.js +0 -166
  655. package/dist/api-DeW6rHj3.cjs +0 -239
  656. package/dist/application/models/utilityTypes/index.cjs +0 -1
  657. package/dist/application/models/utilityTypes/index.d.cts +0 -2
  658. package/dist/application/models/utilityTypes/index.d.ts +0 -2
  659. package/dist/application/models/utilityTypes/index.js +0 -3
  660. package/dist/application/models/variantInfo/index.cjs +0 -3
  661. package/dist/application/models/variantInfo/index.d.cts +0 -2
  662. package/dist/application/models/variantInfo/index.d.ts +0 -2
  663. package/dist/application/models/variantInfo/index.js +0 -3
  664. package/dist/atoms/search/types.cjs +0 -5
  665. package/dist/atoms/search/types.d.cts +0 -2
  666. package/dist/atoms/search/types.d.ts +0 -2
  667. package/dist/atoms/search/types.js +0 -3
  668. package/dist/cdnContext-CH_-ssYa.js +0 -38
  669. package/dist/cdnContext-D7kHxOzE.cjs +0 -53
  670. package/dist/chat-CqPuT9_V.cjs +0 -393
  671. package/dist/chat-DH70QqJp.js +0 -257
  672. package/dist/chatElementDisplayLocation-BoE6DEdv.d.ts +0 -25
  673. package/dist/chatElementDisplayLocation-DWmfNX_u.d.cts +0 -25
  674. package/dist/chatSearch-BQCZI8MJ.cjs +0 -418
  675. package/dist/chatSearch-D8xCWU8m.js +0 -295
  676. package/dist/chatState-CcFtSqJT.cjs +0 -120
  677. package/dist/chatState-DKnNHmwe.js +0 -34
  678. package/dist/contexts/chatContext/index.cjs +0 -326
  679. package/dist/contexts/chatContext/index.d.cts +0 -15
  680. package/dist/contexts/chatContext/index.d.ts +0 -15
  681. package/dist/contexts/chatContext/index.js +0 -319
  682. package/dist/contexts/types.cjs +0 -7
  683. package/dist/contexts/types.d.cts +0 -4
  684. package/dist/contexts/types.d.ts +0 -4
  685. package/dist/contexts/types.js +0 -3
  686. package/dist/domObserver-Bqf3ooj8.cjs +0 -304
  687. package/dist/enviveConfig-DZBohDpc.js +0 -62
  688. package/dist/enviveConfig-Dv9-esGV.cjs +0 -130
  689. package/dist/enviveConfigContext-D2OELZDR.cjs +0 -60
  690. package/dist/enviveConfigContext-DrDjCems.js +0 -45
  691. package/dist/events-DYY4l817.cjs +0 -90
  692. package/dist/events-DyUix-Bn.js +0 -78
  693. package/dist/featureFlagServiceContext-CJyYItqu.cjs +0 -62
  694. package/dist/featureFlagServiceContext-C_2m4wPL.d.ts +0 -23
  695. package/dist/featureFlagServiceContext-CiKWV306.d.cts +0 -23
  696. package/dist/featureFlagServiceContext-FBM6DdMJ.js +0 -42
  697. package/dist/featureGates-KEwAL8p_.js +0 -26
  698. package/dist/featureGates-qU_ulhpC.cjs +0 -32
  699. package/dist/frontendConfig-CymUbclV.d.ts +0 -856
  700. package/dist/frontendConfig-tVg0hsWZ.d.cts +0 -856
  701. package/dist/graphql-3PxNRFOc.js +0 -36
  702. package/dist/graphql-DGYfelZp.cjs +0 -53
  703. package/dist/graphqlConfig-GHZ1UgCw.cjs +0 -73
  704. package/dist/graphqlConfig-mDg6J44N.js +0 -24
  705. package/dist/graphqlContext-BZPEAFSR.cjs +0 -111
  706. package/dist/graphqlContext-Bf3E-V2T.d.cts +0 -28
  707. package/dist/graphqlContext-CQikpV_I.d.ts +0 -28
  708. package/dist/graphqlContext-eaZPxgRE.js +0 -96
  709. package/dist/index-BVf069X-.d.ts +0 -184
  710. package/dist/index-B_KJB5L_.d.cts +0 -186
  711. package/dist/index-BkLv_fCu.d.ts +0 -186
  712. package/dist/index-Bmub8e38.d.cts +0 -98
  713. package/dist/index-C0eAp5f5.d.ts +0 -98
  714. package/dist/index-CESxqFso.d.cts +0 -228
  715. package/dist/index-CG3P8xE1.d.cts +0 -676
  716. package/dist/index-CJc7_j_v.d.ts +0 -44
  717. package/dist/index-CiWEYzXl.d.cts +0 -184
  718. package/dist/index-Cyq5HiC0.d.cts +0 -44
  719. package/dist/index-DL2ODEnw.d.ts +0 -1
  720. package/dist/index-DgjDuQl4.d.ts +0 -676
  721. package/dist/index-RcVcRKH7.d.cts +0 -1
  722. package/dist/index-vP8BKdxl.d.ts +0 -228
  723. package/dist/interceptors/types.cjs +0 -1
  724. package/dist/interceptors/types.d.cts +0 -13
  725. package/dist/interceptors/types.d.ts +0 -13
  726. package/dist/interceptors/types.js +0 -3
  727. package/dist/localStorageContext-BPZ82q-G.js +0 -95
  728. package/dist/localStorageContext-NRP-CdmF.cjs +0 -115
  729. package/dist/models-D-4db7XW.cjs +0 -1537
  730. package/dist/models-c86hYW-F.js +0 -1296
  731. package/dist/newOrgConfigAtom-OzAyrPS8.js +0 -8
  732. package/dist/newOrgConfigContext-DOdUxlOE.d.cts +0 -16
  733. package/dist/newOrgConfigContext-DX9iqIIK.cjs +0 -68
  734. package/dist/newOrgConfigContext-aqN8Tu79.js +0 -53
  735. package/dist/newOrgConfigContext-jphS5d4K.d.ts +0 -16
  736. package/dist/nodeSelector-B3bPtEjX.d.cts +0 -31
  737. package/dist/nodeSelector-Dcn3_NrZ.d.ts +0 -31
  738. package/dist/org-Bq2KsJSp.cjs +0 -43
  739. package/dist/org-gtWmGw4K.js +0 -12
  740. package/dist/search-BQPMtze5.cjs +0 -205
  741. package/dist/search-CIrqYYMI.d.ts +0 -20
  742. package/dist/search-PXzaYtZj.js +0 -126
  743. package/dist/search-filter-types-BhK20ts3.d.ts +0 -102
  744. package/dist/search-filter-types-BxaNSLs_.d.cts +0 -102
  745. package/dist/search-y-ioX5Mz.d.cts +0 -20
  746. package/dist/searchContext-CmsLR6Ka.cjs +0 -145
  747. package/dist/searchContext-NPfqMf6b.js +0 -129
  748. package/dist/searchServiceAdapter-BczodJGV.cjs +0 -34
  749. package/dist/searchServiceAdapter-BuEHFG5t.js +0 -16
  750. package/dist/sessionStorageContext-C1u04nAK.js +0 -52
  751. package/dist/sessionStorageContext-Cy8xc9-3.cjs +0 -66
  752. package/dist/shopifyUrlContext-CUyq3f27.cjs +0 -75
  753. package/dist/shopifyUrlContext-DTLlqlMj.js +0 -61
  754. package/dist/spiffyWidgets-BnkP5kXf.d.ts +0 -20
  755. package/dist/spiffyWidgets-BuS00VaQ.d.cts +0 -20
  756. package/dist/systemSettingsContext-Ba-wi2NZ.cjs +0 -60
  757. package/dist/systemSettingsContext-DumUaV0m.js +0 -39
  758. package/dist/test-types-DbrKQIqB.d.ts +0 -40
  759. package/dist/test-types-ThQiO_cc.d.cts +0 -40
  760. package/dist/types-BWzwd0Qc.js +0 -30
  761. package/dist/types-CEx2uKKS.d.ts +0 -51
  762. package/dist/types-CKMMb_gX.d.cts +0 -51
  763. package/dist/types-CKPddlfS.cjs +0 -0
  764. package/dist/types-CtUb63bt.js +0 -76
  765. package/dist/types-Cz8CaPUQ.cjs +0 -48
  766. package/dist/types-Dc6hx6ei.js +0 -1
  767. package/dist/types-Mwm0bS2l.d.ts +0 -10
  768. package/dist/types-UUvB6h05.cjs +0 -106
  769. package/dist/types-zQGBI-Yo.d.cts +0 -10
  770. package/dist/types.cjs +0 -0
  771. package/dist/types.d.cts +0 -15
  772. package/dist/types.d.ts +0 -15
  773. package/dist/types.js +0 -1
  774. package/dist/urlsParser-COzMdJaX.cjs +0 -78
  775. package/dist/urlsParser-DxjoLj98.js +0 -42
  776. package/dist/useAmplitudeOperations-Cv0fi3uj.cjs +0 -41
  777. package/dist/useAmplitudeOperations-Ti6phPPq.js +0 -34
  778. package/dist/useAppDetails-BgqbPlfR.cjs +0 -38
  779. package/dist/useAppDetails-DnKGYtCd.js +0 -30
  780. package/dist/useDebounce-BV7B-Jz3.js +0 -19
  781. package/dist/useDebounce-vU5iW5sa.cjs +0 -26
  782. package/dist/useGraphQLConfig-BizpCw23.cjs +0 -76
  783. package/dist/useGraphQLConfig-DFWl9Z89.js +0 -63
  784. package/dist/useMessageInterceptor-BjGP_uXm.js +0 -25
  785. package/dist/useMessageInterceptor-arAqUq1Q.cjs +0 -33
  786. package/dist/userIdentityContext-BvsEnQVX.d.ts +0 -20
  787. package/dist/userIdentityContext-D2oFVFzo.d.cts +0 -20
  788. package/dist/utilityTypes-B2KuRn37.js +0 -1
  789. package/dist/utilityTypes-BGbL2WTP.cjs +0 -0
  790. package/dist/utils-B7PAzB_M.d.cts +0 -22
  791. package/dist/utils-CLGXsOwE.cjs +0 -1591
  792. package/dist/utils-CrQ0h9tc.d.ts +0 -22
  793. package/dist/utils-jYtD3hmA.js +0 -1385
  794. package/dist/variantInfo-BfKlkaWU.js +0 -11
  795. package/dist/variantInfo-DpLn4nHz.cjs +0 -17
  796. package/src/application/models/api/context.ts +0 -4
  797. package/src/application/models/api/generationParams.ts +0 -4
  798. package/src/application/models/api/nextMessageRequest.ts +0 -11
  799. package/src/application/models/api/orgAnalyticsConfig.ts +0 -19
  800. package/src/application/models/api/orgConfigResults.ts +0 -44
  801. package/src/application/models/api/organizationConfig.ts +0 -12
  802. package/src/application/models/api/responseGenerics.ts +0 -67
  803. package/src/application/models/api/search.ts +0 -26
  804. package/src/application/models/api/suggestion.ts +0 -4
  805. package/src/application/models/api/supportedEventRequest.ts +0 -8
  806. package/src/application/models/api/userEvent.ts +0 -101
  807. package/src/application/models/cachedValue.ts +0 -8
  808. package/src/application/models/chatElementDisplayLocation.ts +0 -22
  809. package/src/application/models/clientDetails.ts +0 -18
  810. package/src/application/models/colorsConfig.ts +0 -28
  811. package/src/application/models/conversationalSearchIds.ts +0 -5
  812. package/src/application/models/dataLayer.ts +0 -45
  813. package/src/application/models/events.ts +0 -5
  814. package/src/application/models/featureGates.ts +0 -21
  815. package/src/application/models/frontendConfig.ts +0 -14
  816. package/src/application/models/googleAnalyticsEvents.ts +0 -8
  817. package/src/application/models/localStorageEventListener.ts +0 -4
  818. package/src/application/models/mobilePLPChatPlacementParameter.ts +0 -3
  819. package/src/application/models/orgsEnum.ts +0 -36
  820. package/src/application/models/productExperiment.ts +0 -5
  821. package/src/application/models/spanxTakeAQuizCtaParameter.ts +0 -4
  822. package/src/application/models/spiffyWidgets.ts +0 -16
  823. package/src/application/models/utilityTypes/camelCase.ts +0 -87
  824. package/src/application/models/utilityTypes/camelCasedPropertiesDeep.ts +0 -80
  825. package/src/application/models/utilityTypes/delimiterCase.ts +0 -121
  826. package/src/application/models/utilityTypes/delimiterCasedPropertiesDeep.ts +0 -98
  827. package/src/application/models/utilityTypes/index.ts +0 -1
  828. package/src/application/models/utilityTypes/internal.ts +0 -93
  829. package/src/application/models/utilityTypes/primitive.ts +0 -8
  830. package/src/application/models/utilityTypes/snakeCasedPropertiesDeep.ts +0 -49
  831. package/src/application/models/utilityTypes/splitWords.ts +0 -76
  832. package/src/application/models/utilityTypes/trim.ts +0 -28
  833. package/src/application/models/utilityTypes/unknownArray.ts +0 -25
  834. package/src/application/models/variantInfo/index.ts +0 -1
  835. package/src/application/models/variantInfo/pageVisitInfo.ts +0 -6
  836. package/src/application/models/variantInfo/plpInfo.ts +0 -3
  837. package/src/application/models/variantInfo/productInfo.ts +0 -5
  838. package/src/application/models/variantInfo/variantInfo.ts +0 -29
  839. package/src/application/utils/__tests__/divideArrays.test.ts +0 -14
  840. package/src/application/utils/cdnUtils.ts +0 -11
  841. package/src/atoms/search/chatSearch.ts +0 -317
  842. package/src/atoms/search/types.ts +0 -55
  843. package/src/config/divIds.ts +0 -27
  844. package/src/config/socialProofClasses.ts +0 -17
  845. package/src/contexts/chatContext/chatContext.tsx +0 -509
  846. package/src/contexts/chatContext/index.ts +0 -1
  847. package/src/contexts/types.ts +0 -1066
  848. package/src/events/event-types.ts +0 -11
  849. package/src/interceptors/types.ts +0 -6
  850. package/src/merchants/domInsertion.ts +0 -30
  851. package/src/merchants/gridInsertion.ts +0 -19
  852. package/src/types/config-versions.ts +0 -6
  853. package/src/types/customerService.ts +0 -31
  854. package/src/types/custservice-types.ts +0 -28
  855. package/src/types/search-filter-types.ts +0 -111
  856. package/src/types/suggestionBarV2-types.ts +0 -4
  857. package/src/types/test-types.ts +0 -3
  858. package/src/types.ts +0 -11
  859. /package/dist/{AmplitudeOperations-BEGeYKG5.cjs → featureFlagServiceContext-B4ash4vz.cjs} +0 -0
  860. /package/dist/{AmplitudeOperations-CWI4yjZ4.js → featureFlagServiceContext-bI7ZLz4r.js} +0 -0
  861. /package/src/{types/exceptions → exceptions}/sessionExceptions.ts +0 -0
@@ -1,1066 +0,0 @@
1
- import { ChatElementDisplayLocation } from "src/application/models/chatElementDisplayLocation";
2
- import {
3
- ColorMapping,
4
- ColorNames,
5
- colorVar,
6
- } from "src/application/models/colorsConfig";
7
- import { FeatureGates } from "src/application/models/featureGates";
8
- import {
9
- CustomerServiceIntegrationMode,
10
- CustomerServiceType,
11
- } from "src/types/customerService";
12
- import { GridInsertionType } from "src/merchants/gridInsertion";
13
- import { DOMInsertionType } from "src/merchants/domInsertion";
14
-
15
- import type {
16
- PageVisitCategory,
17
- SupportedEventProductCategory,
18
- } from "@spiffy-ai/commerce-api-client";
19
- import { ChatState } from "src/types/custservice-types";
20
- import { SuggestionBarLocationForMetrics } from "src/types/suggestionBarV2-types";
21
- import { TestProps } from "src/types/test-types";
22
- import { OrgConfigFeatureGate } from "src/application/models/api/orgConfigResults";
23
-
24
- type ShowFloatingButtonOptions =
25
- | "always"
26
- | "after-interaction-on-mobile-always-desktop"
27
- | "after-interaction-anywhere"
28
- | "never";
29
-
30
- type FloatingEntryPointConfig = {
31
- position: "bottom-left" | "middle-left" | "middle-right" | "bottom-right";
32
- expansionText?: {
33
- pdp: string;
34
- plp: string;
35
- };
36
- minimizedColor: string;
37
- expandedColor: string;
38
- textColor?: string;
39
- showOption: ShowFloatingButtonOptions;
40
- iconSVGSrc?: string;
41
- iconSize?: number;
42
- iconStrokeColor?: string;
43
- iconFillColor?: string;
44
- height?: number;
45
- fontSize?: number;
46
- };
47
-
48
- type WelcomeSectionVariant = "standard" | "outlined";
49
-
50
- type WelcomeSectionColorVariant = "standard" | "accent" | "brand" | "light";
51
-
52
- type WelcomeSectionConfig = {
53
- variant: WelcomeSectionVariant;
54
- colorVariant?: WelcomeSectionColorVariant;
55
- title?: string;
56
- subtitle?: string;
57
- // icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
58
- /* Serializable icon name that maps to a React component. Preferred over icon for database storage. */
59
- iconName?: string;
60
- imageSrc?: string;
61
- };
62
-
63
- type ChatPreviewConfig = {
64
- variant: "flat" | "filled" | "outlined";
65
- largeProductComparison?: boolean;
66
- filledBackgroundColor: string;
67
- iconFillColor: string;
68
- buttonTextColor?: string;
69
- buttonTextSecondaryColor?: string;
70
- buttonTextHoverColor?: string;
71
- buttonBackgroundColor: string;
72
- buttonBackgroundHoverColor: string;
73
- buttonBorderColor?: string;
74
- buttonBorderHoverColor?: string;
75
- copies: { pdp: string[]; plp: string[] };
76
- staticSuggestionCopies?: { pdp: string[]; plp: string[] };
77
- staticPLPImages?: string[];
78
- footerConfig?: ChatPreviewFooterConfig;
79
- headerConfig?: ChatPreviewHeaderConfig;
80
- topMargin?: number;
81
- };
82
-
83
- type ChatPreviewHeaderConfig = {
84
- title?: string;
85
- imageSrc?: string;
86
- imageHeight?: number;
87
- sparklesColor?: string; // used by: spanx, uniqueVintage, dreamlandBaby
88
- fontSize?: string;
89
- iconWidth?: string;
90
- iconHeight?: string;
91
- };
92
-
93
- interface ChatPreviewFooterConfig {
94
- hasFade?: boolean; // used by: spanx, uniqueVintage
95
- suggestionButtonVariant?: "dark" | "light" | "outlined";
96
- suggestionsBackground?: string; // used by: carbahn
97
- replyButtonIcon?:
98
- | "send"
99
- | "magnifyingGlass"
100
- | "thinMagnifyingGlass"
101
- | "searchIcon";
102
- replyButtonText?: string;
103
- replyInputHasShadow?: boolean; // used by: spanx
104
- replyInputHasBorder?: boolean; // used by: spanx
105
- backgroundColor?: string; // used by spanx, tushbaby, will need custom CSS when switching over
106
- }
107
-
108
- type ProductReviewStyleVariant = "standard" | "bordered";
109
-
110
- type ProductReviewColorVariant = "neutral" | "brand" | "premium";
111
-
112
- interface ProductReviewConfig {
113
- styleVariant: ProductReviewStyleVariant;
114
- colorVariant: ProductReviewColorVariant;
115
- verifiedBuyerTitle: string;
116
- incentivizedReviewFlag?: boolean;
117
- }
118
-
119
- type PageCardVariant = "filled" | "outlined" | "minimal";
120
-
121
- type PageCardHoverVariant = "none" | "shadow" | "lift";
122
-
123
- type PageCardIconVariant = "primary" | "accent" | "background" | "none";
124
-
125
- type PageCardConfig = {
126
- variant: PageCardVariant;
127
- hoverVariant: PageCardHoverVariant;
128
- iconVariant: PageCardIconVariant;
129
- };
130
-
131
- type ProductCardVariant =
132
- | "filled"
133
- | "bordered"
134
- | "minimal"
135
- | "transparentBordered";
136
-
137
- type ProductCardHoverVariant = "backgroundDark" | "none";
138
-
139
- type ProductCardLayoutVariant = "normal" | "tall" | "square";
140
-
141
- interface ProductCardConfig {
142
- variant: ProductCardVariant;
143
- hoverVariant: ProductCardHoverVariant;
144
- layoutVariant: ProductCardLayoutVariant;
145
- pricePrefix?: string;
146
- }
147
-
148
- type CSSwitchConfig = {
149
- variant: "attached" | "detached";
150
- backgroundColor: string;
151
- borderColor: string;
152
- selectedTextColor: string;
153
- selectedBackgroundColor?: string;
154
- unselectedTextColor: string;
155
- unselectedBackgroundColor?: string;
156
- supportTitle?: string;
157
- spiffyTitle?: string;
158
- spiffyTitleHasLogo?: boolean;
159
- };
160
-
161
- type ChatHeaderConfig = {
162
- collapsedColor: string;
163
- expandedColor: string;
164
- chevronColor: string;
165
- imageSrc?: string;
166
- icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
167
- closeIcon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
168
- borderBottom?: string;
169
- headerBarHeightPartialView: number;
170
- headerBarHeightFullView: number;
171
- customerSupportSwitchConfig?: CSSwitchConfig;
172
- };
173
-
174
- type SimpleCustomerServiceIntegration = {
175
- integrationMode: CustomerServiceIntegrationMode;
176
- provider: CustomerServiceType;
177
- useUnifiedButton?: boolean;
178
- maxfileUploadSize?: number;
179
- };
180
-
181
- type FullCustomerServiceIntegration = {
182
- integrationMode: CustomerServiceIntegrationMode;
183
- provider: CustomerServiceType;
184
- useUnifiedButton?: boolean;
185
- chatEnabledDuringBusinessHours?: boolean;
186
- showNameInput?: boolean;
187
- formAiName?: string;
188
- welcomeTitle: string;
189
- welcomeDescription: string;
190
- showWelcomeOnForm?: boolean;
191
- contactSubjectOptions?: string[];
192
- getCustomWaitingMessage?: (name?: string) => string;
193
- withinBusinessHoursMessage?: string;
194
- withinBusinessHoursWaitingMessage?: string;
195
- outsideBusinessHoursMessage?: string;
196
- outsideBusinessHoursWaitingMessage?: string;
197
- withinBusinessHoursFormMessage?: string;
198
- outsideBusinessHoursFormMessage?: string;
199
- suggestedAIQuestions?: string[];
200
- businessHoursPolling?: number;
201
- maxfileUploadSize?: number;
202
-
203
- /**
204
- * @deprecated This is handled by the BE.
205
- */
206
- businessHoursStartUTC?: string;
207
- /**
208
- * @deprecated This is handled by the BE.
209
- */
210
- businessHoursEndUTC?: string;
211
- /**
212
- * @deprecated This is handled by the BE.
213
- */
214
- businessHoursTimezone?: string;
215
-
216
- showAISuggestionsWithinBusinessHours?: boolean;
217
- waitingMessagePosition?: "BEFORE_MESSAGES" | "AFTER_MESSAGES";
218
- legalMessage?: string;
219
- withinBusinessHoursInitialState?: ChatState;
220
- outsideBusinessHoursInitialState?: ChatState;
221
- withinBusinessHoursButtontext?: string;
222
- outsideBusinessHoursButtontext?: string;
223
- reopenChatMessage: string;
224
- };
225
-
226
- type CustomerServiceIntegration =
227
- | SimpleCustomerServiceIntegration
228
- | FullCustomerServiceIntegration;
229
-
230
- type ConversationalSeach = {
231
- enabled?: boolean;
232
- replyInput?: ReplyInputConfig;
233
- suggestions?: string[];
234
- entrypointBgColor?: string;
235
- entrypointTextColor?: string;
236
- entrypointBtnColor?: string;
237
- entrypointBtnTextColor?: string;
238
- entrypointBtnBorderColor?: string;
239
- entrypointContainer?: string;
240
- entrypointTrigger?: string;
241
- productGridContainer?: string;
242
- generalSearchBtn?: string;
243
- pageContent?: string;
244
- searchContent?: string;
245
- sortingTitle?: string;
246
- selectionTitle?: string;
247
- sortingFont?: string;
248
- optionsFont?: string;
249
- sortingButtonText?: string;
250
- };
251
-
252
- type ChatMessageVariant = "standard" | "premium" | "accent";
253
-
254
- interface ChatMessageConfig {
255
- assistantChatTitle: string;
256
- variant: ChatMessageVariant;
257
- productLink: {
258
- variant: ProductLinkVariant;
259
- hoverVariant: ProductLinkHoverVariant;
260
- iconVariant: ProductLinkIconVariant;
261
- };
262
- }
263
-
264
- interface ReplyInputConfig {
265
- // TODO consider making this a number
266
- size?: "md" | "lg";
267
- sendIcon: "arrowUp" | "send" | "search";
268
- placeholder?: string;
269
- }
270
-
271
- interface PartialViewConfig {
272
- // maximum height of the partial view as a percentage of the screen height
273
- maxHeight: number;
274
- borderRadius?: string;
275
- }
276
-
277
- type ProductLinkIconVariant =
278
- | "accentPrimary"
279
- | "backgroundPrimary"
280
- | "backgroundPrimaryDark"
281
- | "borderLight"
282
- | "backgroundSaturated";
283
-
284
- type ProductLinkVariant = "textLink";
285
-
286
- type ProductLinkHoverVariant = "backgroundDark";
287
-
288
- type SearchCardVariant =
289
- | "backgroundPrimary"
290
- | "backgroundSecondary"
291
- | "backgroundSecondaryDark"
292
- | "backgroundLight"
293
- | "backgroundSaturated";
294
-
295
- type SuggestionButtonVariant =
296
- | "outlined"
297
- | "outlinedLight"
298
- | "primary"
299
- | "secondary"
300
- | "tertiary"
301
- | "dark"
302
- | "darkAccent"
303
- | "darkPrimary"
304
- | "secondaryDark"
305
- | "secondaryAccent"
306
- | "transparent"
307
- | "transparentDark"
308
- | "lightDark";
309
-
310
- interface SuggestionButtonConfig {
311
- variant?: SuggestionButtonVariant;
312
- hoverVariant?: SuggestionButtonVariant;
313
- answerVariant?: SuggestionButtonVariant;
314
- borderRadius?: "sm" | "md" | "lg";
315
- }
316
-
317
- type NumRows = "default" | "alwaysOneRow" | "alwaysTwoRows" | "twoRowsOnMobile";
318
-
319
- interface AlphabeticFilterSorting {
320
- type: "alphabetic";
321
- }
322
- interface ProductCountFilterSorting {
323
- type: "productCount";
324
- }
325
- interface CustomFilterSorting {
326
- type: "custom";
327
- map: Record<string, number>;
328
- }
329
-
330
- type FilterSorting =
331
- | AlphabeticFilterSorting
332
- | ProductCountFilterSorting
333
- | CustomFilterSorting;
334
-
335
- interface BaseFilterConfig {
336
- filterId: string;
337
- displayName: string;
338
- }
339
- interface DynamicFilterConfig extends BaseFilterConfig {
340
- type: "dynamic";
341
- attribute: string;
342
- sorting: FilterSorting;
343
- }
344
-
345
- interface PriceFilterConfig extends BaseFilterConfig {
346
- type: "price";
347
- bucketSize: number;
348
- }
349
-
350
- export type FilterAttribute = DynamicFilterConfig | PriceFilterConfig;
351
-
352
- export type SearchZeroStateVariant =
353
- | "backgroundTertiary"
354
- | "backgroundDark"
355
- | "backgroundPrimary";
356
- export type SearchZeroStateLayout = "input" | "icon";
357
-
358
- export type SearchInputVariant = "standard";
359
-
360
- export type SearchIconVariant = "thin" | "bold";
361
-
362
- export type SearchFilterSidebarVariant = "darkButton" | "lightButton";
363
-
364
- export type ProductGridVariant = "standard" | "square";
365
-
366
- type UserQueryButtonIcon =
367
- | "magnifyingGlass"
368
- | "send"
369
- | "magnifyingGlassThin"
370
- | "sendArrow"
371
- | "searchIcon";
372
-
373
- interface UserQueryButtonConfig {
374
- variant?: "box" | "underlineLight" | "underlineDark";
375
- placeholderText?: string;
376
- icon: UserQueryButtonIcon;
377
- }
378
-
379
- // TODO: this should be included in the top-level widget config
380
- interface TermsAndConditionsConfig {
381
- copy: string;
382
- link: string;
383
- linkText: string;
384
- }
385
-
386
- interface MerchantVariantSettings {
387
- dynamicVariants: {
388
- enabled: boolean; // This feature will enable dynamic variants for the merchant. Useful for SPA's
389
- refreshInterval?: number; // The interval in milliseconds to check for changes in the URL
390
- };
391
- }
392
-
393
- interface FloatingChatConfig {
394
- enableWatermark: boolean;
395
- userQueryInputEnabled: boolean;
396
- ignoreFirstModelResponse?: boolean;
397
- neverShowSingleProductCards?: boolean;
398
- termsAndConditionsConfig?: TermsAndConditionsConfig;
399
-
400
- // Footer config
401
- suggestionButtonConfig?: SuggestionButtonConfig;
402
- replyInputConfig: ReplyInputConfig;
403
- }
404
-
405
- interface SearchConfig {
406
- enableGlobalSearch: boolean;
407
- searchFilterConfig: FilterAttribute[];
408
- redirectSearchResultsUrl?: string;
409
- additiveDynamicFilters?: boolean;
410
- }
411
-
412
- type OrgUIConfig = {
413
- shortName: string;
414
- id?: string;
415
- floatingEntrypointConfig?: FloatingEntryPointConfig;
416
- // Deprecated - remove with ChatPreview rewrite
417
- chatPreviewConfig?: ChatPreviewConfig;
418
-
419
- customerServiceIntegration: CustomerServiceIntegration;
420
- // Deprecated - remove when Global Search is fully launched
421
- conversationalSearch?: ConversationalSeach;
422
-
423
- merchantOverrideCss?: string;
424
-
425
- // Deprecated TODO: Remove this deprecated value when Groove CX has proper unified button support
426
- // selectors for elements that should be hidden when the chat is open
427
- // e.g. CS widgets with max z-index ("div[id*='cs-container']")
428
- hiddenElementSelectors?: string[];
429
-
430
- merchantVariantSettings?: MerchantVariantSettings;
431
- // TODO: Migrate all floating chat config into this top-level key
432
- //
433
- floatingChatConfig: FloatingChatConfig;
434
-
435
- // Contain all search config here
436
- searchConfig: SearchConfig;
437
- // TODO: Move these into FloatingChatConfig
438
- // Chat Header related values
439
- chatHeader: ChatHeaderConfig;
440
- stickyAgentSwitchSuggestion?: boolean;
441
- partialViewConfig: PartialViewConfig;
442
- welcomeSectionConfig?: WelcomeSectionConfig;
443
- // Different response values
444
- productCardConfig?: ProductCardConfig;
445
- productReviewConfig?: ProductReviewConfig;
446
- pageCardConfig?: PageCardConfig;
447
- chatMessageConfig: ChatMessageConfig;
448
- };
449
-
450
- type InsertionPoint = {
451
- selector: string;
452
- // this is the index of the target element, 0 if missing
453
- selectionIndex?: number;
454
- insertionType: DOMInsertionType;
455
- };
456
-
457
- type URLTest = "shopify" | "null";
458
-
459
- type IdExtractor =
460
- | "shopify-product-id"
461
- | "shopify-collection-id"
462
- | "shopify-product-variant-id"
463
- | "url-resolver-product-id"
464
- | "url-resolver-plp-id"
465
- | "null";
466
-
467
- // This contains a map between PageVisitCategory and a list of URL's that are classified as the value
468
- enum CategoryExtractorType {
469
- VisitCategoryMap = "VisitCategoryMap",
470
- VisitCategoryDefault = "VisitCategoryDefault",
471
- }
472
-
473
- interface BaseCategoryExtractor<T extends CategoryExtractorType> {
474
- type: T;
475
- }
476
-
477
- // This map betweens a category and a list of url patterns
478
- interface VisitCategoryMap
479
- extends BaseCategoryExtractor<CategoryExtractorType.VisitCategoryMap> {
480
- map: {
481
- [key in PageVisitCategory]?: string[];
482
- };
483
- }
484
-
485
- // This will return a hard-coded default PageVisitCategory. It is intended to be used by fallback page types
486
- interface VisitCategoryDefault
487
- extends BaseCategoryExtractor<CategoryExtractorType.VisitCategoryDefault> {
488
- value: PageVisitCategory;
489
- }
490
-
491
- type CategoryExtractor = VisitCategoryMap | VisitCategoryDefault;
492
-
493
- type WrappingElement = {
494
- className: string;
495
- element: string;
496
- insertionType: DOMInsertionType;
497
- };
498
-
499
- enum PageVariantTestType {
500
- ShopifyPLP = "ShopifyPLP",
501
- ShopifyPDP = "ShopifyPDP",
502
- PageCategory = "PageCategory",
503
- CatalogCategory = "CatalogCategory",
504
- TopCatalogCategory = "TopCatalogCategory",
505
- HasReviews = "HasReviews",
506
- InCollection = "InCollection",
507
- HasMerchantTag = "HasMerchantTag",
508
- FeatureGate = "FeatureGate",
509
- PlpId = "PlpId",
510
- QueryParam = "QueryParam",
511
- ProductId = "ProductId",
512
- UserHasInteracted = "UserHasInteracted",
513
- UserHasNotInteracted = "UserHasNotInteracted",
514
- isLoading = "isLoading",
515
- isProductComparison = "isProductComparison",
516
- Fallback = "Fallback",
517
- UrlResolver = "UrlResolver",
518
- Null = "null",
519
- }
520
-
521
- interface BasePageVariantTest<T extends PageVariantTestType> {
522
- testType: T;
523
- }
524
-
525
- interface TopCatalogCategory
526
- extends BasePageVariantTest<PageVariantTestType.TopCatalogCategory> {
527
- topCategory: string[];
528
- }
529
-
530
- interface CatalogCategoryTest
531
- extends BasePageVariantTest<PageVariantTestType.CatalogCategory> {
532
- category: SupportedEventProductCategory;
533
- }
534
-
535
- interface HasReviewsTest
536
- extends BasePageVariantTest<PageVariantTestType.HasReviews> {
537
- reviewMinimum?: number;
538
- }
539
-
540
- // This will return true if the product is in any of the listed collections
541
- interface InCollectionTest
542
- extends BasePageVariantTest<PageVariantTestType.InCollection> {
543
- collections: string[];
544
- }
545
-
546
- // This will return true if the product has any of the listed merchant tags
547
- interface HasMerchantTagTest
548
- extends BasePageVariantTest<PageVariantTestType.HasMerchantTag> {
549
- merchantTags: string[];
550
- }
551
-
552
- interface ShopifyPLPURLTest
553
- extends BasePageVariantTest<PageVariantTestType.ShopifyPLP> {}
554
-
555
- interface ShopifyPDPURLTest
556
- extends BasePageVariantTest<PageVariantTestType.ShopifyPDP> {}
557
-
558
- interface PageCategoryTest
559
- extends BasePageVariantTest<PageVariantTestType.PageCategory> {
560
- extractor: CategoryExtractor;
561
- }
562
-
563
- interface FeatureGateTest
564
- extends BasePageVariantTest<PageVariantTestType.FeatureGate> {
565
- featureGate: FeatureGates;
566
- }
567
-
568
- interface ProductIdTest
569
- extends BasePageVariantTest<PageVariantTestType.ProductId> {
570
- productIdExtractor: IdExtractor;
571
- productIds: string[];
572
- }
573
-
574
- interface PlpIdTest extends BasePageVariantTest<PageVariantTestType.PlpId> {
575
- plpIdExtractor: IdExtractor;
576
- plpIds: string[];
577
- }
578
-
579
- interface QueryParamTest
580
- extends BasePageVariantTest<PageVariantTestType.QueryParam> {
581
- queryParam: string;
582
- }
583
-
584
- interface UserHasInteractedTest
585
- extends BasePageVariantTest<PageVariantTestType.UserHasInteracted> {}
586
-
587
- interface UserHasNotInteractedTest
588
- extends BasePageVariantTest<PageVariantTestType.UserHasNotInteracted> {}
589
-
590
- interface IsLoadingTest
591
- extends BasePageVariantTest<PageVariantTestType.isLoading> {}
592
-
593
- interface IsProductComparison
594
- extends BasePageVariantTest<PageVariantTestType.isProductComparison> {}
595
-
596
- interface PageFallbackTest
597
- extends BasePageVariantTest<PageVariantTestType.Fallback> {}
598
-
599
- interface UrlResolverTest
600
- extends BasePageVariantTest<PageVariantTestType.UrlResolver> {}
601
-
602
- export type PageVariantTest =
603
- | PageCategoryTest
604
- | ShopifyPLPURLTest
605
- | ShopifyPDPURLTest
606
- | CatalogCategoryTest
607
- | TopCatalogCategory
608
- | HasReviewsTest
609
- | InCollectionTest
610
- | HasMerchantTagTest
611
- | FeatureGateTest
612
- | ProductIdTest
613
- | PlpIdTest
614
- | QueryParamTest
615
- | UserHasInteractedTest
616
- | UserHasNotInteractedTest
617
- | IsLoadingTest
618
- | IsProductComparison
619
- | PageFallbackTest
620
- | UrlResolverTest;
621
-
622
- /**
623
- * Configuration for the social proof embedded widget
624
- *
625
- * @param headerTitle - The title text to display in the widget header
626
- * @param staticSuggestions - A list of strings to display as suggestions in the widget
627
- * @param suggestionButtonVariantDefault - The variant of the suggestion button to display in the widget footer
628
- * @param suggestionButtonVariantAccent - The variant of the suggestion button to display in the widget body
629
- * @param staticImageIndex - Index of the imageUrl to use from the product response
630
- */
631
- interface SocialProofConfig {
632
- customerQuery: string;
633
- headerTitle: string;
634
- staticPLPImagesLayout?: "grid" | "horizontal";
635
- headerFontFamily?: string;
636
- staticPLPImageNames?: string[];
637
- staticImageIndex?: number;
638
- suggestionButtonStrings: string[];
639
- suggestionButtonVariantDefault: SuggestionButtonVariant;
640
- suggestionButtonVariantAccent?: SuggestionButtonVariant;
641
- suggestionButtonDataAttributes?: Record<string, string>;
642
- userQueryButtonConfig?: UserQueryButtonConfig;
643
- logoName?: string;
644
- }
645
-
646
- /**
647
- * Configuration for creating the mount point for a widget
648
- *
649
- * @param className - Optional class name to apply to the mount point. Tailwind classes are supported
650
- * and encouraged. Use this parameter to style the mounting container for the widget.
651
- */
652
- export type WidgetMountingConfig = {
653
- mountingConfigId: string;
654
- containerId: string;
655
- testId: string;
656
- parentInsertionPoint?: InsertionPoint;
657
- insertionPoint: InsertionPoint;
658
- gridInsertionType?: GridInsertionType;
659
- wrappingElement?: WrappingElement;
660
- divCheckSelector?: string;
661
- suppressionSelector?: string;
662
- style?: Partial<CSSStyleDeclaration>;
663
- className?: string;
664
- dataAttributes?: Record<string, string>;
665
- };
666
-
667
- type StaticWidgetMounting = {
668
- mountingConfigId: string;
669
- widgetConfigId: string;
670
- };
671
- type DynamicWidgetMounting = {
672
- mountingConfigId: string;
673
- mountingPointWidgets: WidgetDisplayTests[];
674
- };
675
-
676
- type WidgetDisplayTests = {
677
- tests: PageVariantTest[];
678
- widgetConfigId: string;
679
- };
680
-
681
- type WidgetMounting = StaticWidgetMounting | DynamicWidgetMounting;
682
-
683
- enum WidgetType {
684
- ChatPreview = "ChatPreview",
685
- SocialProofV2 = "SocialProofV2",
686
- ChatPreviewV2 = "ChatPreviewV2",
687
- ChatPreviewIsLoading = "ChatPreviewIsLoading",
688
- ChatPreviewPostInteraction = "ChatPreviewPostInteraction",
689
- ChatPreviewProductComparison = "ChatPreviewProductComparison",
690
- SuggestionBar = "SuggestionBar",
691
- SuggestionBarV2 = "SuggestionBarV2",
692
- ImagePromptCard = "ImagePromptCard",
693
- ImageBanner = "ImageBanner",
694
- SingleImagePrompt = "SingleImagePrompt",
695
- SearchPrompt = "SearchPrompt",
696
- SearchZeroStateEntryPoint = "SearchZeroStateEntryPoint",
697
- SearchResultsEntryPoint = "SearchResultsEntryPoint",
698
- SearchOverlayHost = "SearchOverlayHost",
699
- NoOp = "NoOp",
700
- }
701
-
702
- type WidgetConfig =
703
- | ChatPreviewWidgetConfig
704
- | SocialProofV2WidgetConfig
705
- | ChatPreviewV2WidgetConfig
706
- | ChatPreviewPostInteractionWidgetConfig
707
- | ChatPreviewIsLoadingWidgetConfig
708
- | ChatPreviewProductComparisonWidgetConfig
709
- | SuggestionBarWidgetV2Config
710
- | ImagePromptWidgetConfig
711
- | ImageBannerWidgetConfig
712
- | SingleImagePromptWidgetConfig
713
- | SearchPromptWidgetConfig
714
- | SearchEntryPointWidgetConfig
715
- | SearchResultsEntryPointWidgetConfig
716
- | SearchOverlayHostWidgetConfig
717
- | NoOpWidgetConfig;
718
-
719
- interface BaseWidgetConfig<T extends WidgetType> {
720
- widgetConfigId: string;
721
- type: T;
722
- contentId?: string;
723
- }
724
-
725
- interface ImageBannerWidgetConfig
726
- extends BaseWidgetConfig<WidgetType.ImageBanner> {
727
- imageSrc: string;
728
- title: string;
729
- subtitle: string;
730
- assistantMessage: string;
731
- }
732
-
733
- interface ChatPreviewWidgetConfig
734
- extends BaseWidgetConfig<WidgetType.ChatPreview> {
735
- variant: "filled" | "flat" | "outlined";
736
- addSeparators?: boolean;
737
- socialProofConfig?: SocialProofConfig;
738
- footerConfig?: ChatPreviewFooterConfig;
739
- }
740
-
741
- interface ChatPreviewHeaderV2Config {
742
- title?: string; // Default: 'Shopping Assistant'
743
- imageSrc?: string;
744
- imageHeight?: number;
745
- }
746
-
747
- type SingleImageConfig = {
748
- layout: "single";
749
- imageIndex: number;
750
- };
751
- type MultiImageConfig = {
752
- layout: "grid" | "horizontal";
753
- imageNames: string[];
754
- };
755
- type SocialProofImageConfig = SingleImageConfig | MultiImageConfig;
756
-
757
- type ChatPreviewSuggestionButtonConfig = {
758
- buttonStrings: string[];
759
- accentButtonVariants?: {
760
- button: SuggestionButtonVariant;
761
- hover: SuggestionButtonVariant;
762
- };
763
- buttonVariants: {
764
- button: SuggestionButtonVariant;
765
- hover: SuggestionButtonVariant;
766
- };
767
- numRows?: NumRows;
768
- };
769
-
770
- type ChatPreviewAnimatedTextConfig = {
771
- leadingText: string;
772
- animatedStrings: string[];
773
- };
774
-
775
- type ChatPreviewVariant =
776
- | { variant: "flat" }
777
- | { variant: "filled"; backgroundFillColor: string }
778
- | { variant: "outlined" };
779
-
780
- // Base interface for common chat preview properties
781
- interface BaseChatPreviewConfig {
782
- headerConfig: ChatPreviewHeaderV2Config;
783
- suggestionButtonsConfig: ChatPreviewSuggestionButtonConfig;
784
- userQueryButtonConfig: UserQueryButtonConfig;
785
- chatPreviewVariant: ChatPreviewVariant;
786
- addSeparators?: boolean;
787
- }
788
-
789
- // Specific chat preview widget configurations
790
- interface ChatPreviewPostInteractionWidgetConfig
791
- extends BaseWidgetConfig<WidgetType.ChatPreviewPostInteraction>,
792
- BaseChatPreviewConfig {
793
- chatPreviewVariant: ChatPreviewVariant;
794
- addSeparators?: boolean;
795
- }
796
-
797
- interface ChatPreviewIsLoadingWidgetConfig
798
- extends BaseWidgetConfig<WidgetType.ChatPreviewIsLoading>,
799
- BaseChatPreviewConfig {}
800
-
801
- interface ChatPreviewProductComparisonWidgetConfig
802
- extends BaseWidgetConfig<WidgetType.ChatPreviewProductComparison>,
803
- BaseChatPreviewConfig {
804
- useLargeProductComparison?: boolean;
805
- }
806
-
807
- interface ChatPreviewV2WidgetConfig
808
- extends BaseWidgetConfig<WidgetType.ChatPreviewV2>,
809
- BaseChatPreviewConfig {
810
- animatedTextConfig: ChatPreviewAnimatedTextConfig;
811
- }
812
-
813
- interface SocialProofV2WidgetConfig
814
- extends BaseWidgetConfig<WidgetType.SocialProofV2>,
815
- BaseChatPreviewConfig {
816
- customerQuery?: string; // Default: 'asked which products are the best'
817
- imageConfig: SocialProofImageConfig;
818
- }
819
-
820
- interface SuggestionBarWidgetV2Config
821
- extends BaseWidgetConfig<WidgetType.SuggestionBarV2> {
822
- metricDisplayLocation: ChatElementDisplayLocation;
823
- location: SuggestionBarLocationForMetrics;
824
- variant: SuggestionButtonVariant;
825
- hoverVariant: SuggestionButtonVariant;
826
- buttonTexts: {
827
- default: string[];
828
- productSpecific?: { [productId: string]: string[] };
829
- };
830
- boldFirstButton?: boolean;
831
- twoRowsOnMobile?: boolean;
832
- animationSpeed?: "standard" | "slow" | "none";
833
- buttonBorderRadius?: "sm" | "md" | "lg";
834
- }
835
-
836
- interface ImagePromptWidgetConfig
837
- extends BaseWidgetConfig<WidgetType.ImagePromptCard> {
838
- url: string;
839
- lightText?: boolean;
840
- title: string;
841
- subtitle: string[];
842
- staticSuggestionCopies: string[];
843
- userQueryButtonConfig: UserQueryButtonConfig;
844
- fallbackBackgroundColor?: string;
845
- }
846
-
847
- interface SingleImagePromptWidgetConfig
848
- extends BaseWidgetConfig<WidgetType.SingleImagePrompt> {
849
- title: string;
850
- staticSuggestionCopies: string[];
851
- userQueryButtonConfig: UserQueryButtonConfig;
852
- }
853
-
854
- interface SearchEntryPointWidgetConfig
855
- extends BaseWidgetConfig<WidgetType.SearchZeroStateEntryPoint> {
856
- searchZeroStateVariant: SearchZeroStateVariant;
857
- searchInputVariant: SearchInputVariant;
858
- searchIconVariant?: SearchIconVariant;
859
- searchIconSize?: number;
860
- suggestionButtonConfig: SuggestionButtonConfig;
861
- layout: SearchZeroStateLayout;
862
- searchBoxPlaceholder: string;
863
- animationSpeed?: "standard" | "slow" | "none";
864
- compactLabel?: string;
865
- initialSuggestions?: string[];
866
- usingPortal?: boolean;
867
- }
868
-
869
- interface NoOpWidgetConfig extends BaseWidgetConfig<WidgetType.NoOp> {}
870
- interface SearchOverlayHostWidgetConfig
871
- extends BaseWidgetConfig<WidgetType.SearchOverlayHost> {}
872
-
873
- interface SearchResultsEntryPointWidgetConfig
874
- extends BaseWidgetConfig<WidgetType.SearchResultsEntryPoint> {
875
- searchInputVariant: SearchInputVariant;
876
- searchFilterSidebarVariant: SearchFilterSidebarVariant;
877
- productGridVariant: ProductGridVariant;
878
- searchBoxPlaceholder: string;
879
- noResultsFoundText?: string;
880
- }
881
-
882
- export interface WidgetHeaderProps extends TestProps {
883
- title?: string;
884
- logo?: string;
885
- logoHeight?: number;
886
- orgShortName: string;
887
- variant?: SearchPromptVariant;
888
- }
889
-
890
- export interface UserQueryOptions {
891
- footerVariant?: "standard";
892
- replyButtonText?: string;
893
- replyButtonIcon?:
894
- | "magnifyingGlass"
895
- | "send"
896
- | "thinMagnifyingGlass"
897
- | "ai-search";
898
- }
899
-
900
- type SearchPromptVariant = "primary";
901
- interface SearchPromptWidgetConfig
902
- extends BaseWidgetConfig<WidgetType.SearchPrompt> {
903
- variant: SearchPromptVariant;
904
- title: string;
905
- headerConfig: WidgetHeaderProps;
906
- suggestionButtons: {
907
- variant: SuggestionButtonVariant;
908
- hoverVariant: SuggestionButtonVariant;
909
- buttonTexts: string[];
910
- };
911
- footerConfig?: UserQueryOptions;
912
- }
913
-
914
- type PageVariantBase = {
915
- // Unique identifier for each entry within the pageVariants.
916
- // Useful to differentiate which variant is loaded when there are multiples of a single type.
917
- variantId: string;
918
- widgetMounting: WidgetMounting[];
919
- variantTests: PageVariantTest[];
920
- };
921
-
922
- type PLPPageVariant = PageVariantBase & {
923
- variantType: "plp";
924
- plpIdExtractor: IdExtractor;
925
- };
926
-
927
- type PDPPageVariant = PageVariantBase & {
928
- variantType: "pdp";
929
- parentProductIdExtractor?: IdExtractor;
930
- productIdExtractor: IdExtractor;
931
- };
932
-
933
- type VisitPageVariant = PageVariantBase & {
934
- variantType: "page_visit";
935
- };
936
-
937
- type OtherPageVariant = PageVariantBase & {
938
- variantType: "other";
939
- };
940
-
941
- type HomePageVariant = PageVariantBase & {
942
- variantType: "homepage";
943
- };
944
-
945
- type SearchPageVariant = PageVariantBase & {
946
- variantType: "search";
947
- };
948
-
949
- export type PageVariantConfig =
950
- | PLPPageVariant
951
- | PDPPageVariant
952
- | VisitPageVariant
953
- | OtherPageVariant
954
- | HomePageVariant
955
- | SearchPageVariant;
956
-
957
- export type OrgPageConfig = {
958
- // pageVariants is a list of page variants that we support.
959
- pageVariants: PageVariantConfig[];
960
- // widgetConfigs is a named set of widget configs
961
- widgetConfigs: Record<string, WidgetConfig>;
962
- mountingConfigs: Record<string, WidgetMountingConfig>;
963
- };
964
-
965
- export type OrgConfig = OrgUIConfig;
966
-
967
- export {
968
- CategoryExtractorType,
969
- ColorNames,
970
- colorVar,
971
- PageVariantTestType,
972
- WidgetType,
973
- };
974
-
975
- export interface EnviveConfig {
976
- amplitudeApiKey?: string;
977
- dataResidency?: string;
978
- env?: string;
979
- baseUrl?: string;
980
- reactAppName?: string;
981
- cdnUrl?: string;
982
- contextSource?: string;
983
- orgLevelApiKey?: string;
984
- orgShortName?: string;
985
- identifyingPrefix?: string;
986
- featureOverrides?: Record<string, boolean>;
987
- variantUrlOverride?: string;
988
- variantInfoOverride?: any;
989
- show?: boolean;
990
- publicKey?: string;
991
- featureGates?: OrgConfigFeatureGate[];
992
- }
993
-
994
- export type {
995
- CategoryExtractor,
996
- ChatMessageVariant,
997
- ChatMessageConfig,
998
- ChatPreviewConfig,
999
- ChatPreviewIsLoadingWidgetConfig,
1000
- ChatPreviewPostInteractionWidgetConfig,
1001
- ChatPreviewProductComparisonWidgetConfig,
1002
- ChatPreviewSuggestionButtonConfig,
1003
- SocialProofV2WidgetConfig,
1004
- ChatPreviewHeaderV2Config,
1005
- ChatPreviewV2WidgetConfig,
1006
- ChatPreviewFooterConfig,
1007
- ChatPreviewHeaderConfig,
1008
- ChatPreviewWidgetConfig,
1009
- ChatPreviewVariant,
1010
- ColorMapping,
1011
- CustomerServiceIntegration,
1012
- FloatingEntryPointConfig,
1013
- FullCustomerServiceIntegration,
1014
- IdExtractor,
1015
- ImageBannerWidgetConfig,
1016
- ImagePromptWidgetConfig,
1017
- InsertionPoint,
1018
- MultiImageConfig,
1019
- OrgUIConfig,
1020
- PageCardConfig,
1021
- PageCardVariant,
1022
- PageCardHoverVariant,
1023
- PageCardIconVariant,
1024
- ProductCardConfig,
1025
- ProductCardVariant,
1026
- ProductCardLayoutVariant,
1027
- ProductCardHoverVariant,
1028
- ProductLinkHoverVariant,
1029
- ProductLinkIconVariant,
1030
- ProductLinkVariant,
1031
- ProductReviewConfig,
1032
- ProductReviewStyleVariant,
1033
- ProductReviewColorVariant,
1034
- SearchPromptVariant,
1035
- SearchPromptWidgetConfig,
1036
- SearchResultsEntryPointWidgetConfig,
1037
- ShowFloatingButtonOptions,
1038
- SingleImagePromptWidgetConfig,
1039
- SearchEntryPointWidgetConfig,
1040
- SearchOverlayHostWidgetConfig,
1041
- SocialProofConfig,
1042
- SuggestionBarWidgetV2Config,
1043
- SuggestionButtonConfig,
1044
- SuggestionButtonVariant,
1045
- URLTest,
1046
- UserQueryButtonConfig,
1047
- UserQueryButtonIcon,
1048
- WelcomeSectionConfig,
1049
- WelcomeSectionVariant,
1050
- WelcomeSectionColorVariant,
1051
- WidgetConfig,
1052
- WrappingElement,
1053
- SearchCardVariant,
1054
- WidgetDisplayTests,
1055
- NoOpWidgetConfig,
1056
- WidgetMounting,
1057
- StaticWidgetMounting,
1058
- DynamicWidgetMounting,
1059
- PDPPageVariant,
1060
- PLPPageVariant,
1061
- VisitPageVariant,
1062
- OtherPageVariant,
1063
- HomePageVariant,
1064
- SearchPageVariant,
1065
- NumRows,
1066
- };