@envive-ai/react-hooks 0.2.4 → 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 (878) hide show
  1. package/dist/AmplitudeOperations-CDe6oRn4.cjs +41 -0
  2. package/dist/AmplitudeOperations-zFjk1Mkm.js +34 -0
  3. package/dist/{NewOrgConfig-xNlcpcF_.js → NewOrgConfig-ChNJ3ZtC.js} +2 -2
  4. package/dist/{NewOrgConfig-B_1A1d9q.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 +18 -18
  27. package/dist/application/utils/index.d.cts +16 -65
  28. package/dist/application/utils/index.d.ts +14 -63
  29. package/dist/application/utils/index.js +18 -18
  30. package/dist/{atomStore-BLYJ2ZoQ.js → atomStore-DAQvNPkh.js} +1 -1
  31. package/dist/{atomStore-8ppNkJ_n.cjs → atomStore-DD9g7Zw2.cjs} +1 -1
  32. package/dist/atoms/app/index.cjs +18 -18
  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 +18 -18
  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 +20 -20
  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 +20 -20
  42. package/dist/atoms/globalSearch/index.cjs +1 -1
  43. package/dist/atoms/globalSearch/index.d.cts +6 -6
  44. package/dist/atoms/globalSearch/index.d.ts +6 -6
  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 +6 -46
  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 +6 -28
  54. package/dist/atoms/search/utils.d.cts +1 -1
  55. package/dist/atoms/search/utils.d.ts +1 -1
  56. package/dist/cdnContext-BLNiW2HT.cjs +53 -0
  57. package/dist/cdnContext-DT6J5nCw.js +38 -0
  58. package/dist/chat-C0cgfkL8.js +230 -0
  59. package/dist/{chat-pXCsesuS.js → chat-ClvJ9xEj.js} +1 -1
  60. package/dist/{chat-sCX7aTrz.cjs → chat-DCGriB7h.cjs} +1 -1
  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/{common-4xhjcUbt.cjs → common-DQPvV_S_.cjs} +1 -1
  65. package/dist/{common-DhKoZ6jN.js → common-c_4eX0qn.js} +1 -1
  66. package/dist/{components-BUisjl4v.js → components-CDpaMUjK.js} +1 -1
  67. package/dist/{components-DVaYBroL.cjs → components-DKwVHIjq.cjs} +1 -1
  68. package/dist/config/index.cjs +71 -0
  69. package/dist/config/index.d.cts +5 -0
  70. package/dist/config/index.d.ts +5 -0
  71. package/dist/config/index.js +6 -0
  72. package/dist/config/locators/components/chat/index.cjs +1 -1
  73. package/dist/config/locators/components/chat/index.d.cts +1 -1
  74. package/dist/config/locators/components/chat/index.d.ts +1 -1
  75. package/dist/config/locators/components/chat/index.js +1 -1
  76. package/dist/config/locators/components/chat/variants/index.d.cts +1 -1
  77. package/dist/config/locators/components/chat/variants/index.d.ts +1 -1
  78. package/dist/config/locators/components/common/index.cjs +1 -1
  79. package/dist/config/locators/components/common/index.d.cts +1 -1
  80. package/dist/config/locators/components/common/index.d.ts +1 -1
  81. package/dist/config/locators/components/common/index.js +1 -1
  82. package/dist/config/locators/components/index.cjs +1 -1
  83. package/dist/config/locators/components/index.d.cts +1 -1
  84. package/dist/config/locators/components/index.d.ts +1 -1
  85. package/dist/config/locators/components/index.js +1 -1
  86. package/dist/config/locators/components/search/index.d.cts +1 -1
  87. package/dist/config/locators/components/search/index.d.ts +1 -1
  88. package/dist/config/locators/index.cjs +23 -44
  89. package/dist/config/locators/index.d.cts +5 -26
  90. package/dist/config/locators/index.d.ts +5 -26
  91. package/dist/config/locators/index.js +5 -26
  92. package/dist/contexts/amplitudeContext/index.cjs +18 -18
  93. package/dist/contexts/amplitudeContext/index.d.cts +1 -1
  94. package/dist/contexts/amplitudeContext/index.d.ts +1 -1
  95. package/dist/contexts/amplitudeContext/index.js +18 -18
  96. package/dist/contexts/cdnContext/index.cjs +4 -4
  97. package/dist/contexts/cdnContext/index.d.cts +2 -6
  98. package/dist/contexts/cdnContext/index.d.ts +2 -6
  99. package/dist/contexts/cdnContext/index.js +4 -4
  100. package/dist/contexts/enviveConfigContext/index.cjs +4 -4
  101. package/dist/contexts/enviveConfigContext/index.d.cts +3 -24
  102. package/dist/contexts/enviveConfigContext/index.d.ts +3 -24
  103. package/dist/contexts/enviveConfigContext/index.js +4 -4
  104. package/dist/contexts/enviveCssContext/index.cjs +15 -19
  105. package/dist/contexts/enviveCssContext/index.d.cts +3 -5
  106. package/dist/contexts/enviveCssContext/index.d.ts +3 -5
  107. package/dist/contexts/enviveCssContext/index.js +15 -19
  108. package/dist/contexts/featureFlagContext/index.cjs +9 -10
  109. package/dist/contexts/featureFlagContext/index.d.cts +3 -11
  110. package/dist/contexts/featureFlagContext/index.d.ts +3 -11
  111. package/dist/contexts/featureFlagContext/index.js +6 -7
  112. package/dist/contexts/featureFlagServiceContext/index.cjs +4 -3
  113. package/dist/contexts/featureFlagServiceContext/index.d.cts +1 -4
  114. package/dist/contexts/featureFlagServiceContext/index.d.ts +1 -4
  115. package/dist/contexts/featureFlagServiceContext/index.js +4 -3
  116. package/dist/contexts/graphqlContext/index.cjs +8 -13
  117. package/dist/contexts/graphqlContext/index.d.cts +11 -14
  118. package/dist/contexts/graphqlContext/index.d.ts +11 -14
  119. package/dist/contexts/graphqlContext/index.js +8 -13
  120. package/dist/contexts/localStorageContext/index.cjs +3 -3
  121. package/dist/contexts/localStorageContext/index.d.cts +3 -22
  122. package/dist/contexts/localStorageContext/index.d.ts +3 -22
  123. package/dist/contexts/localStorageContext/index.js +4 -3
  124. package/dist/contexts/newOrgConfigContext/index.cjs +13 -17
  125. package/dist/contexts/newOrgConfigContext/index.d.cts +12 -15
  126. package/dist/contexts/newOrgConfigContext/index.d.ts +12 -15
  127. package/dist/contexts/newOrgConfigContext/index.js +13 -17
  128. package/dist/contexts/searchContext/index.cjs +23 -23
  129. package/dist/contexts/searchContext/index.d.cts +2 -7
  130. package/dist/contexts/searchContext/index.d.ts +2 -7
  131. package/dist/contexts/searchContext/index.js +23 -23
  132. package/dist/contexts/sessionStorageContext/index.cjs +2 -2
  133. package/dist/contexts/sessionStorageContext/index.d.cts +2 -6
  134. package/dist/contexts/sessionStorageContext/index.d.ts +2 -6
  135. package/dist/contexts/sessionStorageContext/index.js +2 -2
  136. package/dist/contexts/shopifyUrlContext/index.cjs +2 -2
  137. package/dist/contexts/shopifyUrlContext/index.d.cts +2 -11
  138. package/dist/contexts/shopifyUrlContext/index.d.ts +2 -11
  139. package/dist/contexts/shopifyUrlContext/index.js +2 -2
  140. package/dist/contexts/systemSettingsContext/index.cjs +4 -4
  141. package/dist/contexts/systemSettingsContext/index.d.cts +4 -14
  142. package/dist/contexts/systemSettingsContext/index.d.ts +4 -14
  143. package/dist/contexts/systemSettingsContext/index.js +4 -4
  144. package/dist/contexts/userIdentityContext/index.cjs +18 -18
  145. package/dist/contexts/userIdentityContext/index.d.cts +11 -2
  146. package/dist/contexts/userIdentityContext/index.d.ts +11 -2
  147. package/dist/contexts/userIdentityContext/index.js +18 -18
  148. package/dist/dist-BZX_Mgfn.cjs +6019 -0
  149. package/dist/dist-CIM4YRqp.js +5923 -0
  150. package/dist/domObserver-DKcas6tl.js +1 -1
  151. package/dist/domObserver-Do6RAJdf.cjs +1 -1
  152. package/dist/enviveConfig-DaotBKMS.cjs +130 -0
  153. package/dist/enviveConfig-DrvYlCYG.js +62 -0
  154. package/dist/enviveConfigContext--89ejDs5.cjs +60 -0
  155. package/dist/enviveConfigContext-BCnzgk4M.js +45 -0
  156. package/dist/events/index.cjs +2 -3
  157. package/dist/events/index.d.cts +2 -15
  158. package/dist/events/index.d.ts +2 -15
  159. package/dist/events/index.js +2 -2
  160. package/dist/events-CgFGtanE.cjs +69 -0
  161. package/dist/events-WOOrnUAx.js +63 -0
  162. package/dist/exceptions/index.cjs +4 -0
  163. package/dist/exceptions/index.d.cts +12 -0
  164. package/dist/exceptions/index.d.ts +12 -0
  165. package/dist/exceptions/index.js +3 -0
  166. package/dist/exceptions-BiSWJEl2.cjs +32 -0
  167. package/dist/exceptions-DSv0ZaH0.js +20 -0
  168. package/dist/featureFlagServiceContext-B7je7VZV.d.cts +24 -0
  169. package/dist/featureFlagServiceContext-BztKnBPk.cjs +66 -0
  170. package/dist/featureFlagServiceContext-DpdlcjNb.js +46 -0
  171. package/dist/featureFlagServiceContext-ahy3jou0.d.ts +24 -0
  172. package/dist/{globalSearch-OiF96VLG.cjs → globalSearch-Cpc8egsM.cjs} +1 -1
  173. package/dist/{globalSearch-B_v9qfCT.js → globalSearch-nmrfGLOn.js} +1 -1
  174. package/dist/graphql-CWNkUHFV.js +46 -0
  175. package/dist/graphql-DT-H-lta.cjs +70 -0
  176. package/dist/graphqlContext-B181y-sa.cjs +111 -0
  177. package/dist/graphqlContext-CWulFxxC.js +96 -0
  178. package/dist/hooks/AmplitudeOperations/index.cjs +20 -21
  179. package/dist/hooks/AmplitudeOperations/index.d.cts +2 -2
  180. package/dist/hooks/AmplitudeOperations/index.d.ts +2 -2
  181. package/dist/hooks/AmplitudeOperations/index.js +19 -20
  182. package/dist/hooks/AppDetails/index.cjs +21 -21
  183. package/dist/hooks/AppDetails/index.d.cts +3 -23
  184. package/dist/hooks/AppDetails/index.d.ts +3 -23
  185. package/dist/hooks/AppDetails/index.js +21 -21
  186. package/dist/hooks/CdnOperations/index.cjs +4 -4
  187. package/dist/hooks/CdnOperations/index.js +4 -4
  188. package/dist/hooks/ChatToggle/index.cjs +23 -23
  189. package/dist/hooks/ChatToggle/index.d.cts +2 -2
  190. package/dist/hooks/ChatToggle/index.d.ts +2 -2
  191. package/dist/hooks/ChatToggle/index.js +21 -21
  192. package/dist/hooks/ChatToggleAnalytics/index.cjs +22 -23
  193. package/dist/hooks/ChatToggleAnalytics/index.d.cts +2 -2
  194. package/dist/hooks/ChatToggleAnalytics/index.d.ts +2 -2
  195. package/dist/hooks/ChatToggleAnalytics/index.js +21 -22
  196. package/dist/hooks/CustomerSupportHandoff/index.cjs +2 -2
  197. package/dist/hooks/CustomerSupportHandoff/index.js +2 -2
  198. package/dist/hooks/Debounce/index.cjs +20 -2
  199. package/dist/hooks/Debounce/index.js +18 -2
  200. package/dist/hooks/ElementObserver/index.cjs +3 -5
  201. package/dist/hooks/ElementObserver/index.d.cts +4 -25
  202. package/dist/hooks/ElementObserver/index.d.ts +4 -25
  203. package/dist/hooks/ElementObserver/index.js +3 -5
  204. package/dist/hooks/GrabAndScroll/index.cjs +1 -1
  205. package/dist/hooks/GrabAndScroll/index.js +1 -1
  206. package/dist/hooks/GraphQLConfig/index.cjs +9 -14
  207. package/dist/hooks/GraphQLConfig/index.d.cts +2 -13
  208. package/dist/hooks/GraphQLConfig/index.d.ts +2 -13
  209. package/dist/hooks/GraphQLConfig/index.js +9 -14
  210. package/dist/hooks/IdentifyUser/index.cjs +18 -18
  211. package/dist/hooks/IdentifyUser/index.js +18 -18
  212. package/dist/hooks/ImageResolver/index.cjs +20 -29
  213. package/dist/hooks/ImageResolver/index.js +20 -29
  214. package/dist/hooks/Intersection/index.cjs +1 -1
  215. package/dist/hooks/Intersection/index.js +1 -1
  216. package/dist/hooks/LocalStorageOperations/index.cjs +8 -7
  217. package/dist/hooks/LocalStorageOperations/index.js +4 -3
  218. package/dist/hooks/MessageFilter/index.cjs +3 -12
  219. package/dist/hooks/MessageFilter/index.d.cts +2 -17
  220. package/dist/hooks/MessageFilter/index.d.ts +2 -17
  221. package/dist/hooks/MessageFilter/index.js +2 -11
  222. package/dist/hooks/NewOrgConfig/index.cjs +14 -18
  223. package/dist/hooks/NewOrgConfig/index.d.cts +3 -16
  224. package/dist/hooks/NewOrgConfig/index.d.ts +3 -16
  225. package/dist/hooks/NewOrgConfig/index.js +14 -18
  226. package/dist/hooks/Search/index.cjs +331 -166
  227. package/dist/hooks/Search/index.d.cts +3 -57
  228. package/dist/hooks/Search/index.d.ts +3 -57
  229. package/dist/hooks/Search/index.js +319 -155
  230. package/dist/hooks/SearchOperations/index.cjs +24 -24
  231. package/dist/hooks/SearchOperations/index.d.cts +2 -3
  232. package/dist/hooks/SearchOperations/index.d.ts +2 -3
  233. package/dist/hooks/SearchOperations/index.js +24 -24
  234. package/dist/hooks/SessionStorageOperations/index.cjs +2 -2
  235. package/dist/hooks/SessionStorageOperations/index.js +2 -2
  236. package/dist/hooks/ShopifyUrlOperations/index.cjs +3 -3
  237. package/dist/hooks/ShopifyUrlOperations/index.d.cts +3 -5
  238. package/dist/hooks/ShopifyUrlOperations/index.d.ts +3 -5
  239. package/dist/hooks/ShopifyUrlOperations/index.js +3 -3
  240. package/dist/hooks/SnapCalculator/index.cjs +1 -1
  241. package/dist/hooks/SnapCalculator/index.d.cts +4 -3
  242. package/dist/hooks/SnapCalculator/index.d.ts +4 -3
  243. package/dist/hooks/SnapCalculator/index.js +1 -1
  244. package/dist/hooks/SystemSettingsContext/index.cjs +17 -6
  245. package/dist/hooks/SystemSettingsContext/index.d.cts +5 -15
  246. package/dist/hooks/SystemSettingsContext/index.d.ts +5 -15
  247. package/dist/hooks/SystemSettingsContext/index.js +15 -6
  248. package/dist/hooks/TrackComponentVisibleEvent/index.cjs +20 -20
  249. package/dist/hooks/TrackComponentVisibleEvent/index.d.cts +2 -3
  250. package/dist/hooks/TrackComponentVisibleEvent/index.d.ts +2 -3
  251. package/dist/hooks/TrackComponentVisibleEvent/index.js +20 -20
  252. package/dist/hooks/UpdateAnalyticsProps/index.cjs +20 -20
  253. package/dist/hooks/UpdateAnalyticsProps/index.js +19 -19
  254. package/dist/hooks/utils.cjs +1 -1
  255. package/dist/hooks/utils.d.cts +20 -13
  256. package/dist/hooks/utils.d.ts +20 -13
  257. package/dist/hooks/utils.js +1 -1
  258. package/dist/index-B4cSHxVN.d.ts +22 -0
  259. package/dist/{index-DzbkQtaK.d.cts → index-BQpWG3Jm.d.cts} +1 -1
  260. package/dist/index-BVZbvpx_.d.cts +11 -0
  261. package/dist/index-CEmUfoZa.d.ts +42 -0
  262. package/dist/index-CMZcE7pk.d.cts +224 -0
  263. package/dist/{index-DzzKdrcZ.d.ts → index-CYGpI6hE.d.ts} +1 -1
  264. package/dist/{index-9NE86em3.d.cts → index-ClVBVK15.d.cts} +1 -1
  265. package/dist/{index-Dy22w7kg.d.ts → index-Clf4wYaJ.d.ts} +1 -1
  266. package/dist/index-DeQte6mb.d.ts +11 -0
  267. package/dist/index-Dzv6WwSZ.d.ts +224 -0
  268. package/dist/index-ca7Qn8o0.d.cts +22 -0
  269. package/dist/{index-C1nwLU6Q.d.ts → index-dngXrfnT.d.ts} +1 -1
  270. package/dist/index-qOBU4GEh.d.cts +42 -0
  271. package/dist/{index-Da1s8h5C.d.cts → index-w64il54a.d.cts} +1 -1
  272. package/dist/interceptors/index.cjs +28 -3
  273. package/dist/interceptors/index.d.cts +4 -15
  274. package/dist/interceptors/index.d.ts +4 -15
  275. package/dist/interceptors/index.js +25 -3
  276. package/dist/localStorageContext-DSpmlfyr.js +90 -0
  277. package/dist/localStorageContext-DbWl7Row.cjs +104 -0
  278. package/dist/locators-BMQGmGLq.js +23 -0
  279. package/dist/locators-DxYdak1F.cjs +131 -0
  280. package/dist/{logger-Cp7J4YJT.cjs → logger-BF6iGSVd.cjs} +1 -1
  281. package/dist/{logger-oAgZx2-m.js → logger-DCs3_11o.js} +1 -1
  282. package/dist/models-158fyHt9.cjs +1305 -0
  283. package/dist/models-DEJUuKYQ.js +1118 -0
  284. package/dist/newOrgConfigAtom-BuQE_zPK.js +8 -0
  285. package/dist/{newOrgConfigAtom-B9FW3fDc.cjs → newOrgConfigAtom-rrYHmp1b.cjs} +1 -1
  286. package/dist/newOrgConfigContext-BVrzYatq.cjs +68 -0
  287. package/dist/newOrgConfigContext-C0LzIRJ7.js +53 -0
  288. package/dist/nodeSelector-CbWcUbuc.d.ts +28 -0
  289. package/dist/nodeSelector-Cj-Xl1LP.d.cts +28 -0
  290. package/dist/org-CVjyv-gv.cjs +111 -0
  291. package/dist/org-Ct9Vjv1J.js +32 -0
  292. package/dist/search-C0TAcTeY.cjs +312 -0
  293. package/dist/search-DLHzcbfP.js +233 -0
  294. package/dist/searchContext-Dmtue5QO.js +129 -0
  295. package/dist/searchContext-l_23fiuP.cjs +145 -0
  296. package/dist/searchServiceAdapter-B0h7psvh.js +16 -0
  297. package/dist/searchServiceAdapter-BclWy4fE.cjs +34 -0
  298. package/dist/sessionStorageContext-BOyr7mIM.cjs +66 -0
  299. package/dist/sessionStorageContext-ClXN9eX4.js +52 -0
  300. package/dist/shopifyUrlContext-G9eqIcsL.cjs +75 -0
  301. package/dist/shopifyUrlContext-WAm0pnPh.js +61 -0
  302. package/dist/src/application/commerce-api.js +406 -0
  303. package/dist/src/application/logging/logger.js +16 -0
  304. package/dist/src/application/models/graphql/index.js +3 -0
  305. package/dist/src/application/models/graphql/queries/getMerchantColorsQuery.js +13 -0
  306. package/dist/src/application/models/graphql/queries/getMerchantFrontendConfigQuery.js +13 -0
  307. package/dist/src/application/models/graphql/queries/getMerchantOrgIdQuery.js +10 -0
  308. package/dist/src/application/models/guards/api/index.js +12 -0
  309. package/dist/src/application/models/guards/api/isApiFormResponse.js +59 -0
  310. package/dist/src/application/models/guards/api/isApiFormSubmittedResponseAttributes.js +22 -0
  311. package/dist/src/application/models/guards/api/isApiOrderResponseAttributes.js +91 -0
  312. package/dist/src/application/models/guards/api/isApiOrgConfigResults.js +188 -0
  313. package/dist/src/application/models/guards/api/isApiOrganizationConfig.js +115 -0
  314. package/dist/src/application/models/guards/api/isApiPDPEventAttributes.js +16 -0
  315. package/dist/src/application/models/guards/api/isApiPLPEventAttributes.js +26 -0
  316. package/dist/src/application/models/guards/api/isApiPageResponseAttributes.js +15 -0
  317. package/dist/src/application/models/guards/api/isApiProductResponseAttributes.js +65 -0
  318. package/dist/src/application/models/guards/api/isApiProductSearchAttributes.js +15 -0
  319. package/dist/src/application/models/guards/api/isApiProductSearchFilterAttributes.js +10 -0
  320. package/dist/src/application/models/guards/api/isApiQueryTypedEventAttributes.js +4 -0
  321. package/dist/src/application/models/guards/api/isApiResponse.js +33 -0
  322. package/dist/src/application/models/guards/api/isApiReviewResponseAttributes.js +22 -0
  323. package/dist/src/application/models/guards/api/isApiReviewRichInformation.js +23 -0
  324. package/dist/src/application/models/guards/api/isApiSearchEventAttributes.js +20 -0
  325. package/dist/src/application/models/guards/api/isApiSuggestion.js +24 -0
  326. package/dist/src/application/models/guards/api/isApiSuggestionClickedEventAttributes.js +4 -0
  327. package/dist/src/application/models/guards/api/isApiTextResponseAttributes.js +4 -0
  328. package/dist/src/application/models/guards/api/isApiUserEvent.js +18 -0
  329. package/dist/src/application/models/guards/graphQL/isGraphQLColorsConfig.js +41 -0
  330. package/dist/src/application/models/guards/isBaseEcommerceEvent.js +14 -0
  331. package/dist/src/application/models/guards/isGA4EcommerceEvent.js +14 -0
  332. package/dist/src/application/models/guards/isLegacyUAEcommerceEvent.js +14 -0
  333. package/dist/src/application/models/guards/isMobilePLPChatPlacementParameter.js +4 -0
  334. package/dist/src/application/models/guards/isSpanxTakeAQuizCtaParameter.js +1 -0
  335. package/dist/src/application/models/guards/isVariantInfo.js +28 -0
  336. package/dist/src/application/models/guards/utils.js +34 -0
  337. package/dist/src/application/models/index.js +34 -0
  338. package/dist/src/application/models/utils/snakeToCamelTransformer.js +71 -0
  339. package/dist/src/application/models/utils/stringToFulfillmentDisplayStatusEnumValue.js +65 -0
  340. package/dist/src/application/models/validators/validateGraphQLColorsConfig.js +9 -0
  341. package/dist/src/application/models/validators/validateGraphQLFrontendConfig.js +420 -0
  342. package/dist/src/application/models/validators/validateGraphQLOrgId.js +6 -0
  343. package/dist/src/application/models/validators/validateMobilePLPChatPlacementParameter.js +9 -0
  344. package/dist/src/application/models/validators/validateOrgConfigResults.js +44 -0
  345. package/dist/src/application/models/validators/validateOrganizationConfig.js +34 -0
  346. package/dist/src/application/models/validators/validateResponse.js +173 -0
  347. package/dist/src/application/models/validators/validateSuggestion.js +13 -0
  348. package/dist/src/application/models/validators/validateUserEvent.js +91 -0
  349. package/dist/src/application/utils/analyticsUtils.js +94 -0
  350. package/dist/src/application/utils/coreContextToApiContext.js +8 -0
  351. package/dist/src/application/utils/coreUserEventToApiUserEvent.js +90 -0
  352. package/dist/src/application/utils/divideArray.js +7 -0
  353. package/dist/src/application/utils/domObserver.js +85 -0
  354. package/dist/src/application/utils/elementObserver.js +186 -0
  355. package/dist/src/application/utils/imageFilter.js +11 -0
  356. package/dist/src/application/utils/index.js +21 -0
  357. package/dist/src/application/utils/merchantUtils.js +15 -0
  358. package/dist/src/application/utils/messageFromFormSubmittedEvent.js +19 -0
  359. package/dist/src/application/utils/messageFromQueryEvent.js +35 -0
  360. package/dist/src/application/utils/messageFromResponse.js +123 -0
  361. package/dist/src/application/utils/messageFromSuggestionEvent.js +27 -0
  362. package/dist/src/application/utils/mouseEventTypes.js +1 -0
  363. package/dist/src/application/utils/mutationHelper.js +33 -0
  364. package/dist/src/application/utils/nextMessageRequestToApiRequest.js +29 -0
  365. package/dist/src/application/utils/nodeSelector.js +101 -0
  366. package/dist/src/application/utils/overrides.js +144 -0
  367. package/dist/src/application/utils/stringUtils.js +47 -0
  368. package/dist/src/application/utils/supportedEventRequestToApiRequest.js +7 -0
  369. package/dist/src/application/utils/urlsParser.js +33 -0
  370. package/dist/src/application/utils/validation.js +5 -0
  371. package/dist/src/atoms/amplitude/amplitudeTrackEventAtom.js +4 -0
  372. package/dist/src/atoms/app/index.js +23 -0
  373. package/dist/src/atoms/app/variant.js +102 -0
  374. package/dist/src/atoms/atomStore/atomStore.js +28 -0
  375. package/dist/src/atoms/atomStore/index.js +1 -0
  376. package/dist/src/atoms/chat/chatState.js +33 -0
  377. package/dist/src/atoms/chat/form.js +16 -0
  378. package/dist/src/atoms/chat/index.js +23 -0
  379. package/dist/src/atoms/chat/lastMessage.js +10 -0
  380. package/dist/src/atoms/chat/messageQueue.js +68 -0
  381. package/dist/src/atoms/chat/performanceMetrics.js +70 -0
  382. package/dist/src/atoms/chat/renderedWidgetRefs.js +24 -0
  383. package/dist/src/atoms/chat/replies.js +43 -0
  384. package/dist/src/atoms/chat/suggestions.js +29 -0
  385. package/dist/src/atoms/envive/enviveConfig.js +67 -0
  386. package/dist/src/atoms/globalSearch/globalSearch.js +8 -0
  387. package/dist/src/atoms/globalSearch/index.js +1 -0
  388. package/dist/src/atoms/org/customerService.js +6 -0
  389. package/dist/src/atoms/org/graphqlConfig.js +8 -0
  390. package/dist/src/atoms/org/index.js +4 -0
  391. package/dist/src/atoms/org/newOrgConfigAtom.js +2 -0
  392. package/dist/src/atoms/org/orgAnalyticsConfig.js +8 -0
  393. package/dist/src/atoms/search/index.js +1 -0
  394. package/dist/src/atoms/search/productFilters.js +163 -0
  395. package/dist/src/atoms/search/productRetrievalAPI.js +50 -0
  396. package/dist/src/atoms/search/productRetrievalAdapter.js +14 -0
  397. package/dist/src/atoms/search/productSorter.js +13 -0
  398. package/dist/src/atoms/search/searchAPI.js +140 -0
  399. package/dist/src/atoms/search/searchServiceAdapter.js +14 -0
  400. package/dist/src/atoms/search/utils.js +15 -0
  401. package/dist/src/config/index.js +1 -0
  402. package/dist/src/config/locators/components/chat/entrypoints.js +10 -0
  403. package/dist/src/config/locators/components/chat/index.js +21 -0
  404. package/dist/src/config/locators/components/chat/preview.js +11 -0
  405. package/dist/src/config/locators/components/chat/variants/index.js +12 -0
  406. package/dist/src/config/locators/components/common/buttons.js +6 -0
  407. package/dist/src/config/locators/components/common/cards.js +17 -0
  408. package/dist/src/config/locators/components/common/index.js +4 -0
  409. package/dist/src/config/locators/components/common/links.js +1 -0
  410. package/dist/src/config/locators/components/common/tables.js +1 -0
  411. package/dist/src/config/locators/components/floating-button.js +2 -0
  412. package/dist/src/config/locators/components/index.js +3 -0
  413. package/dist/src/config/locators/components/report-issue.js +13 -0
  414. package/dist/src/config/locators/components/search/index.js +5 -0
  415. package/dist/src/config/locators/components/shadow-dom.js +1 -0
  416. package/dist/src/config/locators/embedded.js +20 -0
  417. package/dist/src/config/locators/index.js +4 -0
  418. package/dist/src/contexts/amplitudeContext/amplitudeContext.js +292 -0
  419. package/dist/src/contexts/amplitudeContext/index.js +1 -0
  420. package/dist/src/contexts/cdnContext/cdnContext.js +28 -0
  421. package/dist/src/contexts/cdnContext/index.js +1 -0
  422. package/dist/src/contexts/enviveConfigContext/enviveConfigContext.js +37 -0
  423. package/dist/src/contexts/enviveConfigContext/index.js +1 -0
  424. package/dist/src/contexts/enviveCssContext/enviveCssContext.js +31 -0
  425. package/dist/src/contexts/enviveCssContext/index.js +1 -0
  426. package/dist/src/contexts/featureFlagContext/featureFlagContext.js +109 -0
  427. package/dist/src/contexts/featureFlagContext/index.js +1 -0
  428. package/dist/src/contexts/featureFlagServiceContext/featureFlagServiceContext.js +47 -0
  429. package/dist/src/contexts/featureFlagServiceContext/index.js +1 -0
  430. package/dist/src/contexts/graphqlContext/graphqlContext.js +87 -0
  431. package/dist/src/contexts/graphqlContext/index.js +1 -0
  432. package/dist/src/contexts/localStorageContext/index.js +1 -0
  433. package/dist/src/contexts/localStorageContext/localStorageContext.js +95 -0
  434. package/dist/src/contexts/newOrgConfigContext/index.js +1 -0
  435. package/dist/src/contexts/newOrgConfigContext/newOrgConfigContext.js +33 -0
  436. package/dist/src/contexts/searchContext/index.js +1 -0
  437. package/dist/src/contexts/searchContext/searchContext.js +131 -0
  438. package/dist/src/contexts/sessionStorageContext/index.js +1 -0
  439. package/dist/src/contexts/sessionStorageContext/sessionStorageContext.js +43 -0
  440. package/dist/src/contexts/shopifyUrlContext/index.js +1 -0
  441. package/dist/src/contexts/shopifyUrlContext/shopifyUrlContext.js +62 -0
  442. package/dist/src/contexts/systemSettingsContext/index.js +1 -0
  443. package/dist/src/contexts/systemSettingsContext/systemSettingsContext.js +29 -0
  444. package/dist/src/contexts/userIdentityContext/index.js +1 -0
  445. package/dist/src/contexts/userIdentityContext/userIdentityContext.js +118 -0
  446. package/dist/src/events/index.js +51 -0
  447. package/dist/src/events/registerAnalyticsListeners.js +32 -0
  448. package/dist/src/exceptions/index.js +2 -0
  449. package/dist/src/exceptions/sessionExceptions.js +6 -0
  450. package/dist/src/exceptions/unsupportedProductExceptions.js +6 -0
  451. package/dist/src/hooks/AmplitudeOperations/index.js +1 -0
  452. package/dist/src/hooks/AmplitudeOperations/useAmplitudeOperations.js +24 -0
  453. package/dist/src/hooks/AppDetails/index.js +1 -0
  454. package/dist/src/hooks/AppDetails/useAppDetails.js +26 -0
  455. package/dist/src/hooks/BlockBackButton/index.js +1 -0
  456. package/dist/src/hooks/BlockBackButton/useBlockBackButton.js +23 -0
  457. package/dist/src/hooks/CdnOperations/index.js +1 -0
  458. package/dist/src/hooks/CdnOperations/useCdnOperations.js +13 -0
  459. package/dist/src/hooks/ChatToggle/index.js +1 -0
  460. package/dist/src/hooks/ChatToggle/useChatToggle.js +50 -0
  461. package/dist/src/hooks/ChatToggleAnalytics/index.js +1 -0
  462. package/dist/src/hooks/ChatToggleAnalytics/useChatToggleAnalytics.js +11 -0
  463. package/dist/src/hooks/CustomerSupportHandoff/index.js +1 -0
  464. package/dist/src/hooks/CustomerSupportHandoff/useCustomerSupportHandoff.js +32 -0
  465. package/dist/src/hooks/Debounce/index.js +1 -0
  466. package/dist/src/hooks/Debounce/useDebounce.js +13 -0
  467. package/dist/src/hooks/ElementObserver/index.js +1 -0
  468. package/dist/src/hooks/ElementObserver/useElementObserver.js +208 -0
  469. package/dist/src/hooks/GrabAndScroll/index.js +1 -0
  470. package/dist/src/hooks/GrabAndScroll/useGrabAndScroll.js +105 -0
  471. package/dist/src/hooks/GraphQLConfig/index.js +1 -0
  472. package/dist/src/hooks/GraphQLConfig/useGraphQLConfig.js +54 -0
  473. package/dist/src/hooks/IdentifyUser/index.js +1 -0
  474. package/dist/src/hooks/IdentifyUser/useIdentifyUser.js +28 -0
  475. package/dist/src/hooks/ImageResolver/index.js +1 -0
  476. package/dist/src/hooks/ImageResolver/useImageResolver.js +45 -0
  477. package/dist/src/hooks/Intersection/index.js +1 -0
  478. package/dist/src/hooks/Intersection/useIntersection.js +20 -0
  479. package/dist/src/hooks/IsSmallScreen/index.js +1 -0
  480. package/dist/src/hooks/IsSmallScreen/useIsSmallScreen.js +16 -0
  481. package/dist/src/hooks/LocalStorageOperations/index.js +1 -0
  482. package/dist/src/hooks/LocalStorageOperations/useLocalStorageOperations.js +64 -0
  483. package/dist/src/hooks/MessageFilter/index.js +1 -0
  484. package/dist/src/hooks/MessageFilter/useMessageFilter.js +37 -0
  485. package/dist/src/hooks/MessageScrollObserver/index.js +1 -0
  486. package/dist/src/hooks/MessageScrollObserver/useMessageScrollObserver.js +35 -0
  487. package/dist/src/hooks/NewOrgConfig/index.js +1 -0
  488. package/dist/src/hooks/NewOrgConfig/useNewOrgConfig.js +5 -0
  489. package/dist/src/hooks/Search/index.js +1 -0
  490. package/dist/src/hooks/Search/useRecommendedProducts.js +35 -0
  491. package/dist/src/hooks/Search/useSearch.js +224 -0
  492. package/dist/src/hooks/Search/useSearchInput.js +183 -0
  493. package/dist/src/hooks/SearchOperations/index.js +1 -0
  494. package/dist/src/hooks/SearchOperations/useSearchOperations.js +78 -0
  495. package/dist/src/hooks/SessionStorageOperations/index.js +1 -0
  496. package/dist/src/hooks/SessionStorageOperations/useSessionStorageOperations.js +20 -0
  497. package/dist/src/hooks/ShopifyUrlOperations/index.js +1 -0
  498. package/dist/src/hooks/ShopifyUrlOperations/useShopifyUrlOperations.js +34 -0
  499. package/dist/src/hooks/SnapCalculator/index.js +1 -0
  500. package/dist/src/hooks/SnapCalculator/useSnapCalculator.js +22 -0
  501. package/dist/src/hooks/SystemSettingsContext/index.js +1 -0
  502. package/dist/src/hooks/SystemSettingsContext/useSystemSettingsContext.js +9 -0
  503. package/dist/src/hooks/TrackComponentVisibleEvent/index.js +1 -0
  504. package/dist/src/hooks/TrackComponentVisibleEvent/useTrackComponentVisibleEvent.js +45 -0
  505. package/dist/src/hooks/UpdateAnalyticsProps/index.js +1 -0
  506. package/dist/src/hooks/UpdateAnalyticsProps/useUpdateAnalyticsProps.js +43 -0
  507. package/dist/src/hooks/utils.js +116 -0
  508. package/dist/src/interceptors/index.js +1 -0
  509. package/dist/src/interceptors/useMessageInterceptor.js +24 -0
  510. package/dist/src/types/ApiResponse.js +1 -0
  511. package/dist/src/types/FilterAttribute.js +3 -0
  512. package/dist/src/types/Message.js +24 -0
  513. package/dist/src/types/Suggestion.js +3 -0
  514. package/dist/src/types/index.js +4 -0
  515. package/dist/src/util/colorVar.js +3 -0
  516. package/dist/src/util/configVersion.js +4 -0
  517. package/dist/src/util/domInsertion.js +16 -0
  518. package/dist/systemSettingsContext-Cb5kczBD.cjs +60 -0
  519. package/dist/systemSettingsContext-CksCdpiU.js +39 -0
  520. package/dist/types/index.cjs +3 -33
  521. package/dist/types/index.d.cts +2 -3
  522. package/dist/types/index.d.ts +2 -3
  523. package/dist/types/index.js +2 -30
  524. package/dist/types-18QXD2rd.cjs +39 -0
  525. package/dist/types-DQC1pHqD.js +27 -0
  526. package/dist/urlsParser-C-Vzs--G.cjs +78 -0
  527. package/dist/urlsParser-G7Ocwg0M.js +42 -0
  528. package/dist/useAppDetails-BJFRSYbI.js +30 -0
  529. package/dist/useAppDetails-Czn-5FzP.cjs +38 -0
  530. package/dist/useGraphQLConfig-BEtX5pDM.cjs +76 -0
  531. package/dist/useGraphQLConfig-Dkcrz1YL.js +63 -0
  532. package/dist/{useIntersection-UEO0Cezc.js → useIntersection-BWiHkpKL.js} +1 -1
  533. package/dist/{useIntersection-rV0Q8mBH.cjs → useIntersection-DZHz44BY.cjs} +1 -1
  534. package/dist/{utils-ARmpTh1O.js → utils-CEKzBcN2.js} +1 -1
  535. package/dist/utils-CPvqOk0g.cjs +1546 -0
  536. package/dist/{utils-Cavu4XiM.cjs → utils-CsMbZmRw.cjs} +1 -1
  537. package/dist/utils-D_kATUj6.js +92 -0
  538. package/dist/utils-N47VsL9W.js +1364 -0
  539. package/dist/utils-hYTjy7hJ.cjs +130 -0
  540. package/dist/{utils-BLe5oreh.d.ts → utils-wWki3L1d.d.ts} +1 -1
  541. package/package.json +15 -25
  542. package/src/application/commerce-api.ts +38 -37
  543. package/src/application/models/graphql/index.ts +1 -0
  544. package/src/application/models/graphql/queries/getMerchantColorsQuery.ts +1 -23
  545. package/src/application/models/graphql/queries/getMerchantFrontendConfigQuery.ts +1 -89
  546. package/src/application/models/guards/api/isApiFormResponse.ts +4 -4
  547. package/src/application/models/guards/api/isApiFormSubmittedResponseAttributes.ts +2 -2
  548. package/src/application/models/guards/api/isApiOrderResponseAttributes.ts +2 -20
  549. package/src/application/models/guards/api/isApiOrgConfigResults.ts +3 -9
  550. package/src/application/models/guards/api/isApiOrganizationConfig.ts +8 -32
  551. package/src/application/models/guards/api/isApiPDPEventAttributes.ts +8 -5
  552. package/src/application/models/guards/api/isApiPLPEventAttributes.ts +14 -10
  553. package/src/application/models/guards/api/isApiPageResponseAttributes.ts +1 -1
  554. package/src/application/models/guards/api/isApiProductResponseAttributes.ts +2 -4
  555. package/src/application/models/guards/api/isApiProductSearchAttributes.ts +9 -6
  556. package/src/application/models/guards/api/isApiProductSearchFilterAttributes.ts +7 -4
  557. package/src/application/models/guards/api/isApiQueryTypedEventAttributes.ts +8 -3
  558. package/src/application/models/guards/api/isApiResponse.ts +22 -15
  559. package/src/application/models/guards/api/isApiReviewResponseAttributes.ts +1 -1
  560. package/src/application/models/guards/api/isApiReviewRichInformation.ts +1 -1
  561. package/src/application/models/guards/api/isApiTextResponseAttributes.ts +1 -1
  562. package/src/application/models/guards/graphQL/isGraphQLColorsConfig.ts +1 -1
  563. package/src/application/models/guards/isBaseEcommerceEvent.ts +1 -2
  564. package/src/application/models/guards/isGA4EcommerceEvent.ts +1 -1
  565. package/src/application/models/guards/isLegacyUAEcommerceEvent.ts +1 -1
  566. package/src/application/models/guards/isMobilePLPChatPlacementParameter.ts +1 -3
  567. package/src/application/models/guards/isSpanxTakeAQuizCtaParameter.ts +5 -3
  568. package/src/application/models/guards/isVariantInfo.ts +6 -1
  569. package/src/application/models/index.ts +30 -95
  570. package/src/application/models/utils/snakeToCamelTransformer.ts +8 -8
  571. package/src/application/models/validators/validateGraphQLColorsConfig.ts +6 -2
  572. package/src/application/models/validators/validateGraphQLFrontendConfig.ts +6 -6
  573. package/src/application/models/validators/validateMobilePLPChatPlacementParameter.ts +5 -3
  574. package/src/application/models/validators/validateOrgConfigResults.ts +6 -5
  575. package/src/application/models/validators/validateOrganizationConfig.ts +11 -8
  576. package/src/application/models/validators/validateResponse.ts +66 -44
  577. package/src/application/models/validators/validateSuggestion.ts +1 -1
  578. package/src/application/models/validators/validateUserEvent.ts +23 -12
  579. package/src/application/utils/analyticsUtils.ts +16 -38
  580. package/src/application/utils/coreContextToApiContext.ts +3 -1
  581. package/src/application/utils/coreUserEventToApiUserEvent.ts +2 -2
  582. package/src/application/utils/elementObserver.ts +1 -1
  583. package/src/application/utils/imageFilter.ts +5 -2
  584. package/src/application/utils/index.ts +20 -21
  585. package/src/application/utils/messageFromFormSubmittedEvent.ts +1 -1
  586. package/src/application/utils/messageFromQueryEvent.ts +1 -1
  587. package/src/application/utils/messageFromResponse.ts +14 -10
  588. package/src/application/utils/messageFromSuggestionEvent.ts +6 -4
  589. package/src/application/utils/mouseEventTypes.ts +1 -1
  590. package/src/application/utils/nextMessageRequestToApiRequest.ts +1 -1
  591. package/src/application/utils/overrides.ts +1 -49
  592. package/src/application/utils/supportedEventRequestToApiRequest.ts +3 -1
  593. package/src/application/utils/urlsParser.ts +1 -7
  594. package/src/atoms/app/index.ts +15 -25
  595. package/src/atoms/app/variant.ts +1 -1
  596. package/src/atoms/chat/chatState.ts +9 -14
  597. package/src/atoms/chat/form.ts +1 -1
  598. package/src/atoms/chat/messageQueue.ts +25 -50
  599. package/src/atoms/chat/replies.ts +40 -43
  600. package/src/atoms/chat/suggestions.ts +34 -29
  601. package/src/atoms/envive/enviveConfig.ts +14 -20
  602. package/src/atoms/org/customerService.ts +4 -8
  603. package/src/atoms/org/graphqlConfig.ts +7 -15
  604. package/src/atoms/org/index.ts +4 -6
  605. package/src/atoms/org/newOrgConfigAtom.ts +2 -2
  606. package/src/atoms/org/orgAnalyticsConfig.ts +1 -1
  607. package/src/atoms/search/index.ts +0 -1
  608. package/src/atoms/search/productFilters.ts +72 -52
  609. package/src/atoms/search/productRetrievalAPI.ts +72 -0
  610. package/src/atoms/search/productRetrievalAdapter.ts +28 -0
  611. package/src/atoms/search/productSorter.ts +2 -2
  612. package/src/atoms/search/searchAPI.ts +42 -60
  613. package/src/atoms/search/searchServiceAdapter.ts +1 -1
  614. package/src/config/index.ts +1 -0
  615. package/src/contexts/amplitudeContext/amplitudeContext.tsx +104 -143
  616. package/src/contexts/cdnContext/cdnContext.tsx +9 -16
  617. package/src/contexts/enviveConfigContext/enviveConfigContext.tsx +6 -27
  618. package/src/contexts/enviveCssContext/enviveCssContext.tsx +5 -12
  619. package/src/contexts/featureFlagContext/featureFlagContext.tsx +27 -48
  620. package/src/contexts/featureFlagServiceContext/featureFlagServiceContext.tsx +11 -3
  621. package/src/contexts/graphqlContext/graphqlContext.tsx +40 -95
  622. package/src/contexts/localStorageContext/localStorageContext.tsx +26 -60
  623. package/src/contexts/newOrgConfigContext/newOrgConfigContext.tsx +10 -22
  624. package/src/contexts/searchContext/searchContext.tsx +29 -49
  625. package/src/contexts/sessionStorageContext/sessionStorageContext.tsx +12 -33
  626. package/src/contexts/shopifyUrlContext/shopifyUrlContext.tsx +20 -37
  627. package/src/contexts/systemSettingsContext/systemSettingsContext.tsx +8 -21
  628. package/src/contexts/userIdentityContext/userIdentityContext.tsx +33 -77
  629. package/src/events/index.ts +8 -5
  630. package/src/events/registerAnalyticsListeners.ts +10 -13
  631. package/src/exceptions/index.ts +2 -0
  632. package/src/{types/exceptions → exceptions}/unsupportedProductExceptions.ts +2 -2
  633. package/src/global.d.ts +8 -0
  634. package/src/hooks/AmplitudeOperations/useAmplitudeOperations.ts +6 -11
  635. package/src/hooks/AppDetails/useAppDetails.ts +10 -24
  636. package/src/hooks/ChatToggle/useChatToggle.ts +7 -19
  637. package/src/hooks/ChatToggleAnalytics/useChatToggleAnalytics.ts +4 -4
  638. package/src/hooks/CustomerSupportHandoff/useCustomerSupportHandoff.ts +1 -1
  639. package/src/hooks/ElementObserver/useElementObserver.ts +14 -32
  640. package/src/hooks/GrabAndScroll/useGrabAndScroll.ts +125 -124
  641. package/src/hooks/GraphQLConfig/useGraphQLConfig.ts +5 -7
  642. package/src/hooks/ImageResolver/useImageResolver.ts +24 -31
  643. package/src/hooks/LocalStorageOperations/useLocalStorageOperations.ts +12 -19
  644. package/src/hooks/MessageFilter/useMessageFilter.ts +1 -7
  645. package/src/hooks/Search/useRecommendedProducts.ts +50 -0
  646. package/src/hooks/Search/useSearch.tsx +80 -210
  647. package/src/hooks/Search/useSearchInput.ts +227 -0
  648. package/src/hooks/SearchOperations/useSearchOperations.ts +8 -12
  649. package/src/hooks/ShopifyUrlOperations/useShopifyUrlOperations.ts +8 -14
  650. package/src/hooks/SnapCalculator/useSnapCalculator.ts +1 -2
  651. package/src/hooks/TrackComponentVisibleEvent/useTrackComponentVisibleEvent.ts +8 -11
  652. package/src/hooks/UpdateAnalyticsProps/useUpdateAnalyticsProps.ts +11 -25
  653. package/src/hooks/utils.ts +19 -29
  654. package/src/interceptors/index.ts +1 -2
  655. package/src/interceptors/useMessageInterceptor.ts +10 -6
  656. package/src/{application/models/api/response.ts → types/ApiResponse.ts} +35 -29
  657. package/src/types/FilterAttribute.ts +35 -0
  658. package/src/{application/models/message.ts → types/Message.ts} +38 -34
  659. package/src/types/Suggestion.ts +6 -0
  660. package/src/types/index.ts +4 -4
  661. package/src/util/colorVar.ts +4 -0
  662. package/src/util/configVersion.ts +4 -0
  663. package/src/util/domInsertion.ts +17 -0
  664. package/dist/SystemSettingsContext-CCuS3kWH.js +0 -13
  665. package/dist/SystemSettingsContext-Dh_35fES.cjs +0 -20
  666. package/dist/TrackComponentVisibleEvent-B828giM-.js +0 -52
  667. package/dist/TrackComponentVisibleEvent-DsTIH7Yt.cjs +0 -59
  668. package/dist/amplitudeContext-B73xamNe.d.cts +0 -52
  669. package/dist/amplitudeContext-BfRDG5CX.d.ts +0 -52
  670. package/dist/api-Bc3_julZ.cjs +0 -239
  671. package/dist/api-D9gmGNAV.js +0 -166
  672. package/dist/application/models/utilityTypes/index.cjs +0 -1
  673. package/dist/application/models/utilityTypes/index.d.cts +0 -2
  674. package/dist/application/models/utilityTypes/index.d.ts +0 -2
  675. package/dist/application/models/utilityTypes/index.js +0 -3
  676. package/dist/application/models/variantInfo/index.cjs +0 -3
  677. package/dist/application/models/variantInfo/index.d.cts +0 -2
  678. package/dist/application/models/variantInfo/index.d.ts +0 -2
  679. package/dist/application/models/variantInfo/index.js +0 -3
  680. package/dist/atoms/search/types.cjs +0 -5
  681. package/dist/atoms/search/types.d.cts +0 -2
  682. package/dist/atoms/search/types.d.ts +0 -2
  683. package/dist/atoms/search/types.js +0 -3
  684. package/dist/cdnContext-BlRI74F-.cjs +0 -53
  685. package/dist/cdnContext-D26C8Y4H.js +0 -38
  686. package/dist/chat-2NGrmU_Z.cjs +0 -393
  687. package/dist/chat-Bg3wEfNd.js +0 -257
  688. package/dist/chatElementDisplayLocation-D6oLuQS4.d.ts +0 -25
  689. package/dist/chatElementDisplayLocation-DWmfNX_u.d.cts +0 -25
  690. package/dist/chatSearch-B4dsxGth.cjs +0 -418
  691. package/dist/chatSearch-Cvc_eBFV.js +0 -295
  692. package/dist/chatState-2bMtvPgG.js +0 -34
  693. package/dist/chatState-fP1r34CN.cjs +0 -120
  694. package/dist/contexts/chatContext/index.cjs +0 -326
  695. package/dist/contexts/chatContext/index.d.cts +0 -15
  696. package/dist/contexts/chatContext/index.d.ts +0 -15
  697. package/dist/contexts/chatContext/index.js +0 -319
  698. package/dist/contexts/types.cjs +0 -7
  699. package/dist/contexts/types.d.cts +0 -4
  700. package/dist/contexts/types.d.ts +0 -4
  701. package/dist/contexts/types.js +0 -3
  702. package/dist/enviveConfig-BSfyz_pm.js +0 -62
  703. package/dist/enviveConfig-D8vcVPWD.cjs +0 -130
  704. package/dist/enviveConfigContext-C8cCcdKU.cjs +0 -60
  705. package/dist/enviveConfigContext-CJqpRSKu.js +0 -45
  706. package/dist/events-BHJJjPDN.js +0 -78
  707. package/dist/events-B_fJZf9E.cjs +0 -90
  708. package/dist/featureFlagServiceContext-C2Yj-Uyh.d.ts +0 -23
  709. package/dist/featureFlagServiceContext-CiKWV306.d.cts +0 -23
  710. package/dist/featureFlagServiceContext-DFb-uLHN.cjs +0 -62
  711. package/dist/featureFlagServiceContext-Dd_Hbq6e.js +0 -42
  712. package/dist/featureGates-BdvOVv8N.cjs +0 -32
  713. package/dist/featureGates-DhoJq4io.js +0 -26
  714. package/dist/frontendConfig-CbyjUXZW.d.ts +0 -856
  715. package/dist/frontendConfig-tVg0hsWZ.d.cts +0 -856
  716. package/dist/graphql-B9HhDXYt.cjs +0 -53
  717. package/dist/graphql-W7GMIHUu.js +0 -36
  718. package/dist/graphqlConfig-DZHeFKDY.cjs +0 -73
  719. package/dist/graphqlConfig-Xk--JbPl.js +0 -24
  720. package/dist/graphqlContext-BotK7KCg.d.ts +0 -28
  721. package/dist/graphqlContext-CMav2igl.d.cts +0 -28
  722. package/dist/graphqlContext-CSVwhCnP.js +0 -96
  723. package/dist/graphqlContext-aaOOb79d.cjs +0 -111
  724. package/dist/index-7VOYQNo5.d.ts +0 -184
  725. package/dist/index-Bmub8e38.d.cts +0 -98
  726. package/dist/index-CESxqFso.d.cts +0 -228
  727. package/dist/index-CG3P8xE1.d.cts +0 -676
  728. package/dist/index-CalyvQj_.d.ts +0 -1
  729. package/dist/index-CiWEYzXl.d.cts +0 -184
  730. package/dist/index-Cyq5HiC0.d.cts +0 -44
  731. package/dist/index-D9SzePCE.d.cts +0 -186
  732. package/dist/index-DDZmV951.d.ts +0 -186
  733. package/dist/index-L7SEpDLz.d.ts +0 -228
  734. package/dist/index-RcVcRKH7.d.cts +0 -1
  735. package/dist/index-YrhxAGtH.d.ts +0 -676
  736. package/dist/index-exSzn3SP.d.ts +0 -44
  737. package/dist/index-hebsV7fc.d.ts +0 -98
  738. package/dist/interceptors/types.cjs +0 -1
  739. package/dist/interceptors/types.d.cts +0 -13
  740. package/dist/interceptors/types.d.ts +0 -13
  741. package/dist/interceptors/types.js +0 -3
  742. package/dist/localStorageContext-Dwgto93_.js +0 -95
  743. package/dist/localStorageContext-cnMYDllE.cjs +0 -115
  744. package/dist/models-B1P-dSCW.cjs +0 -1537
  745. package/dist/models-CgvSM2fW.js +0 -1296
  746. package/dist/newOrgConfigAtom-CMeY5c6t.js +0 -8
  747. package/dist/newOrgConfigContext-1uwWWCPa.js +0 -53
  748. package/dist/newOrgConfigContext-B0v1q3dk.cjs +0 -68
  749. package/dist/newOrgConfigContext-C8wBmK3q.d.cts +0 -16
  750. package/dist/newOrgConfigContext-D180PO0t.d.ts +0 -16
  751. package/dist/nodeSelector-B3bPtEjX.d.cts +0 -31
  752. package/dist/nodeSelector-DQicm08Y.d.ts +0 -31
  753. package/dist/org-DU3Wck0R.cjs +0 -43
  754. package/dist/org-DptftvB6.js +0 -12
  755. package/dist/search-BtYKpiNB.js +0 -126
  756. package/dist/search-DYVQuYti.d.ts +0 -20
  757. package/dist/search-Du6HZpO6.cjs +0 -205
  758. package/dist/search-filter-types-B5xcaEit.d.ts +0 -102
  759. package/dist/search-filter-types-DZPTzUK9.d.cts +0 -102
  760. package/dist/search-y-ioX5Mz.d.cts +0 -20
  761. package/dist/searchContext-BK43ArCs.cjs +0 -145
  762. package/dist/searchContext-JjZZhDCe.js +0 -129
  763. package/dist/searchServiceAdapter-BSPZOg1r.js +0 -16
  764. package/dist/searchServiceAdapter-DrjFCiw8.cjs +0 -34
  765. package/dist/sessionStorageContext-BQY9r8zz.js +0 -52
  766. package/dist/sessionStorageContext-R2yUAkd9.cjs +0 -66
  767. package/dist/shopifyUrlContext-Bon8_SUJ.js +0 -61
  768. package/dist/shopifyUrlContext-DUdw1xUH.cjs +0 -75
  769. package/dist/spiffyWidgets-BuS00VaQ.d.cts +0 -20
  770. package/dist/spiffyWidgets-DZqG5plz.d.ts +0 -20
  771. package/dist/systemSettingsContext-BjbhIz6y.js +0 -39
  772. package/dist/systemSettingsContext-Dv9EmjmZ.cjs +0 -60
  773. package/dist/test-types-Dl5puRHC.d.ts +0 -40
  774. package/dist/test-types-ThQiO_cc.d.cts +0 -40
  775. package/dist/types-BwNrLPSZ.cjs +0 -106
  776. package/dist/types-CKMMb_gX.d.cts +0 -51
  777. package/dist/types-Csgpt7EV.d.ts +0 -51
  778. package/dist/types-D3uOF0Oy.js +0 -76
  779. package/dist/types-DIk0FLwd.js +0 -30
  780. package/dist/types-DNLkuGWZ.cjs +0 -48
  781. package/dist/types-DSW9XODe.d.cts +0 -10
  782. package/dist/types-DtTnp0o0.js +0 -1
  783. package/dist/types-a8gm_IaQ.cjs +0 -0
  784. package/dist/types-oSg-AkO5.d.ts +0 -10
  785. package/dist/types.cjs +0 -0
  786. package/dist/types.d.cts +0 -15
  787. package/dist/types.d.ts +0 -15
  788. package/dist/types.js +0 -1
  789. package/dist/urlsParser-BV5yF8sa.cjs +0 -78
  790. package/dist/urlsParser-DUgV_Qy9.js +0 -42
  791. package/dist/useAmplitudeOperations-C9o_wDU6.cjs +0 -41
  792. package/dist/useAmplitudeOperations-COq3L1no.js +0 -34
  793. package/dist/useAppDetails-C4GTLEIR.cjs +0 -38
  794. package/dist/useAppDetails-CEksA88Q.js +0 -30
  795. package/dist/useDebounce--rPGMuE7.js +0 -19
  796. package/dist/useDebounce-DECHWSTn.cjs +0 -26
  797. package/dist/useGraphQLConfig-DQoMmpNM.js +0 -63
  798. package/dist/useGraphQLConfig-DzH1nVBh.cjs +0 -76
  799. package/dist/useMessageInterceptor-CstX10ih.cjs +0 -33
  800. package/dist/useMessageInterceptor-D5oAekXn.js +0 -25
  801. package/dist/userIdentityContext-8kfKQRFx.d.ts +0 -20
  802. package/dist/userIdentityContext-D2oFVFzo.d.cts +0 -20
  803. package/dist/utilityTypes-DynzxjK3.js +0 -1
  804. package/dist/utilityTypes-xb8SjKSV.cjs +0 -0
  805. package/dist/utils-B8rATLoc.d.ts +0 -22
  806. package/dist/utils-Bcz5kAgP.js +0 -92
  807. package/dist/utils-CMqFfqZx.cjs +0 -130
  808. package/dist/utils-EDgzCG3Q.d.cts +0 -22
  809. package/dist/utils-V1YTUQng.js +0 -1385
  810. package/dist/utils-VI19AC8S.cjs +0 -1591
  811. package/dist/variantInfo-BRmDpamJ.cjs +0 -17
  812. package/dist/variantInfo-BwBBEWSA.js +0 -11
  813. package/src/application/models/api/context.ts +0 -4
  814. package/src/application/models/api/generationParams.ts +0 -4
  815. package/src/application/models/api/nextMessageRequest.ts +0 -11
  816. package/src/application/models/api/orgAnalyticsConfig.ts +0 -19
  817. package/src/application/models/api/orgConfigResults.ts +0 -44
  818. package/src/application/models/api/organizationConfig.ts +0 -12
  819. package/src/application/models/api/responseGenerics.ts +0 -67
  820. package/src/application/models/api/search.ts +0 -26
  821. package/src/application/models/api/suggestion.ts +0 -4
  822. package/src/application/models/api/supportedEventRequest.ts +0 -8
  823. package/src/application/models/api/userEvent.ts +0 -101
  824. package/src/application/models/cachedValue.ts +0 -8
  825. package/src/application/models/chatElementDisplayLocation.ts +0 -22
  826. package/src/application/models/clientDetails.ts +0 -18
  827. package/src/application/models/colorsConfig.ts +0 -28
  828. package/src/application/models/conversationalSearchIds.ts +0 -5
  829. package/src/application/models/dataLayer.ts +0 -45
  830. package/src/application/models/events.ts +0 -5
  831. package/src/application/models/featureGates.ts +0 -21
  832. package/src/application/models/frontendConfig.ts +0 -14
  833. package/src/application/models/googleAnalyticsEvents.ts +0 -8
  834. package/src/application/models/localStorageEventListener.ts +0 -4
  835. package/src/application/models/mobilePLPChatPlacementParameter.ts +0 -3
  836. package/src/application/models/orgsEnum.ts +0 -36
  837. package/src/application/models/productExperiment.ts +0 -5
  838. package/src/application/models/spanxTakeAQuizCtaParameter.ts +0 -4
  839. package/src/application/models/spiffyWidgets.ts +0 -16
  840. package/src/application/models/utilityTypes/camelCase.ts +0 -87
  841. package/src/application/models/utilityTypes/camelCasedPropertiesDeep.ts +0 -80
  842. package/src/application/models/utilityTypes/delimiterCase.ts +0 -121
  843. package/src/application/models/utilityTypes/delimiterCasedPropertiesDeep.ts +0 -98
  844. package/src/application/models/utilityTypes/index.ts +0 -1
  845. package/src/application/models/utilityTypes/internal.ts +0 -93
  846. package/src/application/models/utilityTypes/primitive.ts +0 -8
  847. package/src/application/models/utilityTypes/snakeCasedPropertiesDeep.ts +0 -49
  848. package/src/application/models/utilityTypes/splitWords.ts +0 -76
  849. package/src/application/models/utilityTypes/trim.ts +0 -28
  850. package/src/application/models/utilityTypes/unknownArray.ts +0 -25
  851. package/src/application/models/variantInfo/index.ts +0 -1
  852. package/src/application/models/variantInfo/pageVisitInfo.ts +0 -6
  853. package/src/application/models/variantInfo/plpInfo.ts +0 -3
  854. package/src/application/models/variantInfo/productInfo.ts +0 -5
  855. package/src/application/models/variantInfo/variantInfo.ts +0 -29
  856. package/src/application/utils/__tests__/divideArrays.test.ts +0 -14
  857. package/src/application/utils/cdnUtils.ts +0 -11
  858. package/src/atoms/search/chatSearch.ts +0 -317
  859. package/src/atoms/search/types.ts +0 -55
  860. package/src/config/divIds.ts +0 -27
  861. package/src/config/socialProofClasses.ts +0 -17
  862. package/src/contexts/chatContext/chatContext.tsx +0 -509
  863. package/src/contexts/chatContext/index.ts +0 -1
  864. package/src/contexts/types.ts +0 -1066
  865. package/src/events/event-types.ts +0 -11
  866. package/src/interceptors/types.ts +0 -6
  867. package/src/merchants/domInsertion.ts +0 -30
  868. package/src/merchants/gridInsertion.ts +0 -19
  869. package/src/types/config-versions.ts +0 -6
  870. package/src/types/customerService.ts +0 -31
  871. package/src/types/custservice-types.ts +0 -28
  872. package/src/types/search-filter-types.ts +0 -111
  873. package/src/types/suggestionBarV2-types.ts +0 -4
  874. package/src/types/test-types.ts +0 -3
  875. package/src/types.ts +0 -11
  876. /package/dist/{AmplitudeOperations-CEwp7tPJ.cjs → featureFlagServiceContext-B4ash4vz.cjs} +0 -0
  877. /package/dist/{AmplitudeOperations-uF2zIi_1.js → featureFlagServiceContext-bI7ZLz4r.js} +0 -0
  878. /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
- };