@envive-ai/react-hooks 0.1.1 → 0.1.2

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 (301) hide show
  1. package/dist/adapters/amplitude/index.cjs +14 -0
  2. package/dist/adapters/amplitude/index.d.cts +4 -0
  3. package/dist/adapters/amplitude/index.d.ts +4 -0
  4. package/dist/adapters/amplitude/index.js +12 -0
  5. package/dist/api-B2euFL-5.cjs +268 -0
  6. package/dist/api-CxGedDxj.cjs +5057 -0
  7. package/dist/api-NJEaveju.js +4113 -0
  8. package/dist/api-XRr_lAG6.js +189 -0
  9. package/dist/application/config/index.cjs +34 -0
  10. package/dist/application/config/index.d.cts +14 -0
  11. package/dist/application/config/index.d.ts +14 -0
  12. package/dist/application/config/index.js +32 -0
  13. package/dist/application/models/graphql/index.cjs +13 -0
  14. package/dist/application/models/graphql/index.d.cts +2 -0
  15. package/dist/application/models/graphql/index.d.ts +2 -0
  16. package/dist/application/models/graphql/index.js +12 -0
  17. package/dist/application/models/guards/api/index.cjs +15 -0
  18. package/dist/application/models/guards/api/index.d.cts +3 -0
  19. package/dist/application/models/guards/api/index.d.ts +3 -0
  20. package/dist/application/models/guards/api/index.js +4 -0
  21. package/dist/application/models/index.cjs +72 -0
  22. package/dist/application/models/index.d.cts +10 -0
  23. package/dist/application/models/index.d.ts +10 -0
  24. package/dist/application/models/index.js +12 -0
  25. package/dist/application/models/utilityTypes/index.cjs +1 -0
  26. package/dist/application/models/utilityTypes/index.d.cts +2 -0
  27. package/dist/application/models/utilityTypes/index.d.ts +2 -0
  28. package/dist/application/models/utilityTypes/index.js +3 -0
  29. package/dist/application/models/variantInfo/index.cjs +1 -0
  30. package/dist/application/models/variantInfo/index.d.cts +2 -0
  31. package/dist/application/models/variantInfo/index.d.ts +2 -0
  32. package/dist/application/models/variantInfo/index.js +3 -0
  33. package/dist/application/service/customerService/index.cjs +4 -0
  34. package/dist/application/service/customerService/index.d.cts +3 -0
  35. package/dist/application/service/customerService/index.d.ts +3 -0
  36. package/dist/application/service/customerService/index.js +4 -0
  37. package/dist/application/service/index.cjs +761 -0
  38. package/dist/application/service/index.d.cts +407 -0
  39. package/dist/application/service/index.d.ts +407 -0
  40. package/dist/application/service/index.js +727 -0
  41. package/dist/application/utils/index.cjs +38 -0
  42. package/dist/application/utils/index.d.cts +254 -0
  43. package/dist/application/utils/index.d.ts +254 -0
  44. package/dist/application/utils/index.js +12 -0
  45. package/dist/atomStore-B3tsg6mF.cjs +0 -0
  46. package/dist/atomStore-BFtpknLM.js +31 -0
  47. package/dist/atomStore-CeJm9Llb.cjs +57 -0
  48. package/dist/atomStore-FSZd_20F.js +1 -0
  49. package/dist/atoms/app/index.cjs +17 -0
  50. package/dist/atoms/app/index.d.cts +33 -0
  51. package/dist/atoms/app/index.d.ts +33 -0
  52. package/dist/atoms/app/index.js +12 -0
  53. package/dist/atoms/atomStore/index.cjs +7 -0
  54. package/dist/atoms/atomStore/index.d.cts +23 -0
  55. package/dist/atoms/atomStore/index.d.ts +23 -0
  56. package/dist/atoms/atomStore/index.js +4 -0
  57. package/dist/atoms/chat/index.cjs +41 -0
  58. package/dist/atoms/chat/index.d.cts +159 -0
  59. package/dist/atoms/chat/index.d.ts +159 -0
  60. package/dist/atoms/chat/index.js +12 -0
  61. package/dist/atoms/globalSearch/index.cjs +6 -0
  62. package/dist/atoms/globalSearch/index.d.cts +23 -0
  63. package/dist/atoms/globalSearch/index.d.ts +23 -0
  64. package/dist/atoms/globalSearch/index.js +3 -0
  65. package/dist/atoms/org/index.cjs +41 -0
  66. package/dist/atoms/org/index.d.cts +93 -0
  67. package/dist/atoms/org/index.d.ts +93 -0
  68. package/dist/atoms/org/index.js +13 -0
  69. package/dist/atoms/search/index.cjs +44 -0
  70. package/dist/atoms/search/index.d.cts +11 -0
  71. package/dist/atoms/search/index.d.ts +11 -0
  72. package/dist/atoms/search/index.js +14 -0
  73. package/dist/{bandolier-DpF-HUG_.js → bandolier-C7PAIw02.js} +17 -7
  74. package/dist/{bandolier-3rHPPhkF.cjs → bandolier-oMkFDJMF.cjs} +56 -46
  75. package/dist/{carpe-BG7Q_KCG.cjs → carpe-C0ccKuR9.cjs} +35 -25
  76. package/dist/{carpe-DLuc07V7.js → carpe-DFc78_lJ.js} +17 -7
  77. package/dist/chat-CCgyDehy.cjs +151 -0
  78. package/dist/chat-Dk6KPb1K.js +25 -0
  79. package/dist/components-CScS7Ii-.cjs +28 -0
  80. package/dist/components-DAQxVIn9.js +10 -0
  81. package/dist/config/locators/components/chat/index.cjs +23 -0
  82. package/dist/config/locators/components/chat/index.d.cts +2 -0
  83. package/dist/config/locators/components/chat/index.d.ts +2 -0
  84. package/dist/config/locators/components/chat/index.js +3 -0
  85. package/dist/config/locators/components/chat/variants/index.cjs +28 -0
  86. package/dist/config/locators/components/chat/variants/index.d.cts +15 -0
  87. package/dist/config/locators/components/chat/variants/index.d.ts +15 -0
  88. package/dist/config/locators/components/chat/variants/index.js +16 -0
  89. package/dist/config/locators/components/index.cjs +5 -0
  90. package/dist/config/locators/components/index.d.cts +2 -0
  91. package/dist/config/locators/components/index.d.ts +2 -0
  92. package/dist/config/locators/components/index.js +3 -0
  93. package/dist/config/locators/components/search/index.cjs +12 -0
  94. package/dist/config/locators/components/search/index.d.cts +7 -0
  95. package/dist/config/locators/components/search/index.d.ts +7 -0
  96. package/dist/config/locators/components/search/index.js +8 -0
  97. package/dist/config/locators/index.cjs +47 -0
  98. package/dist/config/locators/index.d.cts +24 -0
  99. package/dist/config/locators/index.d.ts +24 -0
  100. package/dist/config/locators/index.js +6 -0
  101. package/dist/contexts/index.cjs +15 -4
  102. package/dist/contexts/index.d.cts +9 -1
  103. package/dist/contexts/index.d.ts +12 -4
  104. package/dist/contexts/index.js +15 -4
  105. package/dist/{contexts-Dq7tO_0y.js → contexts-DO75-Kmx.js} +19 -4326
  106. package/dist/{contexts-C4Iz162H.cjs → contexts-iAzSvZjb.cjs} +188 -4488
  107. package/dist/{coterie-FybYN_xE.js → coterie-BGT8hqFR.js} +18 -7
  108. package/dist/{coterie-DUdvJvAs.cjs → coterie-Cp9FAJTQ.cjs} +25 -14
  109. package/dist/customerService-CUyZzowx.js +22 -0
  110. package/dist/customerService-DqPw_XKf.cjs +35 -0
  111. package/dist/custservice-types-D8Npo-5Z.js +22 -0
  112. package/dist/custservice-types-E9_OSaZ7.cjs +34 -0
  113. package/dist/{default-CKyjzyLc.cjs → default-BAXPatxf.cjs} +1 -1
  114. package/dist/default-BR3225LZ.js +4 -0
  115. package/dist/default-DR6YjE9B.cjs +4 -0
  116. package/dist/{default-CL94oJfj.js → default-wf_IORgo.js} +1 -1
  117. package/dist/divIds-BWvq-i6I.js +22 -0
  118. package/dist/{divIds-BOqjn3bE.cjs → divIds-CFyAjjp3.cjs} +6 -79
  119. package/dist/{dreamlandBaby-C8yzW4Nl.cjs → dreamlandBaby-BzuMvUFS.cjs} +28 -18
  120. package/dist/{dreamlandBaby-WXcbsTXO.js → dreamlandBaby-DZvM81LQ.js} +17 -7
  121. package/dist/embedded-BlXJUbik.cjs +130 -0
  122. package/dist/embedded-C1jvFj3v.js +22 -0
  123. package/dist/events/index.cjs +4 -0
  124. package/dist/events/index.d.cts +45 -0
  125. package/dist/events/index.d.ts +45 -0
  126. package/dist/events/index.js +3 -0
  127. package/dist/events-ClCDFK7t.js +77 -0
  128. package/dist/events-Da7gpmGv.cjs +89 -0
  129. package/dist/featureFlagService-CroFRxvD.d.cts +17 -0
  130. package/dist/featureFlagService-NkJ2fuEj.d.ts +17 -0
  131. package/dist/featureGates-BMWXU0dS.d.ts +90 -0
  132. package/dist/featureGates-N_gyHCTn.d.cts +90 -0
  133. package/dist/{fiveCbd-CZYzZPl3.cjs → fiveCbd-DE-tDY3d.cjs} +32 -22
  134. package/dist/{fiveCbd-kl6CoxoF.js → fiveCbd-HNBPqPtX.js} +17 -7
  135. package/dist/{forLoveAndLemons-BD2qh-6B.js → forLoveAndLemons-BKmJJ9pq.js} +13 -5
  136. package/dist/{forLoveAndLemons-BNu-PfFB.cjs → forLoveAndLemons-BeVEBOiu.cjs} +17 -9
  137. package/dist/{types-DGoFEos_.d.cts → frontendConfig-KeNqU1wa.d.cts} +39 -275
  138. package/dist/{types-D4vlfTd0.d.ts → frontendConfig-cPvCTWm6.d.ts} +39 -275
  139. package/dist/globalSearch-BC0rOX3E.js +13 -0
  140. package/dist/globalSearch-hxbXekus.cjs +38 -0
  141. package/dist/{greenpan-LDDXZTsh.js → greenpan-BX1viAZB.js} +17 -7
  142. package/dist/{greenpan-D6fDmjU8.cjs → greenpan-chd3aa5I.cjs} +30 -20
  143. package/dist/{grooveLife-D-1qfxwj.js → grooveLife-CHot3rZw.js} +18 -8
  144. package/dist/{grooveLife-CcylXabB.cjs → grooveLife-DEob7rK0.cjs} +29 -19
  145. package/dist/{homegrownCannabis-BEZzwFlm.cjs → homegrownCannabis-CoIjcehi.cjs} +27 -16
  146. package/dist/{homegrownCannabis-BScZhy9v.js → homegrownCannabis-CwkS1qDA.js} +17 -6
  147. package/dist/hooks/index.cjs +15 -4
  148. package/dist/hooks/index.d.cts +15 -305
  149. package/dist/hooks/index.d.ts +15 -306
  150. package/dist/hooks/index.js +15 -4
  151. package/dist/index-BdNKc2ix.d.cts +8 -0
  152. package/dist/index-BkhvV8RZ.d.cts +202 -0
  153. package/dist/index-BrXuc_Ck.d.cts +24 -0
  154. package/dist/index-C4zjAR1c.d.cts +227 -0
  155. package/dist/index-CGB6CAmr.d.ts +6 -0
  156. package/dist/index-CIco0cCQ.d.ts +183 -0
  157. package/dist/index-COG1kOZG.d.ts +749 -0
  158. package/dist/index-CVxe7FpL.d.cts +6 -0
  159. package/dist/index-Cn1SeI5y.d.cts +183 -0
  160. package/dist/index-Cqg6ltII.d.ts +38 -0
  161. package/dist/index-CzMrMKx-.d.ts +202 -0
  162. package/dist/index-DE_7Q8qK.d.ts +94 -0
  163. package/dist/index-Da0UzyI9.d.ts +24 -0
  164. package/dist/index-DbWWcYax.d.cts +749 -0
  165. package/dist/index-DtoVXd6O.d.cts +97 -0
  166. package/dist/index-JClBRnSX.d.cts +94 -0
  167. package/dist/index-ghzD_356.d.ts +8 -0
  168. package/dist/index-hdbCEjYy.d.cts +38 -0
  169. package/dist/index-luJrHgPN.d.ts +97 -0
  170. package/dist/index-tfRj22E1.d.ts +227 -0
  171. package/dist/interceptors/index.cjs +14 -0
  172. package/dist/interceptors/index.d.cts +25 -0
  173. package/dist/interceptors/index.d.ts +25 -0
  174. package/dist/interceptors/index.js +13 -0
  175. package/dist/{jackArcher-cJJVulZ9.js → jackArcher-BA-pkB4A.js} +17 -7
  176. package/dist/{jackArcher-BwMClqMP.cjs → jackArcher-bewC0q1T.cjs} +34 -24
  177. package/dist/{jordanCraig-DGsCO2o1.cjs → jordanCraig-B5k9nlAw.cjs} +77 -67
  178. package/dist/{jordanCraig-DNDMT0hn.js → jordanCraig-BsQ1mYbt.js} +17 -7
  179. package/dist/{kindredBravely-ROyesnVk.js → kindredBravely-BxYkCpGY.js} +16 -6
  180. package/dist/{kindredBravely-wV2XT1r_.cjs → kindredBravely-DsN0fo3s.cjs} +27 -17
  181. package/dist/{kutFromTheKloth-B6GR8tO9.cjs → kutFromTheKloth-BQTCu3ct.cjs} +28 -18
  182. package/dist/{kutFromTheKloth-BCUOHegv.js → kutFromTheKloth-bukOQM3P.js} +17 -7
  183. package/dist/{larryAndSerges-CqS02fnX.js → larryAndSerges-D1ecaT5a.js} +14 -5
  184. package/dist/{larryAndSerges-CIqB9tKz.cjs → larryAndSerges-bj7fgy9b.cjs} +21 -12
  185. package/dist/{leapsAndRebounds-CFj9F_z1.cjs → leapsAndRebounds-BfneG_0c.cjs} +30 -20
  186. package/dist/{leapsAndRebounds-j4YqSvNb.js → leapsAndRebounds-DhNpZETg.js} +17 -7
  187. package/dist/locators-C2DX_nX6.js +1 -0
  188. package/dist/locators-CUpyd9Wt.cjs +0 -0
  189. package/dist/logger-Dln20ans.cjs +25 -0
  190. package/dist/logger-pdEEY8T2.js +19 -0
  191. package/dist/{longevityrx-9sUQZCVZ.js → longevityrx-CnoGcw0w.js} +17 -7
  192. package/dist/{longevityrx-C-Yc5LPR.cjs → longevityrx-D0goIuX0.cjs} +25 -15
  193. package/dist/{lookOptic-dbaaorhR.cjs → lookOptic-C4afLPZP.cjs} +25 -15
  194. package/dist/{lookOptic-CQryypdM.js → lookOptic-uJWIKpER.js} +17 -7
  195. package/dist/{mantraBrand-D5MTZ6Mj.cjs → mantraBrand-8JUlYtCE.cjs} +46 -36
  196. package/dist/{mantraBrand-CifBQtHp.js → mantraBrand-DuwKHM26.js} +18 -8
  197. package/dist/{medterra-DhENCf-m.js → medterra-BQec8rzn.js} +17 -7
  198. package/dist/{medterra-BCrXdmFE.cjs → medterra-DH067P-V.cjs} +37 -27
  199. package/dist/{modells-aQrV10D7.js → modells-DAgLE2xo.js} +17 -7
  200. package/dist/{modells-C_P_894S.cjs → modells-DUFnLmAz.cjs} +31 -21
  201. package/dist/nodeSelector-DpKXszfU.d.ts +30 -0
  202. package/dist/nodeSelector-vKB44CDB.d.cts +30 -0
  203. package/dist/org-C11APG3v.js +63 -0
  204. package/dist/org-CnHL2I9B.cjs +106 -0
  205. package/dist/{pressedFloral-DErfwwl0.cjs → pressedFloral-DVZVfOSQ.cjs} +36 -26
  206. package/dist/{pressedFloral-D-amnTQK.js → pressedFloral-MdbuoRyA.js} +17 -7
  207. package/dist/search-CvHb1M3S.js +542 -0
  208. package/dist/search-bSYdOBhY.cjs +743 -0
  209. package/dist/search-filter-types-BsJjrxk0.d.ts +101 -0
  210. package/dist/search-filter-types-CqaGK3nM.d.cts +101 -0
  211. package/dist/{skinPerfection-DF6nQXjh.cjs → skinPerfection-BcEWICQN.cjs} +25 -15
  212. package/dist/{skinPerfection-DRVPJp3h.js → skinPerfection-bGiYxq1i.js} +17 -7
  213. package/dist/{snapSupplements-CLZjItJi.cjs → snapSupplements-BXSXTjqF.cjs} +25 -15
  214. package/dist/{snapSupplements-Yxs4jgC-.js → snapSupplements-D7hHhdC9.js} +17 -7
  215. package/dist/{spanx-DVDyAyFC.js → spanx-5-0yX3iK.js} +19 -9
  216. package/dist/{spanx-Cpbot5J5.cjs → spanx-lUzP6Lva.cjs} +31 -21
  217. package/dist/{spanxStaging-DAiFEMRU.js → spanxStaging-HglCMJag.js} +19 -9
  218. package/dist/{spanxStaging-DbaVonN6.cjs → spanxStaging-hreMR0MS.cjs} +35 -25
  219. package/dist/suggestionBarV2-types-B0RbMStE.js +9 -0
  220. package/dist/suggestionBarV2-types-DG3Ekk44.cjs +15 -0
  221. package/dist/{supergoop-C4McrZPT.js → supergoop-C9DDT3lY.js} +18 -7
  222. package/dist/{supergoop-B5VQlsoe.cjs → supergoop-CkjtuRck.cjs} +29 -18
  223. package/dist/test-types-C9b_OdfO.d.ts +39 -0
  224. package/dist/test-types-CpKCxk8U.d.cts +39 -0
  225. package/dist/types/index.cjs +6 -0
  226. package/dist/types/index.d.cts +3 -0
  227. package/dist/types/index.d.ts +3 -0
  228. package/dist/types/index.js +4 -0
  229. package/dist/types-BE4faOO_.d.cts +32 -0
  230. package/dist/{types-QJObznro.cjs → types-BUjohkXp.cjs} +58 -58
  231. package/dist/{types-DZzSQ5a6.js → types-BVsTRyxL.js} +58 -58
  232. package/dist/types-TD8g7LnH.d.ts +32 -0
  233. package/dist/{uniqueVintage-BLp_UtBR.cjs → uniqueVintage-DIMGtYAU.cjs} +47 -37
  234. package/dist/{uniqueVintage-CS4TgOJW.js → uniqueVintage-DPWA5Ed6.js} +17 -7
  235. package/dist/useMessageInterceptor-B-P_rw73.cjs +72 -0
  236. package/dist/useMessageInterceptor-C2RZM-fo.js +57 -0
  237. package/dist/utilityTypes-BVikejDo.js +1 -0
  238. package/dist/utilityTypes-C4h2wgAK.cjs +0 -0
  239. package/dist/variant-BGjOVpY3.d.cts +12 -0
  240. package/dist/variant-XITncuI3.d.ts +12 -0
  241. package/dist/variantInfo-CNRTY0gH.cjs +0 -0
  242. package/dist/variantInfo-CzhR5W6h.js +1 -0
  243. package/dist/{venaCbd-DfnFV7Qp.js → venaCbd-B-znfAsl.js} +17 -7
  244. package/dist/{venaCbd-BxmadOeJ.cjs → venaCbd-BOwOtpOz.cjs} +30 -20
  245. package/dist/{westonJonBoucher-BZdusJgo.cjs → westonJonBoucher-CraTzRVt.cjs} +30 -20
  246. package/dist/{westonJonBoucher-C0FE4Wup.js → westonJonBoucher-DCRagGu3.js} +17 -7
  247. package/dist/{wineEnthusiast-CmhNg47M.js → wineEnthusiast-Bv7umajk.js} +17 -7
  248. package/dist/{wineEnthusiast-DQxdV8Yg.cjs → wineEnthusiast-sVuATrq6.cjs} +29 -19
  249. package/dist/{wolfMattress-vMvqmwgI.js → wolfMattress-BUH-Rhov.js} +17 -6
  250. package/dist/{wolfMattress-CqyOUgPB.cjs → wolfMattress-DpVHIEnJ.cjs} +29 -18
  251. package/dist/{wolfTactical-q3TVDP85.cjs → wolfTactical-BcvF_sy-.cjs} +29 -19
  252. package/dist/{wolfTactical-DvqxZtoA.js → wolfTactical-Q14A1fpw.js} +17 -7
  253. package/package.json +101 -3
  254. package/src/adapters/amplitude/amplitudeAdapter.ts +1 -1
  255. package/src/adapters/spiffy/commerce/api.ts +1 -1
  256. package/src/adapters/spiffy/commerce/graphql.ts +61 -37
  257. package/src/application/config/index.ts +1 -0
  258. package/src/application/models/index.ts +102 -17
  259. package/src/application/models/supportedOrgs.ts +89 -65
  260. package/src/application/service/index.ts +32 -0
  261. package/src/application/service/pageVariantService.ts +201 -114
  262. package/src/application/service/searchService.ts +1 -1
  263. package/src/application/service/windowFrontendConfigService.ts +40 -18
  264. package/src/application/utils/index.ts +22 -3
  265. package/src/atoms/app/variant.ts +48 -29
  266. package/src/atoms/atomStore/index.ts +1 -0
  267. package/src/atoms/chat/messageQueue.ts +34 -17
  268. package/src/atoms/chat/performanceMetrics.ts +51 -38
  269. package/src/atoms/chat/renderedWidgetRefs.ts +14 -15
  270. package/src/atoms/globalSearch/index.ts +1 -0
  271. package/src/atoms/org/org.ts +1 -3
  272. package/src/atoms/org/orgUIConfig.ts +31 -24
  273. package/src/contexts/chatContext.tsx +124 -72
  274. package/src/events/registerAnalyticsListeners.ts +13 -9
  275. package/src/hooks/useFileUpload.ts +9 -7
  276. package/src/hooks/useSearch.tsx +3 -3
  277. package/src/initialize.ts +1 -1
  278. package/src/interceptors/index.ts +3 -0
  279. package/src/main.tsx +1 -1
  280. package/src/types/index.ts +4 -0
  281. package/dist/GridInsertionService-C00upKLB.js +0 -40
  282. package/dist/GridInsertionService-CMJVhD6q.cjs +0 -52
  283. package/dist/custservice-types-BgjGHCtD.cjs +0 -16
  284. package/dist/custservice-types-V6FWABp4.js +0 -10
  285. package/dist/default-DMtAjA62.cjs +0 -4
  286. package/dist/default-zcmT2032.js +0 -4
  287. package/dist/divIds-Cfp3v_rG.js +0 -35
  288. package/dist/domInsertionService-BtzuH2Sc.js +0 -65
  289. package/dist/domInsertionService-Cb9814oM.cjs +0 -89
  290. package/dist/suggestionBarV2-types-XHYD3j8E.cjs +0 -46
  291. package/dist/suggestionBarV2-types-aiQmVx5m.js +0 -34
  292. package/src/atoms/index.ts +0 -5
  293. package/src/index.ts +0 -31
  294. /package/dist/{cdnService-CAyO3axV.js → cdnService-DvDSpfVJ.js} +0 -0
  295. /package/dist/{cdnService-DIF1i7VC.cjs → cdnService-dJU3sHpF.cjs} +0 -0
  296. /package/dist/{entrypoints-RmIbdYxh.js → entrypoints-CmmOszXO.js} +0 -0
  297. /package/dist/{entrypoints-C8JwiMYA.cjs → entrypoints-fowCLUT2.cjs} +0 -0
  298. /package/dist/{socialProofClasses-CaA83vI4.cjs → socialProofClasses-BYLiEXpU.cjs} +0 -0
  299. /package/dist/{socialProofClasses-KB7zOMmg.js → socialProofClasses-CkJufEGb.js} +0 -0
  300. /package/src/atoms/{atomStore.ts → atomStore/atomStore.ts} +0 -0
  301. /package/src/atoms/{globalSearch.ts → globalSearch/globalSearch.ts} +0 -0
@@ -0,0 +1,749 @@
1
+ import { OrgConfig, OrganizationConfig as OrganizationConfig$1 } from "./featureGates-N_gyHCTn.cjs";
2
+ import { GetMerchantColorsQueryData } from "./index-DtoVXd6O.cjs";
3
+ import { AcceptableFormFieldType, ApiFormResponseAttributes, ApiPageResponseAttributes, OrderResponseAttributes as OrderResponseAttributes$1, PageResponseAttributes, ProductResponseAttributes, Response as Response$1, ReviewResponseAttributes, SearchProductFilterAttributes, SearchProductResponseAttributes, SearchResponseAttributes, TextResponseAttributes } from "./index-Cn1SeI5y.cjs";
4
+ import { CamelCasedPropertiesDeep, NonRecursiveType, UnknownArray, UpperCaseCharacters, WordSeparators } from "./index-C4zjAR1c.cjs";
5
+ import { ColorMapping, FrontendConfig, OrgPageConfig, OrgUIConfig, PageVariantConfig, WidgetConfig, WidgetMountingConfig } from "./frontendConfig-KeNqU1wa.cjs";
6
+ import { VariantInfo } from "./index-hdbCEjYy.cjs";
7
+ import { Context, CustServiceAttachment, FormSubmittedAttributes, FormType, FulfillmentDisplayStatus, GenerationParams, OrderItemInfo, OrderResponseAttributes, OrganizationConfig, OrganizationSettings, PDPAttributes, PLPAttributes, PLPIdAttributes, PageVisitCategory, ProductSearchFilterResponseAttributes, ProductSearchResponse, ProductSearchResponseAttributes, QueryTypedAttributes, SearchAttributes, SearchResponseProduct, StatsigExperiment, StatsigFeatureGate, Suggestion, SuggestionClickedAttributes, UserEvent, UserEventCategory } from "@spiffy-ai/commerce-api-client";
8
+
9
+ //#region src/application/models/cachedValue.d.ts
10
+ interface CachedValue {
11
+ value: unknown;
12
+ expiry: number;
13
+ }
14
+ //#endregion
15
+ //#region src/application/models/clientDetails.d.ts
16
+ interface ClientDetails {
17
+ os?: string;
18
+ osVersion?: string;
19
+ deviceBrand?: string;
20
+ deviceManufacturer?: string;
21
+ deviceModel?: string;
22
+ carrier?: string;
23
+ country?: string;
24
+ region?: string;
25
+ browser?: string;
26
+ browserVersion?: string;
27
+ browserIpAddress?: string;
28
+ userAgent?: string;
29
+ }
30
+ //#endregion
31
+ //#region src/application/models/conversationalSearchIds.d.ts
32
+ type ConversationalSearchIds = {
33
+ conversationalSearchEntrypointId?: string;
34
+ conversationalSearchInputId?: string;
35
+ conversationalSearchModalId?: string;
36
+ };
37
+ //#endregion
38
+ //#region src/application/models/dataLayer.d.ts
39
+ /**
40
+ * Base interface for common properties across all ecommerce events
41
+ */
42
+ interface BaseEcommerceEvent {
43
+ event: string;
44
+ ecommerce: UAEcommerceData | GA4EcommerceData;
45
+ }
46
+ /**
47
+ * Legacy universal analytics data. The actual payload contains more fields, but we
48
+ * only need the ones listed below.
49
+ */
50
+ interface UAEcommerceData {
51
+ add: {
52
+ products: {
53
+ name: string;
54
+ category: string;
55
+ price: string;
56
+ quantity: string;
57
+ }[];
58
+ currencyCode: string;
59
+ };
60
+ }
61
+ /**
62
+ * Google Analytics 4 data. The actual payload contains more fields, but we
63
+ * only need the ones listed below.
64
+ */
65
+ interface GA4EcommerceData {
66
+ currency: string;
67
+ items: {
68
+ item_name: string;
69
+ item_category: string;
70
+ price: number;
71
+ quantity: number;
72
+ }[];
73
+ }
74
+ interface UAEcommerceEvent extends BaseEcommerceEvent {
75
+ ecommerce: UAEcommerceData;
76
+ }
77
+ interface GA4EcommerceEvent extends BaseEcommerceEvent {
78
+ ecommerce: GA4EcommerceData;
79
+ }
80
+ //#endregion
81
+ //#region src/application/models/domMutationContinuation.d.ts
82
+ declare enum DomMutationObserverContinuation {
83
+ CONTINUE = "CONTINUE",
84
+ EXECUTING = "EXECUTING",
85
+ STOP = "STOP",
86
+ }
87
+ //#endregion
88
+ //#region src/application/models/domObservationStrategy.d.ts
89
+ declare enum DomObservationStrategy {
90
+ MutationObserver = "MutationObserver",
91
+ Polling = "Polling",
92
+ None = "None",
93
+ }
94
+ //#endregion
95
+ //#region src/application/models/events.d.ts
96
+ declare enum SpiffyEventName {
97
+ WidgetOpen = "spiffy:widgetopen",
98
+ WidgetClose = "spiffy:widgetclose",
99
+ }
100
+ //#endregion
101
+ //#region src/application/models/googleAnalyticsEvents.d.ts
102
+ declare enum GoogleAnalyticsEvents {
103
+ ADD_TO_CART_v1 = "add_to_cart",
104
+ ADD_TO_CART_v2 = "addToCart",
105
+ }
106
+ //#endregion
107
+ //#region src/application/models/message.d.ts
108
+ declare enum MessageRole {
109
+ User = "user",
110
+ Assistant = "assistant",
111
+ }
112
+ declare enum MessageType {
113
+ Text = "text",
114
+ SuggestionClicked = "suggestion_clicked",
115
+ Product = "product",
116
+ ProductSearch = "product_search",
117
+ Review = "review",
118
+ QueryTyped = "query_typed",
119
+ Separator = "separator",
120
+ Page = "page",
121
+ Search = "search",
122
+ Attachment = "attachment",
123
+ CXAgentResponse = "cx_agent_response",
124
+ Form = "form",
125
+ Order = "order",
126
+ ProductSearchFilter = "product_search_filter",
127
+ }
128
+ type Message = {
129
+ id: string;
130
+ role: MessageRole;
131
+ createdAt: string;
132
+ } & (TextMessageMetadata | QueryTypedMetadata | SuggestionMessageMetadata | ProductMessageMetadata | ProductSearchMessageMetadata | ReviewMessageMetadata | SeparatorMessageMetadata | PageMessageMetadata | SearchMessageMetadata | AttachmentMetadata | CXAgentResponseMetadata | FormMessageMetadata | OrderMessageMetadata | ProductSearchFilterMetadata);
133
+ type AttachmentMetadata = {
134
+ type: MessageType.Attachment;
135
+ metadata: {
136
+ message?: string;
137
+ attachment: CustServiceAttachment[];
138
+ };
139
+ };
140
+ type CXAgentResponseMetadata = {
141
+ type: MessageType.CXAgentResponse;
142
+ metadata: {
143
+ message: string;
144
+ agentName: string;
145
+ };
146
+ };
147
+ type TextMessageMetadata = {
148
+ type: MessageType.Text;
149
+ metadata: TextResponseAttributes['attributes'];
150
+ };
151
+ type QueryTypedMetadata = {
152
+ type: MessageType.QueryTyped;
153
+ metadata: TextResponseAttributes['attributes'];
154
+ };
155
+ type SuggestionMessageMetadata = {
156
+ type: MessageType.SuggestionClicked;
157
+ metadata: {
158
+ suggestionId: string;
159
+ suggestionContent: string;
160
+ };
161
+ };
162
+ type ProductMessageMetadata = {
163
+ type: MessageType.Product;
164
+ metadata: ProductResponseAttributes['attributes'];
165
+ };
166
+ type ProductSearchMessageMetadata = {
167
+ type: MessageType.ProductSearch;
168
+ metadata: SearchProductResponseAttributes['attributes'];
169
+ };
170
+ type ReviewMessageMetadata = {
171
+ type: MessageType.Review;
172
+ metadata: ReviewResponseAttributes['attributes'];
173
+ };
174
+ type SeparatorMessageMetadata = {
175
+ type: MessageType.Separator;
176
+ };
177
+ type PageMessageMetadata = {
178
+ type: MessageType.Page;
179
+ metadata: PageResponseAttributes['attributes'];
180
+ };
181
+ type SearchMessageMetadata = {
182
+ type: MessageType.Search;
183
+ metadata: SearchResponseAttributes['attributes'];
184
+ };
185
+ type ProductSearchFilterMetadata = {
186
+ type: MessageType.ProductSearchFilter;
187
+ metadata: SearchProductFilterAttributes['attributes'];
188
+ };
189
+ type FormField = {
190
+ key: string;
191
+ title: string;
192
+ type: AcceptableFormFieldType;
193
+ required: boolean;
194
+ format?: 'email';
195
+ value?: string;
196
+ };
197
+ type FormMessageMetadata = {
198
+ type: MessageType.Form;
199
+ metadata: {
200
+ formType?: FormType;
201
+ fields: FormField[];
202
+ };
203
+ };
204
+ type OrderMessageMetadata = {
205
+ type: MessageType.Order;
206
+ metadata: OrderResponseAttributes$1['attributes'];
207
+ };
208
+ //#endregion
209
+ //#region src/application/models/mobilePLPChatPlacementParameter.d.ts
210
+ interface MobilePLPChatPlacementParameter {
211
+ rowIndex: number;
212
+ }
213
+ //#endregion
214
+ //#region src/application/models/orgsEnum.d.ts
215
+ declare const OrgShortName: {
216
+ readonly Coterie: "coterie";
217
+ readonly ForLoveAndLemons: "for-love-and-lemons";
218
+ readonly Greenpan: "greenpan";
219
+ readonly JordanCraig: "jordan-craig";
220
+ readonly LarryAndSerges: "larry_and_serges";
221
+ readonly LeapsAndRebounds: "leaps-and-rebounds";
222
+ readonly MantraBrand: "mantra-brand";
223
+ readonly Spanx: "spanx";
224
+ readonly SpanxStaging: "staging-spanx";
225
+ readonly Supergoop: "supergoop";
226
+ readonly UniqueVintage: "unique-vintage";
227
+ readonly JackArcher: "jack-archer";
228
+ readonly SkinPerfection: "skin-perfection";
229
+ readonly LookOptic: "look-optic";
230
+ readonly FiveCbd: "five-cbd";
231
+ readonly SnapSupplements: "snap-supplements";
232
+ readonly Longevityrx: "longevityrx";
233
+ readonly VenaCbd: "vena-cbd";
234
+ readonly Medterra: "medterra";
235
+ readonly Modells: "modells";
236
+ readonly PressedFloral: "pressed-floral";
237
+ readonly KindredBravely: "kindred-bravely";
238
+ readonly WineEnthusiast: "wine-enthusiast";
239
+ readonly HomegrownCannabis: "homegrown-cannabis";
240
+ readonly DreamlandBaby: "dreamland-baby";
241
+ readonly Bandolier: "bandolier";
242
+ readonly WestonJonBoucher: "weston-jon-boucher";
243
+ readonly KutFromTheKloth: "kut-from-the-kloth";
244
+ readonly GrooveLife: "groove-life";
245
+ readonly Carpe: "carpe";
246
+ readonly WolfTactical: "wolf-tactical";
247
+ readonly WolfMattress: "wolfmattress";
248
+ readonly Default: "default";
249
+ };
250
+ //#endregion
251
+ //#region src/application/models/productExperiment.d.ts
252
+ declare enum ProductExperiment {
253
+ Default = "default",
254
+ }
255
+ //#endregion
256
+ //#region src/application/models/spanxTakeAQuizCtaParameter.d.ts
257
+ interface SpanxTakeAQuizCtaParameter {
258
+ text?: string;
259
+ value?: string;
260
+ }
261
+ //#endregion
262
+ //#region src/application/models/spiffyWidgets.d.ts
263
+ /**
264
+ * Enum of all widget names. These are widgets that are rendered and integrated into
265
+ * a merchant's website.
266
+ */
267
+ declare enum SpiffyWidgets {
268
+ ImageBanner = "image_banner",
269
+ ImagePromptCard = "image_prompt_card",
270
+ SingleImagePrompt = "single_image_prompt",
271
+ EmbeddedWidget = "embedded_widget",
272
+ FloatingButton = "floating_button",
273
+ SuggestionBar = "suggestion_bar",
274
+ SearchPrompt = "search_prompt",
275
+ GlobalSearch = "global_search",
276
+ SearchResults = "search_results",
277
+ GlobalSearchEntryPoint = "global_search_entry_point",
278
+ }
279
+ //#endregion
280
+ //#region src/application/models/supportedOrgs.d.ts
281
+ type BasicOrgInfoType = {
282
+ shortName: string;
283
+ name: string;
284
+ domain: string;
285
+ defaultProductId: string;
286
+ alwaysEnabledMerchants: boolean;
287
+ orgUIConfig: () => OrgUIConfig | undefined;
288
+ orgPageConfig: () => OrgPageConfig;
289
+ orgColors: () => ColorMapping | {};
290
+ };
291
+ declare const getOrgInfo: (orgShortName: string) => Promise<BasicOrgInfoType>;
292
+ //#endregion
293
+ //#region src/application/models/api/context.d.ts
294
+ interface Context$1 extends CamelCasedPropertiesDeep<Context> {}
295
+ //#endregion
296
+ //#region src/application/models/api/generationParams.d.ts
297
+ interface GenerationParams$1 extends CamelCasedPropertiesDeep<GenerationParams> {}
298
+ //#endregion
299
+ //#region src/application/models/api/userEvent.d.ts
300
+ interface PDPAttributes$1 extends CamelCasedPropertiesDeep<PDPAttributes> {}
301
+ interface PLPAttributes$1 extends CamelCasedPropertiesDeep<PLPAttributes> {}
302
+ interface SearchAttributes$1 extends CamelCasedPropertiesDeep<SearchAttributes> {}
303
+ interface QueryTypedAttributes$1 extends CamelCasedPropertiesDeep<QueryTypedAttributes> {}
304
+ interface FormSubmittedAttributes$1 {
305
+ filledSchema: Record<string, unknown>;
306
+ formResponseId: string;
307
+ formType: FormType;
308
+ }
309
+ interface PageVisitAttributes {
310
+ url: string;
311
+ pageVisitCategory: PageVisitCategory;
312
+ }
313
+ interface SuggestionClickedAttributes$1 extends CamelCasedPropertiesDeep<SuggestionClickedAttributes> {}
314
+ type UserEventAttributes = PDPAttributes$1 | PLPAttributes$1 | QueryTypedAttributes$1 | SearchAttributes$1 | SuggestionClickedAttributes$1 | PageVisitAttributes;
315
+ interface PDPUserEvent {
316
+ category: UserEventCategory.PdpVisit | UserEventCategory.AddToCart;
317
+ attributes: PDPAttributes$1;
318
+ }
319
+ interface PLPUserEvent {
320
+ category: UserEventCategory.PlpVisit;
321
+ attributes: PLPAttributes$1;
322
+ }
323
+ interface QueryTypedUserEvent {
324
+ category: UserEventCategory.QueryTyped;
325
+ attributes: QueryTypedAttributes$1;
326
+ }
327
+ interface SearchUserEvent {
328
+ category: UserEventCategory.Search;
329
+ attributes: SearchAttributes$1;
330
+ }
331
+ interface SuggestionsClickedUserEvent {
332
+ category: UserEventCategory.SuggestionClicked;
333
+ attributes: SuggestionClickedAttributes$1;
334
+ }
335
+ interface AppLoadedUserEvent {
336
+ category: UserEventCategory.AppLoaded;
337
+ }
338
+ interface AppUnloadedEvent {
339
+ category: UserEventCategory.AppUnloaded;
340
+ }
341
+ interface PageVisitEvent {
342
+ category: UserEventCategory.PageVisit;
343
+ attributes: PageVisitAttributes;
344
+ }
345
+ interface FormSubmitted {
346
+ category: UserEventCategory.FormSubmitted;
347
+ attributes: FormSubmittedAttributes$1;
348
+ }
349
+ type UserEvent$1 = CamelCasedPropertiesDeep<Pick<UserEvent, 'event_id' | 'category' | 'created_at'>> & (SuggestionsClickedUserEvent | AppLoadedUserEvent | PDPUserEvent | QueryTypedUserEvent | SearchUserEvent | AppUnloadedEvent | PLPUserEvent | PageVisitEvent | FormSubmitted);
350
+ //#endregion
351
+ //#region src/application/models/api/nextMessageRequest.d.ts
352
+ interface NextMessageRequest$1 {
353
+ id: string;
354
+ context: Context$1;
355
+ userEvents?: UserEvent$1[];
356
+ featureFlags?: Record<string, boolean>;
357
+ generationParams?: GenerationParams$1;
358
+ }
359
+ //#endregion
360
+ //#region src/application/models/api/search.d.ts
361
+ interface ProductSearchResponse$1 extends CamelCasedPropertiesDeep<ProductSearchResponse> {}
362
+ interface ProductSearchResponseAttributes$1 extends CamelCasedPropertiesDeep<ProductSearchResponseAttributes> {}
363
+ interface SearchResult {
364
+ products: SearchResponseProduct[];
365
+ filters: string[];
366
+ generatedQuery?: string;
367
+ totalProductCount: number;
368
+ searchResponseId: string;
369
+ }
370
+ interface SearchParams {
371
+ query: string;
372
+ limit?: number;
373
+ }
374
+ //#endregion
375
+ //#region src/application/models/api/suggestion.d.ts
376
+ interface Suggestion$1 extends CamelCasedPropertiesDeep<Suggestion> {}
377
+ //#endregion
378
+ //#region src/application/models/api/supportedEventRequest.d.ts
379
+ interface SupportedEventRequest$1 {
380
+ id: string;
381
+ context: Context$1;
382
+ userEvent: UserEvent$1;
383
+ }
384
+ //#endregion
385
+ //#region src/application/models/graphql/queries/getMerchantOrgIdQuery.d.ts
386
+ declare const getMerchantOrgIdQuery = "\n query {\n me {\n org {\n id\n }\n }\n }\n";
387
+ //#endregion
388
+ //#region src/application/models/guards/isBaseEcommerceEvent.d.ts
389
+ /**
390
+ * Checks if an event is a base Google Analytics ecommerce event.
391
+ *
392
+ * @param data The event to check.
393
+ *
394
+ * @returns True if the event is a base ecommerce event, false otherwise.
395
+ */
396
+ declare const isBaseEcommerceEvent: (data: unknown) => data is BaseEcommerceEvent;
397
+ //#endregion
398
+ //#region src/application/models/guards/isGA4EcommerceEvent.d.ts
399
+ /**
400
+ * Checks if an event is a Google Analytics 4 ecommerce event.
401
+ *
402
+ * @param data The event to check.
403
+ *
404
+ * @returns True if the event is a GA4 ecommerce event, false otherwise.
405
+ */
406
+ declare const isGA4EcommerceEvent: (data: unknown) => data is GA4EcommerceEvent;
407
+ //#endregion
408
+ //#region src/application/models/guards/isLegacyUAEcommerceEvent.d.ts
409
+ /**
410
+ * Checks if an event is a legacy Universal Analytics ecommerce event.
411
+ *
412
+ * @param data The event to check.
413
+ *
414
+ * @returns True if the event is a legacy UA ecommerce event, false otherwise.
415
+ */
416
+ declare const isLegacyUAEcommerceEvent: (data: unknown) => data is UAEcommerceEvent;
417
+ //#endregion
418
+ //#region src/application/models/guards/isMobilePLPChatPlacementParameter.d.ts
419
+ interface MobilePlpChatPlacementParameter {
420
+ row_index: number;
421
+ }
422
+ declare const isMobilePLPChatPlacementParameter: (value: unknown) => value is MobilePlpChatPlacementParameter;
423
+ //#endregion
424
+ //#region src/application/models/guards/isSpanxTakeAQuizCtaParameter.d.ts
425
+ declare const isSpanxTakeAQuizCtaParameter: (value: unknown) => value is SpanxTakeAQuizCtaParameter;
426
+ //#endregion
427
+ //#region src/application/models/guards/isVariantInfo.d.ts
428
+ /**
429
+ * Type guard to check if an object is a valid VariantInfo.
430
+ *
431
+ * @param variantInfo - The unknown object to check.
432
+ *
433
+ * @returns True if the data is a valid VariantInfo object, false otherwise.
434
+ */
435
+ declare const isVariantInfo: (variantInfo: unknown) => variantInfo is VariantInfo;
436
+ //#endregion
437
+ //#region src/application/models/guards/utils.d.ts
438
+ /**
439
+ * Checks if an object has a property of a specific type
440
+ *
441
+ * @param obj - The object to check
442
+ * @param prop - The property name to check
443
+ * @param type - The expected type of the property
444
+ * @param isOptional - Whether the property is optional (defaults to false)
445
+ *
446
+ * @returns boolean indicating if the object has the property of the specified type
447
+ */
448
+ declare const hasPropertyOfType: <T extends object>(obj: unknown, prop: keyof T, type: "string" | "number" | "boolean" | "object" | "array", isOptional?: boolean) => obj is T;
449
+ //#endregion
450
+ //#region src/application/models/guards/api/isApiFormResponse.d.ts
451
+ /**
452
+ * Type guard to check if the provided data has the all of the properties (with the correct types) of
453
+ * a FormResponseAttribute
454
+ *
455
+ * @param data - The data to check
456
+ *
457
+ * @returns true if the data has the correct properties, false otherwise
458
+ */
459
+ declare const isApiFormResponseAttributes: (data: unknown) => data is ApiFormResponseAttributes;
460
+ //#endregion
461
+ //#region src/application/models/guards/api/isApiFormSubmittedResponseAttributes.d.ts
462
+ declare const isApiFormSubmittedResponseAttributes: (data: unknown) => data is FormSubmittedAttributes;
463
+ //#endregion
464
+ //#region src/application/models/guards/api/isApiOrderResponseAttributes.d.ts
465
+ interface ApiOrderItemInfo extends Omit<OrderItemInfo, 'delivered_at' | 'estimated_delivery_at' | 'in_transit_at'> {
466
+ delivered_at?: string;
467
+ estimated_delivery_at?: string;
468
+ in_transit_at?: string;
469
+ }
470
+ interface ApiOrderResponseAttributes extends Omit<OrderResponseAttributes, 'created_at' | 'latest_event_date' | 'line_items'> {
471
+ created_at: string;
472
+ latest_event_date: string;
473
+ line_items: ApiOrderItemInfo[];
474
+ }
475
+ declare const isApiOrderResponseAttributes: (data: unknown) => data is ApiOrderResponseAttributes;
476
+ //#endregion
477
+ //#region src/application/models/guards/api/isApiOrganizationConfig.d.ts
478
+ interface ApiOrgAnalyticsConfigAmplitude {
479
+ session_replay_enabled: boolean;
480
+ session_replay_sample_rate: number;
481
+ tracking_enabled: boolean;
482
+ }
483
+ interface ApiOrgAnalyticsConfigCustomerService {
484
+ provider: string;
485
+ }
486
+ interface ApiOrgAnalyticsConfigGoogleAnalytics {
487
+ measurement_id: string;
488
+ }
489
+ interface ApiOrgAnalyticsConfig {
490
+ amplitude?: ApiOrgAnalyticsConfigAmplitude;
491
+ customer_service?: ApiOrgAnalyticsConfigCustomerService;
492
+ google_analytics?: ApiOrgAnalyticsConfigGoogleAnalytics;
493
+ }
494
+ interface ApiOrganizationConfig extends OrganizationConfig {
495
+ config: ApiOrgAnalyticsConfig;
496
+ }
497
+ /**
498
+ *
499
+ * @param data
500
+ * @returns
501
+ */
502
+ declare const isApiOrganizationConfig: (data: unknown) => data is ApiOrganizationConfig;
503
+ //#endregion
504
+ //#region src/application/models/guards/api/isApiOrgConfigResults.d.ts
505
+ interface ApiOrgConfigResults {
506
+ configs: ApiOrganizationConfig[];
507
+ experiments: StatsigExperiment[];
508
+ gates: StatsigFeatureGate[];
509
+ org: OrganizationSettings;
510
+ }
511
+ /**
512
+ *
513
+ * @param data
514
+ * @returns
515
+ */
516
+ declare const isApiOrgConfigResults: (data: unknown) => data is Required<ApiOrgConfigResults>;
517
+ //#endregion
518
+ //#region src/application/models/guards/api/isApiPageResponseAttributes.d.ts
519
+ declare const isApiPageResponseAttributes: (obj: unknown) => obj is ApiPageResponseAttributes;
520
+ //#endregion
521
+ //#region src/application/models/guards/api/isApiPLPEventAttributes.d.ts
522
+ declare const isApiPLPIdAttribute: (data: unknown) => data is PLPIdAttributes;
523
+ declare const isApiPLPEventAttributes: (data: unknown) => data is PLPAttributes;
524
+ //#endregion
525
+ //#region src/application/models/guards/api/isApiProductSearchFilterAttributes.d.ts
526
+ declare const isApiProductSearchFilterResponseAttributes: (attributes: unknown) => attributes is ProductSearchFilterResponseAttributes;
527
+ //#endregion
528
+ //#region src/application/models/guards/graphQL/isGraphQLColorsConfig.d.ts
529
+ declare const isGraphQLColorsConfig: (data: unknown) => data is GetMerchantColorsQueryData;
530
+ //#endregion
531
+ //#region src/application/models/utilityTypes/delimiterCase.d.ts
532
+ type UpperCaseToLowerCase<T extends string> = T extends Uppercase<T> ? Lowercase<T> : T;
533
+ type SplitIncludingDelimiters_<Source extends string, Delimiter extends string> = Source extends '' ? [] : Source extends `${infer FirstPart}${Delimiter}${infer SecondPart}` ? Source extends `${FirstPart}${infer UsedDelimiter}${SecondPart}` ? UsedDelimiter extends Delimiter ? Source extends `${infer FirstPart}${UsedDelimiter}${infer SecondPart}` ? [...SplitIncludingDelimiters<FirstPart, Delimiter>, UsedDelimiter, ...SplitIncludingDelimiters<SecondPart, Delimiter>] : never : never : never : [Source];
534
+ /**
535
+ * Unlike a simpler split, this one includes the delimiter splitted on in the resulting array literal. This is to enable splitting on, for example, upper-case characters.
536
+ *
537
+ * @category Template literal
538
+ */
539
+ type SplitIncludingDelimiters<Source extends string, Delimiter extends string> = SplitIncludingDelimiters_<UpperCaseToLowerCase<Source>, Delimiter>;
540
+ /**
541
+ *Format a specific part of the splitted string literal that `StringArrayToDelimiterCase<>` fuses together, ensuring desired casing.
542
+ *
543
+ *@see StringArrayToDelimiterCase
544
+ */
545
+ type StringPartToDelimiterCase<StringPart extends string, Start extends boolean, UsedWordSeparators extends string, UsedUpperCaseCharacters extends string, Delimiter extends string> = StringPart extends UsedWordSeparators ? Delimiter : Start extends true ? Lowercase<StringPart> : StringPart extends UsedUpperCaseCharacters ? `${Delimiter}${Lowercase<StringPart>}` : StringPart;
546
+ /**
547
+ * Takes the result of a splitted string literal and recursively concatenates it together into the desired casing.
548
+ *
549
+ * It receives `UsedWordSeparators` and `UsedUpperCaseCharacters` as input to ensure it's fully encapsulated.
550
+ *
551
+ * @see SplitIncludingDelimiters
552
+ */
553
+ type StringArrayToDelimiterCase<Parts extends readonly any[], Start extends boolean, UsedWordSeparators extends string, UsedUpperCaseCharacters extends string, Delimiter extends string> = Parts extends [`${infer FirstPart}`, ...infer RemainingParts] ? `${StringPartToDelimiterCase<FirstPart, Start, UsedWordSeparators, UsedUpperCaseCharacters, Delimiter>}${StringArrayToDelimiterCase<RemainingParts, false, UsedWordSeparators, UsedUpperCaseCharacters, Delimiter>}` : Parts extends [string] ? string : '';
554
+ /**
555
+ * Convert a string literal to a custom string delimiter casing.
556
+ *
557
+ * This can be useful when, for example, converting a camel-cased object property to an oddly cased one.
558
+ *
559
+ * @see KebabCase
560
+ * @see SnakeCase
561
+ *
562
+ * @example
563
+ * ```
564
+ * import type {DelimiterCase} from 'type-fest';
565
+ *
566
+ * // Simple
567
+ *
568
+ * const someVariable: DelimiterCase<'fooBar', '#'> = 'foo#bar';
569
+ *
570
+ * // Advanced
571
+ *
572
+ * type OddlyCasedProperties<T> = {
573
+ * [K in keyof T as DelimiterCase<K, '#'>]: T[K]
574
+ * };
575
+ *
576
+ * interface SomeOptions {
577
+ * dryRun: boolean;
578
+ * includeFile: string;
579
+ * foo: number;
580
+ * }
581
+ *
582
+ * const rawCliOptions: OddlyCasedProperties<SomeOptions> = {
583
+ * 'dry#run': true,
584
+ * 'include#file': 'bar.js',
585
+ * foo: 123
586
+ * };
587
+ * ```
588
+ *
589
+ * @category Change case
590
+ * @category Template literal
591
+ */
592
+ type DelimiterCase<Value, Delimiter extends string> = string extends Value ? Value : Value extends string ? StringArrayToDelimiterCase<SplitIncludingDelimiters<Value, WordSeparators | UpperCaseCharacters>, true, WordSeparators, UpperCaseCharacters, Delimiter> : Value;
593
+ //#endregion
594
+ //#region src/application/models/utilityTypes/delimiterCasedPropertiesDeep.d.ts
595
+ /**
596
+ * Convert object properties to delimiter case recursively.
597
+ *
598
+ * This can be useful when, for example, converting some API types from a different style.
599
+ *
600
+ * @see DelimiterCase
601
+ * @see DelimiterCasedProperties
602
+ *
603
+ * @example
604
+ * ```
605
+ * import type {DelimiterCasedPropertiesDeep} from 'type-fest';
606
+ *
607
+ * interface User {
608
+ * userId: number;
609
+ * userName: string;
610
+ * }
611
+ *
612
+ * interface UserWithFriends {
613
+ * userInfo: User;
614
+ * userFriends: User[];
615
+ * }
616
+ *
617
+ * const result: DelimiterCasedPropertiesDeep<UserWithFriends, '-'> = {
618
+ * 'user-info': {
619
+ * 'user-id': 1,
620
+ * 'user-name': 'Tom',
621
+ * },
622
+ * 'user-friends': [
623
+ * {
624
+ * 'user-id': 2,
625
+ * 'user-name': 'Jerry',
626
+ * },
627
+ * {
628
+ * 'user-id': 3,
629
+ * 'user-name': 'Spike',
630
+ * },
631
+ * ],
632
+ * };
633
+ * ```
634
+ *
635
+ * @category Change case
636
+ * @category Template literal
637
+ * @category Object
638
+ */
639
+ type DelimiterCasedPropertiesDeep<Value, Delimiter extends string> = Value extends NonRecursiveType ? Value : Value extends UnknownArray ? DelimiterCasedPropertiesArrayDeep<Value, Delimiter> : Value extends Set<infer U> ? Set<DelimiterCasedPropertiesDeep<U, Delimiter>> : { [K in keyof Value as DelimiterCase<K, Delimiter>]: DelimiterCasedPropertiesDeep<Value[K], Delimiter> };
640
+ type DelimiterCasedPropertiesArrayDeep<Value extends UnknownArray, Delimiter extends string> = Value extends [] ? [] : Value extends [infer U, ...infer V] ? [DelimiterCasedPropertiesDeep<U, Delimiter>, ...DelimiterCasedPropertiesDeep<V, Delimiter>] : Value extends readonly [infer U, ...infer V] ? readonly [DelimiterCasedPropertiesDeep<U, Delimiter>, ...DelimiterCasedPropertiesDeep<V, Delimiter>] : Value extends readonly [...infer U, infer V] ? [...DelimiterCasedPropertiesDeep<U, Delimiter>, DelimiterCasedPropertiesDeep<V, Delimiter>] : Value extends readonly [...infer U, infer V] ? readonly [...DelimiterCasedPropertiesDeep<U, Delimiter>, DelimiterCasedPropertiesDeep<V, Delimiter>] : Value extends Array<infer U> ? Array<DelimiterCasedPropertiesDeep<U, Delimiter>> : Value extends ReadonlyArray<infer U> ? ReadonlyArray<DelimiterCasedPropertiesDeep<U, Delimiter>> : never;
641
+ //#endregion
642
+ //#region src/application/models/utilityTypes/snakeCasedPropertiesDeep.d.ts
643
+ /**
644
+ * Convert object properties to snake case recursively.
645
+ *
646
+ * This can be useful when, for example, converting some API types from a different style.
647
+ *
648
+ * @see SnakeCase
649
+ * @see SnakeCasedProperties
650
+ *
651
+ * @example
652
+ * ```
653
+ * import type {SnakeCasedPropertiesDeep} from 'type-fest';
654
+ *
655
+ * interface User {
656
+ * userId: number;
657
+ * userName: string;
658
+ * }
659
+ *
660
+ * interface UserWithFriends {
661
+ * userInfo: User;
662
+ * userFriends: User[];
663
+ * }
664
+ *
665
+ * const result: SnakeCasedPropertiesDeep<UserWithFriends> = {
666
+ * user_info: {
667
+ * user_id: 1,
668
+ * user_name: 'Tom',
669
+ * },
670
+ * user_friends: [
671
+ * {
672
+ * user_id: 2,
673
+ * user_name: 'Jerry',
674
+ * },
675
+ * {
676
+ * user_id: 3,
677
+ * user_name: 'Spike',
678
+ * },
679
+ * ],
680
+ * };
681
+ * ```
682
+ *
683
+ * @category Change case
684
+ * @category Template literal
685
+ * @category Object
686
+ */
687
+ type SnakeCasedPropertiesDeep<Value> = DelimiterCasedPropertiesDeep<Value, '_'>;
688
+ //#endregion
689
+ //#region src/application/models/utils/snakeToCamelTransformer.d.ts
690
+ /**
691
+ * Generic utility to transform snake_case object keys to camelCase at runtime.
692
+ * This is the runtime equivalent of the CamelCasedPropertiesDeep type utility.
693
+ */
694
+ /**
695
+ * Recursively transforms all object keys from snake_case to camelCase
696
+ */
697
+ declare const transformSnakeToCamel: (obj: unknown) => unknown;
698
+ /**
699
+ * Recursively transforms all object keys from camelCase to snake_case
700
+ */
701
+ declare const transformCamelToSnake: (obj: unknown) => unknown;
702
+ //#endregion
703
+ //#region src/application/models/utils/stringToFulfillmentDisplayStatusEnumValue.d.ts
704
+ /**
705
+ * Converts a string to a FulfillmentDisplayStatus enum value.
706
+ *
707
+ * @param status - The string to convert.
708
+ *
709
+ * @returns The FulfillmentDisplayStatus enum value or undefined if the string
710
+ * does not map to a valid enum
711
+ */
712
+ declare const stringToFulfillmentDisplayStatusEnumValue: (status: string) => FulfillmentDisplayStatus | undefined;
713
+ //#endregion
714
+ //#region src/application/models/validators/validateGraphQLColorsConfig.d.ts
715
+ declare const validateGraphQLColorsConfig: (data: unknown) => ColorMapping | undefined;
716
+ //#endregion
717
+ //#region src/application/models/validators/validateGraphQLFrontendConfig.d.ts
718
+ declare const validateAndTransformPageVariants: (config: Record<string, unknown>) => PageVariantConfig;
719
+ declare const validateAndTransformMountingConfig: (config: Record<string, unknown>, configKey: string) => WidgetMountingConfig;
720
+ declare const validateAndTransformWidgetConfig: (config: Record<string, unknown>, configKey: string) => WidgetConfig;
721
+ declare const validateGraphQLFrontendConfig: (data: unknown) => FrontendConfig | undefined;
722
+ //#endregion
723
+ //#region src/application/models/validators/validateGraphQLOrgId.d.ts
724
+ declare const validateGraphQLOrgId: (data: unknown) => string | undefined;
725
+ //#endregion
726
+ //#region src/application/models/validators/validateMobilePLPChatPlacementParameter.d.ts
727
+ declare const validateMobilePLPChatPlacementParameter: (value: unknown) => MobilePLPChatPlacementParameter | undefined;
728
+ //#endregion
729
+ //#region src/application/models/validators/validateOrganizationConfig.d.ts
730
+ declare const validateOrganizationConfig: (data: unknown) => OrganizationConfig$1 | undefined;
731
+ //#endregion
732
+ //#region src/application/models/validators/validateOrgConfigResults.d.ts
733
+ /**
734
+ *
735
+ * @param data
736
+ * @returns
737
+ */
738
+ declare const validateOrgConfigResults: (data: unknown) => OrgConfig | undefined;
739
+ //#endregion
740
+ //#region src/application/models/validators/validateResponse.d.ts
741
+ declare const validateResponse: (data: unknown) => Response$1 | undefined;
742
+ //#endregion
743
+ //#region src/application/models/validators/validateSuggestion.d.ts
744
+ declare const validateSuggestion: (data: unknown) => Suggestion$1 | undefined;
745
+ //#endregion
746
+ //#region src/application/models/validators/validateUserEvent.d.ts
747
+ declare const validateUserEvent: (data: unknown) => UserEvent$1 | undefined;
748
+ //#endregion
749
+ export { ApiOrderItemInfo, ApiOrderResponseAttributes, ApiOrganizationConfig, AppLoadedUserEvent, AppUnloadedEvent, BaseEcommerceEvent, BasicOrgInfoType, type CachedValue, type ClientDetails, Context$1 as Context, ConversationalSearchIds, DelimiterCase, DelimiterCasedPropertiesDeep, DomMutationObserverContinuation, DomObservationStrategy, FormField, FormSubmitted, FormSubmittedAttributes$1 as FormSubmittedAttributes, GA4EcommerceEvent, GenerationParams$1 as GenerationParams, GoogleAnalyticsEvents, Message, MessageRole, MessageType, MobilePLPChatPlacementParameter, NextMessageRequest$1 as NextMessageRequest, OrgShortName, PDPAttributes$1 as PDPAttributes, PDPUserEvent, PLPAttributes$1 as PLPAttributes, PLPUserEvent, PageVisitAttributes, PageVisitEvent, ProductExperiment, ProductMessageMetadata, ProductSearchMessageMetadata, ProductSearchResponse$1 as ProductSearchResponse, ProductSearchResponseAttributes$1 as ProductSearchResponseAttributes, QueryTypedAttributes$1 as QueryTypedAttributes, QueryTypedUserEvent, SearchAttributes$1 as SearchAttributes, SearchParams, SearchResult, SearchUserEvent, SnakeCasedPropertiesDeep, SpanxTakeAQuizCtaParameter, SpiffyEventName, SpiffyWidgets, SplitIncludingDelimiters, Suggestion$1 as Suggestion, SuggestionClickedAttributes$1 as SuggestionClickedAttributes, SuggestionsClickedUserEvent, SupportedEventRequest$1 as SupportedEventRequest, UAEcommerceEvent, UserEvent$1 as UserEvent, UserEventAttributes, getMerchantOrgIdQuery, getOrgInfo, hasPropertyOfType, isApiFormResponseAttributes, isApiFormSubmittedResponseAttributes, isApiOrderResponseAttributes, isApiOrgConfigResults, isApiOrganizationConfig, isApiPLPEventAttributes, isApiPLPIdAttribute, isApiPageResponseAttributes, isApiProductSearchFilterResponseAttributes, isBaseEcommerceEvent, isGA4EcommerceEvent, isGraphQLColorsConfig, isLegacyUAEcommerceEvent, isMobilePLPChatPlacementParameter, isSpanxTakeAQuizCtaParameter, isVariantInfo, stringToFulfillmentDisplayStatusEnumValue, transformCamelToSnake, transformSnakeToCamel, validateAndTransformMountingConfig, validateAndTransformPageVariants, validateAndTransformWidgetConfig, validateGraphQLColorsConfig, validateGraphQLFrontendConfig, validateGraphQLOrgId, validateMobilePLPChatPlacementParameter, validateOrgConfigResults, validateOrganizationConfig, validateResponse, validateSuggestion, validateUserEvent };