@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.
- package/dist/adapters/amplitude/index.cjs +14 -0
- package/dist/adapters/amplitude/index.d.cts +4 -0
- package/dist/adapters/amplitude/index.d.ts +4 -0
- package/dist/adapters/amplitude/index.js +12 -0
- package/dist/api-B2euFL-5.cjs +268 -0
- package/dist/api-CxGedDxj.cjs +5057 -0
- package/dist/api-NJEaveju.js +4113 -0
- package/dist/api-XRr_lAG6.js +189 -0
- package/dist/application/config/index.cjs +34 -0
- package/dist/application/config/index.d.cts +14 -0
- package/dist/application/config/index.d.ts +14 -0
- package/dist/application/config/index.js +32 -0
- package/dist/application/models/graphql/index.cjs +13 -0
- package/dist/application/models/graphql/index.d.cts +2 -0
- package/dist/application/models/graphql/index.d.ts +2 -0
- package/dist/application/models/graphql/index.js +12 -0
- package/dist/application/models/guards/api/index.cjs +15 -0
- package/dist/application/models/guards/api/index.d.cts +3 -0
- package/dist/application/models/guards/api/index.d.ts +3 -0
- package/dist/application/models/guards/api/index.js +4 -0
- package/dist/application/models/index.cjs +72 -0
- package/dist/application/models/index.d.cts +10 -0
- package/dist/application/models/index.d.ts +10 -0
- package/dist/application/models/index.js +12 -0
- package/dist/application/models/utilityTypes/index.cjs +1 -0
- package/dist/application/models/utilityTypes/index.d.cts +2 -0
- package/dist/application/models/utilityTypes/index.d.ts +2 -0
- package/dist/application/models/utilityTypes/index.js +3 -0
- package/dist/application/models/variantInfo/index.cjs +1 -0
- package/dist/application/models/variantInfo/index.d.cts +2 -0
- package/dist/application/models/variantInfo/index.d.ts +2 -0
- package/dist/application/models/variantInfo/index.js +3 -0
- package/dist/application/service/customerService/index.cjs +4 -0
- package/dist/application/service/customerService/index.d.cts +3 -0
- package/dist/application/service/customerService/index.d.ts +3 -0
- package/dist/application/service/customerService/index.js +4 -0
- package/dist/application/service/index.cjs +761 -0
- package/dist/application/service/index.d.cts +407 -0
- package/dist/application/service/index.d.ts +407 -0
- package/dist/application/service/index.js +727 -0
- package/dist/application/utils/index.cjs +38 -0
- package/dist/application/utils/index.d.cts +254 -0
- package/dist/application/utils/index.d.ts +254 -0
- package/dist/application/utils/index.js +12 -0
- package/dist/atomStore-B3tsg6mF.cjs +0 -0
- package/dist/atomStore-BFtpknLM.js +31 -0
- package/dist/atomStore-CeJm9Llb.cjs +57 -0
- package/dist/atomStore-FSZd_20F.js +1 -0
- package/dist/atoms/app/index.cjs +17 -0
- package/dist/atoms/app/index.d.cts +33 -0
- package/dist/atoms/app/index.d.ts +33 -0
- package/dist/atoms/app/index.js +12 -0
- package/dist/atoms/atomStore/index.cjs +7 -0
- package/dist/atoms/atomStore/index.d.cts +23 -0
- package/dist/atoms/atomStore/index.d.ts +23 -0
- package/dist/atoms/atomStore/index.js +4 -0
- package/dist/atoms/chat/index.cjs +41 -0
- package/dist/atoms/chat/index.d.cts +159 -0
- package/dist/atoms/chat/index.d.ts +159 -0
- package/dist/atoms/chat/index.js +12 -0
- package/dist/atoms/globalSearch/index.cjs +6 -0
- package/dist/atoms/globalSearch/index.d.cts +23 -0
- package/dist/atoms/globalSearch/index.d.ts +23 -0
- package/dist/atoms/globalSearch/index.js +3 -0
- package/dist/atoms/org/index.cjs +41 -0
- package/dist/atoms/org/index.d.cts +93 -0
- package/dist/atoms/org/index.d.ts +93 -0
- package/dist/atoms/org/index.js +13 -0
- package/dist/atoms/search/index.cjs +44 -0
- package/dist/atoms/search/index.d.cts +11 -0
- package/dist/atoms/search/index.d.ts +11 -0
- package/dist/atoms/search/index.js +14 -0
- package/dist/{bandolier-DpF-HUG_.js → bandolier-C7PAIw02.js} +17 -7
- package/dist/{bandolier-3rHPPhkF.cjs → bandolier-oMkFDJMF.cjs} +56 -46
- package/dist/{carpe-BG7Q_KCG.cjs → carpe-C0ccKuR9.cjs} +35 -25
- package/dist/{carpe-DLuc07V7.js → carpe-DFc78_lJ.js} +17 -7
- package/dist/chat-CCgyDehy.cjs +151 -0
- package/dist/chat-Dk6KPb1K.js +25 -0
- package/dist/components-CScS7Ii-.cjs +28 -0
- package/dist/components-DAQxVIn9.js +10 -0
- package/dist/config/locators/components/chat/index.cjs +23 -0
- package/dist/config/locators/components/chat/index.d.cts +2 -0
- package/dist/config/locators/components/chat/index.d.ts +2 -0
- package/dist/config/locators/components/chat/index.js +3 -0
- package/dist/config/locators/components/chat/variants/index.cjs +28 -0
- package/dist/config/locators/components/chat/variants/index.d.cts +15 -0
- package/dist/config/locators/components/chat/variants/index.d.ts +15 -0
- package/dist/config/locators/components/chat/variants/index.js +16 -0
- package/dist/config/locators/components/index.cjs +5 -0
- package/dist/config/locators/components/index.d.cts +2 -0
- package/dist/config/locators/components/index.d.ts +2 -0
- package/dist/config/locators/components/index.js +3 -0
- package/dist/config/locators/components/search/index.cjs +12 -0
- package/dist/config/locators/components/search/index.d.cts +7 -0
- package/dist/config/locators/components/search/index.d.ts +7 -0
- package/dist/config/locators/components/search/index.js +8 -0
- package/dist/config/locators/index.cjs +47 -0
- package/dist/config/locators/index.d.cts +24 -0
- package/dist/config/locators/index.d.ts +24 -0
- package/dist/config/locators/index.js +6 -0
- package/dist/contexts/index.cjs +15 -4
- package/dist/contexts/index.d.cts +9 -1
- package/dist/contexts/index.d.ts +12 -4
- package/dist/contexts/index.js +15 -4
- package/dist/{contexts-Dq7tO_0y.js → contexts-DO75-Kmx.js} +19 -4326
- package/dist/{contexts-C4Iz162H.cjs → contexts-iAzSvZjb.cjs} +188 -4488
- package/dist/{coterie-FybYN_xE.js → coterie-BGT8hqFR.js} +18 -7
- package/dist/{coterie-DUdvJvAs.cjs → coterie-Cp9FAJTQ.cjs} +25 -14
- package/dist/customerService-CUyZzowx.js +22 -0
- package/dist/customerService-DqPw_XKf.cjs +35 -0
- package/dist/custservice-types-D8Npo-5Z.js +22 -0
- package/dist/custservice-types-E9_OSaZ7.cjs +34 -0
- package/dist/{default-CKyjzyLc.cjs → default-BAXPatxf.cjs} +1 -1
- package/dist/default-BR3225LZ.js +4 -0
- package/dist/default-DR6YjE9B.cjs +4 -0
- package/dist/{default-CL94oJfj.js → default-wf_IORgo.js} +1 -1
- package/dist/divIds-BWvq-i6I.js +22 -0
- package/dist/{divIds-BOqjn3bE.cjs → divIds-CFyAjjp3.cjs} +6 -79
- package/dist/{dreamlandBaby-C8yzW4Nl.cjs → dreamlandBaby-BzuMvUFS.cjs} +28 -18
- package/dist/{dreamlandBaby-WXcbsTXO.js → dreamlandBaby-DZvM81LQ.js} +17 -7
- package/dist/embedded-BlXJUbik.cjs +130 -0
- package/dist/embedded-C1jvFj3v.js +22 -0
- package/dist/events/index.cjs +4 -0
- package/dist/events/index.d.cts +45 -0
- package/dist/events/index.d.ts +45 -0
- package/dist/events/index.js +3 -0
- package/dist/events-ClCDFK7t.js +77 -0
- package/dist/events-Da7gpmGv.cjs +89 -0
- package/dist/featureFlagService-CroFRxvD.d.cts +17 -0
- package/dist/featureFlagService-NkJ2fuEj.d.ts +17 -0
- package/dist/featureGates-BMWXU0dS.d.ts +90 -0
- package/dist/featureGates-N_gyHCTn.d.cts +90 -0
- package/dist/{fiveCbd-CZYzZPl3.cjs → fiveCbd-DE-tDY3d.cjs} +32 -22
- package/dist/{fiveCbd-kl6CoxoF.js → fiveCbd-HNBPqPtX.js} +17 -7
- package/dist/{forLoveAndLemons-BD2qh-6B.js → forLoveAndLemons-BKmJJ9pq.js} +13 -5
- package/dist/{forLoveAndLemons-BNu-PfFB.cjs → forLoveAndLemons-BeVEBOiu.cjs} +17 -9
- package/dist/{types-DGoFEos_.d.cts → frontendConfig-KeNqU1wa.d.cts} +39 -275
- package/dist/{types-D4vlfTd0.d.ts → frontendConfig-cPvCTWm6.d.ts} +39 -275
- package/dist/globalSearch-BC0rOX3E.js +13 -0
- package/dist/globalSearch-hxbXekus.cjs +38 -0
- package/dist/{greenpan-LDDXZTsh.js → greenpan-BX1viAZB.js} +17 -7
- package/dist/{greenpan-D6fDmjU8.cjs → greenpan-chd3aa5I.cjs} +30 -20
- package/dist/{grooveLife-D-1qfxwj.js → grooveLife-CHot3rZw.js} +18 -8
- package/dist/{grooveLife-CcylXabB.cjs → grooveLife-DEob7rK0.cjs} +29 -19
- package/dist/{homegrownCannabis-BEZzwFlm.cjs → homegrownCannabis-CoIjcehi.cjs} +27 -16
- package/dist/{homegrownCannabis-BScZhy9v.js → homegrownCannabis-CwkS1qDA.js} +17 -6
- package/dist/hooks/index.cjs +15 -4
- package/dist/hooks/index.d.cts +15 -305
- package/dist/hooks/index.d.ts +15 -306
- package/dist/hooks/index.js +15 -4
- package/dist/index-BdNKc2ix.d.cts +8 -0
- package/dist/index-BkhvV8RZ.d.cts +202 -0
- package/dist/index-BrXuc_Ck.d.cts +24 -0
- package/dist/index-C4zjAR1c.d.cts +227 -0
- package/dist/index-CGB6CAmr.d.ts +6 -0
- package/dist/index-CIco0cCQ.d.ts +183 -0
- package/dist/index-COG1kOZG.d.ts +749 -0
- package/dist/index-CVxe7FpL.d.cts +6 -0
- package/dist/index-Cn1SeI5y.d.cts +183 -0
- package/dist/index-Cqg6ltII.d.ts +38 -0
- package/dist/index-CzMrMKx-.d.ts +202 -0
- package/dist/index-DE_7Q8qK.d.ts +94 -0
- package/dist/index-Da0UzyI9.d.ts +24 -0
- package/dist/index-DbWWcYax.d.cts +749 -0
- package/dist/index-DtoVXd6O.d.cts +97 -0
- package/dist/index-JClBRnSX.d.cts +94 -0
- package/dist/index-ghzD_356.d.ts +8 -0
- package/dist/index-hdbCEjYy.d.cts +38 -0
- package/dist/index-luJrHgPN.d.ts +97 -0
- package/dist/index-tfRj22E1.d.ts +227 -0
- package/dist/interceptors/index.cjs +14 -0
- package/dist/interceptors/index.d.cts +25 -0
- package/dist/interceptors/index.d.ts +25 -0
- package/dist/interceptors/index.js +13 -0
- package/dist/{jackArcher-cJJVulZ9.js → jackArcher-BA-pkB4A.js} +17 -7
- package/dist/{jackArcher-BwMClqMP.cjs → jackArcher-bewC0q1T.cjs} +34 -24
- package/dist/{jordanCraig-DGsCO2o1.cjs → jordanCraig-B5k9nlAw.cjs} +77 -67
- package/dist/{jordanCraig-DNDMT0hn.js → jordanCraig-BsQ1mYbt.js} +17 -7
- package/dist/{kindredBravely-ROyesnVk.js → kindredBravely-BxYkCpGY.js} +16 -6
- package/dist/{kindredBravely-wV2XT1r_.cjs → kindredBravely-DsN0fo3s.cjs} +27 -17
- package/dist/{kutFromTheKloth-B6GR8tO9.cjs → kutFromTheKloth-BQTCu3ct.cjs} +28 -18
- package/dist/{kutFromTheKloth-BCUOHegv.js → kutFromTheKloth-bukOQM3P.js} +17 -7
- package/dist/{larryAndSerges-CqS02fnX.js → larryAndSerges-D1ecaT5a.js} +14 -5
- package/dist/{larryAndSerges-CIqB9tKz.cjs → larryAndSerges-bj7fgy9b.cjs} +21 -12
- package/dist/{leapsAndRebounds-CFj9F_z1.cjs → leapsAndRebounds-BfneG_0c.cjs} +30 -20
- package/dist/{leapsAndRebounds-j4YqSvNb.js → leapsAndRebounds-DhNpZETg.js} +17 -7
- package/dist/locators-C2DX_nX6.js +1 -0
- package/dist/locators-CUpyd9Wt.cjs +0 -0
- package/dist/logger-Dln20ans.cjs +25 -0
- package/dist/logger-pdEEY8T2.js +19 -0
- package/dist/{longevityrx-9sUQZCVZ.js → longevityrx-CnoGcw0w.js} +17 -7
- package/dist/{longevityrx-C-Yc5LPR.cjs → longevityrx-D0goIuX0.cjs} +25 -15
- package/dist/{lookOptic-dbaaorhR.cjs → lookOptic-C4afLPZP.cjs} +25 -15
- package/dist/{lookOptic-CQryypdM.js → lookOptic-uJWIKpER.js} +17 -7
- package/dist/{mantraBrand-D5MTZ6Mj.cjs → mantraBrand-8JUlYtCE.cjs} +46 -36
- package/dist/{mantraBrand-CifBQtHp.js → mantraBrand-DuwKHM26.js} +18 -8
- package/dist/{medterra-DhENCf-m.js → medterra-BQec8rzn.js} +17 -7
- package/dist/{medterra-BCrXdmFE.cjs → medterra-DH067P-V.cjs} +37 -27
- package/dist/{modells-aQrV10D7.js → modells-DAgLE2xo.js} +17 -7
- package/dist/{modells-C_P_894S.cjs → modells-DUFnLmAz.cjs} +31 -21
- package/dist/nodeSelector-DpKXszfU.d.ts +30 -0
- package/dist/nodeSelector-vKB44CDB.d.cts +30 -0
- package/dist/org-C11APG3v.js +63 -0
- package/dist/org-CnHL2I9B.cjs +106 -0
- package/dist/{pressedFloral-DErfwwl0.cjs → pressedFloral-DVZVfOSQ.cjs} +36 -26
- package/dist/{pressedFloral-D-amnTQK.js → pressedFloral-MdbuoRyA.js} +17 -7
- package/dist/search-CvHb1M3S.js +542 -0
- package/dist/search-bSYdOBhY.cjs +743 -0
- package/dist/search-filter-types-BsJjrxk0.d.ts +101 -0
- package/dist/search-filter-types-CqaGK3nM.d.cts +101 -0
- package/dist/{skinPerfection-DF6nQXjh.cjs → skinPerfection-BcEWICQN.cjs} +25 -15
- package/dist/{skinPerfection-DRVPJp3h.js → skinPerfection-bGiYxq1i.js} +17 -7
- package/dist/{snapSupplements-CLZjItJi.cjs → snapSupplements-BXSXTjqF.cjs} +25 -15
- package/dist/{snapSupplements-Yxs4jgC-.js → snapSupplements-D7hHhdC9.js} +17 -7
- package/dist/{spanx-DVDyAyFC.js → spanx-5-0yX3iK.js} +19 -9
- package/dist/{spanx-Cpbot5J5.cjs → spanx-lUzP6Lva.cjs} +31 -21
- package/dist/{spanxStaging-DAiFEMRU.js → spanxStaging-HglCMJag.js} +19 -9
- package/dist/{spanxStaging-DbaVonN6.cjs → spanxStaging-hreMR0MS.cjs} +35 -25
- package/dist/suggestionBarV2-types-B0RbMStE.js +9 -0
- package/dist/suggestionBarV2-types-DG3Ekk44.cjs +15 -0
- package/dist/{supergoop-C4McrZPT.js → supergoop-C9DDT3lY.js} +18 -7
- package/dist/{supergoop-B5VQlsoe.cjs → supergoop-CkjtuRck.cjs} +29 -18
- package/dist/test-types-C9b_OdfO.d.ts +39 -0
- package/dist/test-types-CpKCxk8U.d.cts +39 -0
- package/dist/types/index.cjs +6 -0
- package/dist/types/index.d.cts +3 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +4 -0
- package/dist/types-BE4faOO_.d.cts +32 -0
- package/dist/{types-QJObznro.cjs → types-BUjohkXp.cjs} +58 -58
- package/dist/{types-DZzSQ5a6.js → types-BVsTRyxL.js} +58 -58
- package/dist/types-TD8g7LnH.d.ts +32 -0
- package/dist/{uniqueVintage-BLp_UtBR.cjs → uniqueVintage-DIMGtYAU.cjs} +47 -37
- package/dist/{uniqueVintage-CS4TgOJW.js → uniqueVintage-DPWA5Ed6.js} +17 -7
- package/dist/useMessageInterceptor-B-P_rw73.cjs +72 -0
- package/dist/useMessageInterceptor-C2RZM-fo.js +57 -0
- package/dist/utilityTypes-BVikejDo.js +1 -0
- package/dist/utilityTypes-C4h2wgAK.cjs +0 -0
- package/dist/variant-BGjOVpY3.d.cts +12 -0
- package/dist/variant-XITncuI3.d.ts +12 -0
- package/dist/variantInfo-CNRTY0gH.cjs +0 -0
- package/dist/variantInfo-CzhR5W6h.js +1 -0
- package/dist/{venaCbd-DfnFV7Qp.js → venaCbd-B-znfAsl.js} +17 -7
- package/dist/{venaCbd-BxmadOeJ.cjs → venaCbd-BOwOtpOz.cjs} +30 -20
- package/dist/{westonJonBoucher-BZdusJgo.cjs → westonJonBoucher-CraTzRVt.cjs} +30 -20
- package/dist/{westonJonBoucher-C0FE4Wup.js → westonJonBoucher-DCRagGu3.js} +17 -7
- package/dist/{wineEnthusiast-CmhNg47M.js → wineEnthusiast-Bv7umajk.js} +17 -7
- package/dist/{wineEnthusiast-DQxdV8Yg.cjs → wineEnthusiast-sVuATrq6.cjs} +29 -19
- package/dist/{wolfMattress-vMvqmwgI.js → wolfMattress-BUH-Rhov.js} +17 -6
- package/dist/{wolfMattress-CqyOUgPB.cjs → wolfMattress-DpVHIEnJ.cjs} +29 -18
- package/dist/{wolfTactical-q3TVDP85.cjs → wolfTactical-BcvF_sy-.cjs} +29 -19
- package/dist/{wolfTactical-DvqxZtoA.js → wolfTactical-Q14A1fpw.js} +17 -7
- package/package.json +101 -3
- package/src/adapters/amplitude/amplitudeAdapter.ts +1 -1
- package/src/adapters/spiffy/commerce/api.ts +1 -1
- package/src/adapters/spiffy/commerce/graphql.ts +61 -37
- package/src/application/config/index.ts +1 -0
- package/src/application/models/index.ts +102 -17
- package/src/application/models/supportedOrgs.ts +89 -65
- package/src/application/service/index.ts +32 -0
- package/src/application/service/pageVariantService.ts +201 -114
- package/src/application/service/searchService.ts +1 -1
- package/src/application/service/windowFrontendConfigService.ts +40 -18
- package/src/application/utils/index.ts +22 -3
- package/src/atoms/app/variant.ts +48 -29
- package/src/atoms/atomStore/index.ts +1 -0
- package/src/atoms/chat/messageQueue.ts +34 -17
- package/src/atoms/chat/performanceMetrics.ts +51 -38
- package/src/atoms/chat/renderedWidgetRefs.ts +14 -15
- package/src/atoms/globalSearch/index.ts +1 -0
- package/src/atoms/org/org.ts +1 -3
- package/src/atoms/org/orgUIConfig.ts +31 -24
- package/src/contexts/chatContext.tsx +124 -72
- package/src/events/registerAnalyticsListeners.ts +13 -9
- package/src/hooks/useFileUpload.ts +9 -7
- package/src/hooks/useSearch.tsx +3 -3
- package/src/initialize.ts +1 -1
- package/src/interceptors/index.ts +3 -0
- package/src/main.tsx +1 -1
- package/src/types/index.ts +4 -0
- package/dist/GridInsertionService-C00upKLB.js +0 -40
- package/dist/GridInsertionService-CMJVhD6q.cjs +0 -52
- package/dist/custservice-types-BgjGHCtD.cjs +0 -16
- package/dist/custservice-types-V6FWABp4.js +0 -10
- package/dist/default-DMtAjA62.cjs +0 -4
- package/dist/default-zcmT2032.js +0 -4
- package/dist/divIds-Cfp3v_rG.js +0 -35
- package/dist/domInsertionService-BtzuH2Sc.js +0 -65
- package/dist/domInsertionService-Cb9814oM.cjs +0 -89
- package/dist/suggestionBarV2-types-XHYD3j8E.cjs +0 -46
- package/dist/suggestionBarV2-types-aiQmVx5m.js +0 -34
- package/src/atoms/index.ts +0 -5
- package/src/index.ts +0 -31
- /package/dist/{cdnService-CAyO3axV.js → cdnService-DvDSpfVJ.js} +0 -0
- /package/dist/{cdnService-DIF1i7VC.cjs → cdnService-dJU3sHpF.cjs} +0 -0
- /package/dist/{entrypoints-RmIbdYxh.js → entrypoints-CmmOszXO.js} +0 -0
- /package/dist/{entrypoints-C8JwiMYA.cjs → entrypoints-fowCLUT2.cjs} +0 -0
- /package/dist/{socialProofClasses-CaA83vI4.cjs → socialProofClasses-BYLiEXpU.cjs} +0 -0
- /package/dist/{socialProofClasses-KB7zOMmg.js → socialProofClasses-CkJufEGb.js} +0 -0
- /package/src/atoms/{atomStore.ts → atomStore/atomStore.ts} +0 -0
- /package/src/atoms/{globalSearch.ts → globalSearch/globalSearch.ts} +0 -0
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const
|
|
1
|
+
require('./logger-Dln20ans.cjs');
|
|
2
|
+
require('./api-B2euFL-5.cjs');
|
|
3
|
+
const require_api$1 = require('./api-CxGedDxj.cjs');
|
|
4
|
+
const require_types = require('./types-BUjohkXp.cjs');
|
|
4
5
|
require('./enviveConfigContext-Dfr2VH6u.cjs');
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
require('./atomStore-CeJm9Llb.cjs');
|
|
7
|
+
require('./customerService-DqPw_XKf.cjs');
|
|
8
|
+
require('./utilityTypes-C4h2wgAK.cjs');
|
|
9
|
+
require('./variantInfo-CNRTY0gH.cjs');
|
|
10
|
+
require('./events-Da7gpmGv.cjs');
|
|
11
|
+
const require_suggestionBarV2_types = require('./suggestionBarV2-types-DG3Ekk44.cjs');
|
|
12
|
+
const require_divIds = require('./divIds-CFyAjjp3.cjs');
|
|
13
|
+
const require_cdnService = require('./cdnService-dJU3sHpF.cjs');
|
|
14
|
+
require('./chat-CCgyDehy.cjs');
|
|
15
|
+
require('./components-CScS7Ii-.cjs');
|
|
16
|
+
const require_embedded = require('./embedded-BlXJUbik.cjs');
|
|
17
|
+
require('./locators-CUpyd9Wt.cjs');
|
|
18
|
+
const require_default = require('./default-BAXPatxf.cjs');
|
|
9
19
|
|
|
10
20
|
//#region src/merchants/wolfTactical/wolfTactical.ts
|
|
11
21
|
const wolfTacticalColors = {
|
|
@@ -168,7 +178,7 @@ const wolfTacticalPageConfig = () => ({
|
|
|
168
178
|
type: require_types.WidgetType.SuggestionBarV2,
|
|
169
179
|
widgetConfigId: "topSuggestionsBar",
|
|
170
180
|
contentId: "spiffy-top-suggestion-bar-contents",
|
|
171
|
-
metricDisplayLocation:
|
|
181
|
+
metricDisplayLocation: require_api$1.ChatElementDisplayLocation.TOP_REVIEWS_SNIPPET,
|
|
172
182
|
location: require_suggestionBarV2_types.SuggestionBarLocationForMetrics.SUGGESTION_BAR_TOP,
|
|
173
183
|
variant: "secondary",
|
|
174
184
|
hoverVariant: "secondaryDark",
|
|
@@ -185,7 +195,7 @@ const wolfTacticalPageConfig = () => ({
|
|
|
185
195
|
type: require_types.WidgetType.SuggestionBarV2,
|
|
186
196
|
widgetConfigId: "topSuggestionsBar",
|
|
187
197
|
contentId: "spiffy-top-suggestion-bar-contents",
|
|
188
|
-
metricDisplayLocation:
|
|
198
|
+
metricDisplayLocation: require_api$1.ChatElementDisplayLocation.TOP_REVIEWS_SNIPPET,
|
|
189
199
|
location: require_suggestionBarV2_types.SuggestionBarLocationForMetrics.SUGGESTION_BAR_TOP,
|
|
190
200
|
variant: "secondary",
|
|
191
201
|
hoverVariant: "secondaryDark",
|
|
@@ -260,7 +270,7 @@ const wolfTacticalPageConfig = () => ({
|
|
|
260
270
|
type: require_types.WidgetType.SuggestionBarV2,
|
|
261
271
|
widgetConfigId: "bottomSuggestionsBar",
|
|
262
272
|
contentId: "spiffy-bottom-suggestion-bar-contents",
|
|
263
|
-
metricDisplayLocation:
|
|
273
|
+
metricDisplayLocation: require_api$1.ChatElementDisplayLocation.BOTTOM_REVIEWS_SNIPPET,
|
|
264
274
|
location: require_suggestionBarV2_types.SuggestionBarLocationForMetrics.SUGGESTION_BAR_BOTTOM,
|
|
265
275
|
variant: "dark",
|
|
266
276
|
hoverVariant: "secondaryDark",
|
|
@@ -275,12 +285,12 @@ const wolfTacticalPageConfig = () => ({
|
|
|
275
285
|
chatPreviewPLP: {
|
|
276
286
|
mountingConfigId: "chatPreviewPLP",
|
|
277
287
|
containerId: require_divIds.CHAT_PREVIEW_CONTAINER_ID,
|
|
278
|
-
testId:
|
|
288
|
+
testId: require_embedded.CHAT_PREVIEW_TESTID,
|
|
279
289
|
insertionPoint: {
|
|
280
290
|
selector: ".grid--uniform",
|
|
281
|
-
insertionType:
|
|
291
|
+
insertionType: require_api$1.DOMInsertionType.AFTER
|
|
282
292
|
},
|
|
283
|
-
gridInsertionType:
|
|
293
|
+
gridInsertionType: require_api$1.GridInsertionType.FIXED_4,
|
|
284
294
|
className: "grid__item grid-product",
|
|
285
295
|
style: {
|
|
286
296
|
borderTop: `1px solid ${wolfTacticalColors[require_types.ColorNames.BorderLight]}`,
|
|
@@ -291,10 +301,10 @@ const wolfTacticalPageConfig = () => ({
|
|
|
291
301
|
chatPreviewPDP: {
|
|
292
302
|
mountingConfigId: "chatPreviewPDP",
|
|
293
303
|
containerId: require_divIds.CHAT_PREVIEW_CONTAINER_ID,
|
|
294
|
-
testId:
|
|
304
|
+
testId: require_embedded.CHAT_PREVIEW_TESTID,
|
|
295
305
|
insertionPoint: {
|
|
296
306
|
selector: ".product-block > .rte > p",
|
|
297
|
-
insertionType:
|
|
307
|
+
insertionType: require_api$1.DOMInsertionType.BEFORE
|
|
298
308
|
},
|
|
299
309
|
style: {
|
|
300
310
|
borderTop: `1px solid ${wolfTacticalColors[require_types.ColorNames.BorderLight]}`,
|
|
@@ -307,20 +317,20 @@ const wolfTacticalPageConfig = () => ({
|
|
|
307
317
|
topSuggestionBarPDP: {
|
|
308
318
|
mountingConfigId: "topSuggestionBarPDP",
|
|
309
319
|
containerId: require_divIds.TOP_SUGGESTION_BAR_PDP_ID,
|
|
310
|
-
testId:
|
|
320
|
+
testId: require_embedded.TOP_SUGGESTION_BAR_TESTID,
|
|
311
321
|
insertionPoint: {
|
|
312
322
|
selector: ".product-block--price",
|
|
313
|
-
insertionType:
|
|
323
|
+
insertionType: require_api$1.DOMInsertionType.AFTER
|
|
314
324
|
},
|
|
315
325
|
style: { marginBottom: "20px" }
|
|
316
326
|
},
|
|
317
327
|
bottomSuggestionBarPDP: {
|
|
318
328
|
mountingConfigId: "bottomSuggestionBarPDP",
|
|
319
329
|
containerId: require_divIds.BOTTOM_REVIEWS_BAR_ID,
|
|
320
|
-
testId:
|
|
330
|
+
testId: require_embedded.BOTTOM_SUGGESTION_BAR_TESTID,
|
|
321
331
|
insertionPoint: {
|
|
322
332
|
selector: ".fake-selector",
|
|
323
|
-
insertionType:
|
|
333
|
+
insertionType: require_api$1.DOMInsertionType.AFTER
|
|
324
334
|
}
|
|
325
335
|
}
|
|
326
336
|
}
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import "./logger-pdEEY8T2.js";
|
|
2
|
+
import "./api-XRr_lAG6.js";
|
|
3
|
+
import { ChatElementDisplayLocation, DOMInsertionType, GridInsertionType } from "./api-NJEaveju.js";
|
|
4
|
+
import { ColorNames, OrgShortName, PageVariantTestType, WidgetType } from "./types-BVsTRyxL.js";
|
|
4
5
|
import "./enviveConfigContext-CUGLpPGU.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
6
|
+
import "./atomStore-BFtpknLM.js";
|
|
7
|
+
import "./customerService-CUyZzowx.js";
|
|
8
|
+
import "./utilityTypes-BVikejDo.js";
|
|
9
|
+
import "./variantInfo-CzhR5W6h.js";
|
|
10
|
+
import "./events-ClCDFK7t.js";
|
|
11
|
+
import { SuggestionBarLocationForMetrics } from "./suggestionBarV2-types-B0RbMStE.js";
|
|
12
|
+
import { BOTTOM_REVIEWS_BAR_ID, CHAT_PREVIEW_CONTAINER_ID, TOP_SUGGESTION_BAR_PDP_ID } from "./divIds-BWvq-i6I.js";
|
|
13
|
+
import { CdnService } from "./cdnService-DvDSpfVJ.js";
|
|
14
|
+
import "./chat-Dk6KPb1K.js";
|
|
15
|
+
import "./components-DAQxVIn9.js";
|
|
16
|
+
import { BOTTOM_SUGGESTION_BAR_TESTID, CHAT_PREVIEW_TESTID, TOP_SUGGESTION_BAR_TESTID } from "./embedded-C1jvFj3v.js";
|
|
17
|
+
import "./locators-C2DX_nX6.js";
|
|
18
|
+
import { defaultOrgUIConfig } from "./default-wf_IORgo.js";
|
|
9
19
|
|
|
10
20
|
//#region src/merchants/wolfTactical/wolfTactical.ts
|
|
11
21
|
const wolfTacticalColors = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@envive-ai/react-hooks",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "React hooks for connecting to Envive AI services.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -36,8 +36,6 @@
|
|
|
36
36
|
"@envive-ai/react-icons": "^0.1.1",
|
|
37
37
|
"@spiffy-ai/commerce-api-client": "1.1.0-SNAPSHOT.202508291501",
|
|
38
38
|
"jotai": "^2.14.0",
|
|
39
|
-
"react": "^18.3.1",
|
|
40
|
-
"react-dom": "^18.3.1",
|
|
41
39
|
"ua-parser-js": "^1.0.39",
|
|
42
40
|
"uuid": "^13.0.0",
|
|
43
41
|
"react-icons": "^5.5.0"
|
|
@@ -51,16 +49,116 @@
|
|
|
51
49
|
"tsdown": "^0.14.2",
|
|
52
50
|
"typescript": "~5.8.3"
|
|
53
51
|
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"react": "^18.3.1",
|
|
54
|
+
"react-dom": "^18.3.1"
|
|
55
|
+
},
|
|
54
56
|
"module": "./dist/index.js",
|
|
55
57
|
"exports": {
|
|
58
|
+
"./adapters/amplitude": {
|
|
59
|
+
"import": "./dist/adapters/amplitude/index.js",
|
|
60
|
+
"require": "./dist/adapters/amplitude/index.cjs"
|
|
61
|
+
},
|
|
62
|
+
"./application/config": {
|
|
63
|
+
"import": "./dist/application/config/index.js",
|
|
64
|
+
"require": "./dist/application/config/index.cjs"
|
|
65
|
+
},
|
|
66
|
+
"./application/models": {
|
|
67
|
+
"import": "./dist/application/models/index.js",
|
|
68
|
+
"require": "./dist/application/models/index.cjs"
|
|
69
|
+
},
|
|
70
|
+
"./application/models/graphql": {
|
|
71
|
+
"import": "./dist/application/models/graphql/index.js",
|
|
72
|
+
"require": "./dist/application/models/graphql/index.cjs"
|
|
73
|
+
},
|
|
74
|
+
"./application/models/guards/api": {
|
|
75
|
+
"import": "./dist/application/models/guards/api/index.js",
|
|
76
|
+
"require": "./dist/application/models/guards/api/index.cjs"
|
|
77
|
+
},
|
|
78
|
+
"./application/models/utilityTypes": {
|
|
79
|
+
"import": "./dist/application/models/utilityTypes/index.js",
|
|
80
|
+
"require": "./dist/application/models/utilityTypes/index.cjs"
|
|
81
|
+
},
|
|
82
|
+
"./application/models/variantInfo": {
|
|
83
|
+
"import": "./dist/application/models/variantInfo/index.js",
|
|
84
|
+
"require": "./dist/application/models/variantInfo/index.cjs"
|
|
85
|
+
},
|
|
86
|
+
"./application/service": {
|
|
87
|
+
"import": "./dist/application/service/index.js",
|
|
88
|
+
"require": "./dist/application/service/index.cjs"
|
|
89
|
+
},
|
|
90
|
+
"./application/service/customerService": {
|
|
91
|
+
"import": "./dist/application/service/customerService/index.js",
|
|
92
|
+
"require": "./dist/application/service/customerService/index.cjs"
|
|
93
|
+
},
|
|
94
|
+
"./application/utils": {
|
|
95
|
+
"import": "./dist/application/utils/index.js",
|
|
96
|
+
"require": "./dist/application/utils/index.cjs"
|
|
97
|
+
},
|
|
98
|
+
"./atoms/app": {
|
|
99
|
+
"import": "./dist/atoms/app/index.js",
|
|
100
|
+
"require": "./dist/atoms/app/index.cjs"
|
|
101
|
+
},
|
|
102
|
+
"./atoms/atomStore": {
|
|
103
|
+
"import": "./dist/atoms/atomStore/index.js",
|
|
104
|
+
"require": "./dist/atoms/atomStore/index.cjs"
|
|
105
|
+
},
|
|
106
|
+
"./atoms/chat": {
|
|
107
|
+
"import": "./dist/atoms/chat/index.js",
|
|
108
|
+
"require": "./dist/atoms/chat/index.cjs"
|
|
109
|
+
},
|
|
110
|
+
"./atoms/globalSearch": {
|
|
111
|
+
"import": "./dist/atoms/globalSearch/index.js",
|
|
112
|
+
"require": "./dist/atoms/globalSearch/index.cjs"
|
|
113
|
+
},
|
|
114
|
+
"./atoms/org": {
|
|
115
|
+
"import": "./dist/atoms/org/index.js",
|
|
116
|
+
"require": "./dist/atoms/org/index.cjs"
|
|
117
|
+
},
|
|
118
|
+
"./atoms/search": {
|
|
119
|
+
"import": "./dist/atoms/search/index.js",
|
|
120
|
+
"require": "./dist/atoms/search/index.cjs"
|
|
121
|
+
},
|
|
122
|
+
"./config/locators": {
|
|
123
|
+
"import": "./dist/config/locators/index.js",
|
|
124
|
+
"require": "./dist/config/locators/index.cjs"
|
|
125
|
+
},
|
|
126
|
+
"./config/locators/components": {
|
|
127
|
+
"import": "./dist/config/locators/components/index.js",
|
|
128
|
+
"require": "./dist/config/locators/components/index.cjs"
|
|
129
|
+
},
|
|
130
|
+
"./config/locators/components/chat": {
|
|
131
|
+
"import": "./dist/config/locators/components/chat/index.js",
|
|
132
|
+
"require": "./dist/config/locators/components/chat/index.cjs"
|
|
133
|
+
},
|
|
134
|
+
"./config/locators/components/chat/variants": {
|
|
135
|
+
"import": "./dist/config/locators/components/chat/variants/index.js",
|
|
136
|
+
"require": "./dist/config/locators/components/chat/variants/index.cjs"
|
|
137
|
+
},
|
|
138
|
+
"./config/locators/components/search": {
|
|
139
|
+
"import": "./dist/config/locators/components/search/index.js",
|
|
140
|
+
"require": "./dist/config/locators/components/search/index.cjs"
|
|
141
|
+
},
|
|
56
142
|
"./contexts": {
|
|
57
143
|
"import": "./dist/contexts/index.js",
|
|
58
144
|
"require": "./dist/contexts/index.cjs"
|
|
59
145
|
},
|
|
146
|
+
"./events": {
|
|
147
|
+
"import": "./dist/events/index.js",
|
|
148
|
+
"require": "./dist/events/index.cjs"
|
|
149
|
+
},
|
|
60
150
|
"./hooks": {
|
|
61
151
|
"import": "./dist/hooks/index.js",
|
|
62
152
|
"require": "./dist/hooks/index.cjs"
|
|
63
153
|
},
|
|
154
|
+
"./interceptors": {
|
|
155
|
+
"import": "./dist/interceptors/index.js",
|
|
156
|
+
"require": "./dist/interceptors/index.cjs"
|
|
157
|
+
},
|
|
158
|
+
"./types": {
|
|
159
|
+
"import": "./dist/types/index.js",
|
|
160
|
+
"require": "./dist/types/index.cjs"
|
|
161
|
+
},
|
|
64
162
|
"./package.json": "./package.json"
|
|
65
163
|
}
|
|
66
164
|
}
|
|
@@ -6,7 +6,7 @@ import { OrgConfig } from "src/application/models/api/orgConfigResults";
|
|
|
6
6
|
import { OrgShortName } from "src/application/models";
|
|
7
7
|
import { FeatureFlagService } from "src/application/service/featureFlagService";
|
|
8
8
|
import { userIdAtom } from "src/atoms/app";
|
|
9
|
-
import { getAtomStore } from "src/atoms/atomStore";
|
|
9
|
+
import { getAtomStore } from "src/atoms/atomStore/atomStore";
|
|
10
10
|
import { featureFlagServiceAtom, orgConfigAtom } from "src/atoms/org/org";
|
|
11
11
|
import { WindowDataLayerService } from "src/application/service/windowDataLayerService";
|
|
12
12
|
import { orgAnalyticsGoogleAnalyticsConfigAtom } from "src/atoms/org/orgAnalyticsConfig";
|
|
@@ -36,7 +36,7 @@ import { coreSupportedEventRequestToApiRequest } from "src/application/utils/sup
|
|
|
36
36
|
import { SessionRestartRequired } from "src/adapters/spiffy/commerce/exceptions/sessionExceptions";
|
|
37
37
|
import { UnsupportedProductException } from "src/adapters/spiffy/commerce/exceptions/unsupportedProductExceptions";
|
|
38
38
|
import { ClientDetails } from "src/application/models/clientDetails";
|
|
39
|
-
import { getAtomStore } from "src/atoms/atomStore";
|
|
39
|
+
import { getAtomStore } from "src/atoms/atomStore/atomStore";
|
|
40
40
|
import { EnvironmentService } from "src/application/service/environmentService";
|
|
41
41
|
import { ProductExperiment } from "src/application/models/productExperiment";
|
|
42
42
|
import { FeatureGates } from "src/application/models/featureGates";
|
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import Logger from
|
|
2
|
-
import { ColorMapping } from
|
|
3
|
-
import { FrontendConfig } from
|
|
1
|
+
import Logger from "src/application/logging/logger";
|
|
2
|
+
import { ColorMapping } from "src/application/models/colorsConfig";
|
|
3
|
+
import { FrontendConfig } from "src/application/models/frontendConfig";
|
|
4
4
|
import {
|
|
5
5
|
getMerchantColorsQuery,
|
|
6
6
|
GetMerchantColorsQueryData,
|
|
7
7
|
getMerchantFrontendConfigQuery,
|
|
8
8
|
GetMerchantFrontendConfigQueryData,
|
|
9
|
-
} from
|
|
10
|
-
import { getMerchantOrgIdQuery } from
|
|
11
|
-
import { isGraphQLColorsConfig } from
|
|
12
|
-
import { validateGraphQLColorsConfig } from
|
|
13
|
-
import { validateGraphQLFrontendConfig } from
|
|
14
|
-
import { validateGraphQLOrgId } from
|
|
15
|
-
import { EnvironmentService } from
|
|
16
|
-
import { getQueryParam } from
|
|
17
|
-
import { getAtomStore } from
|
|
18
|
-
import { apiKeyAtom } from
|
|
9
|
+
} from "src/application/models/graphql";
|
|
10
|
+
import { getMerchantOrgIdQuery } from "src/application/models/graphql/queries/getMerchantOrgIdQuery";
|
|
11
|
+
import { isGraphQLColorsConfig } from "src/application/models/guards/graphQL/isGraphQLColorsConfig";
|
|
12
|
+
import { validateGraphQLColorsConfig } from "src/application/models/validators/validateGraphQLColorsConfig";
|
|
13
|
+
import { validateGraphQLFrontendConfig } from "src/application/models/validators/validateGraphQLFrontendConfig";
|
|
14
|
+
import { validateGraphQLOrgId } from "src/application/models/validators/validateGraphQLOrgId";
|
|
15
|
+
import { EnvironmentService } from "src/application/service/environmentService";
|
|
16
|
+
import { getQueryParam } from "src/application/utils/urlsParser";
|
|
17
|
+
import { getAtomStore } from "src/atoms/atomStore/atomStore";
|
|
18
|
+
import { apiKeyAtom } from "src/atoms/org/org";
|
|
19
19
|
|
|
20
20
|
export const configVersion = () =>
|
|
21
|
-
getQueryParam(
|
|
21
|
+
getQueryParam("spiffy_config_version") ||
|
|
22
|
+
getQueryParam("envive_config_version") ||
|
|
23
|
+
"deployed";
|
|
22
24
|
|
|
23
25
|
const colorsAndFrontendConfigQuery = () => `
|
|
24
26
|
query ($version: String = "${configVersion()}") {
|
|
@@ -57,7 +59,10 @@ class GraphQLClient {
|
|
|
57
59
|
if (!GraphQLClient.instance) {
|
|
58
60
|
const atomStore = getAtomStore();
|
|
59
61
|
const apiKey = atomStore.get(apiKeyAtom);
|
|
60
|
-
GraphQLClient.instance = new GraphQLClient(
|
|
62
|
+
GraphQLClient.instance = new GraphQLClient(
|
|
63
|
+
apiKey,
|
|
64
|
+
EnvironmentService.getApiEndpoint()
|
|
65
|
+
);
|
|
61
66
|
}
|
|
62
67
|
|
|
63
68
|
return GraphQLClient.instance;
|
|
@@ -68,11 +73,14 @@ class GraphQLClient {
|
|
|
68
73
|
this.basePath = basePath;
|
|
69
74
|
}
|
|
70
75
|
|
|
71
|
-
private async executeQuery<T>(
|
|
76
|
+
private async executeQuery<T>(
|
|
77
|
+
query: string,
|
|
78
|
+
variables?: Record<string, unknown>
|
|
79
|
+
): Promise<T> {
|
|
72
80
|
const response = await fetch(`${this.basePath}/v1/graphql`, {
|
|
73
|
-
method:
|
|
81
|
+
method: "POST",
|
|
74
82
|
headers: {
|
|
75
|
-
|
|
83
|
+
"Content-Type": "application/json",
|
|
76
84
|
Authorization: `Bearer ${this.apiKey}`,
|
|
77
85
|
},
|
|
78
86
|
body: JSON.stringify({
|
|
@@ -97,11 +105,13 @@ class GraphQLClient {
|
|
|
97
105
|
static readonly getOrgId = async (): Promise<string | undefined> => {
|
|
98
106
|
const query = getMerchantOrgIdQuery;
|
|
99
107
|
if (!query) {
|
|
100
|
-
throw new Error(
|
|
108
|
+
throw new Error("Org id query is not defined");
|
|
101
109
|
}
|
|
102
110
|
|
|
103
111
|
const response =
|
|
104
|
-
await GraphQLClient.getInstance().executeQuery<BaseMeConfigQueryResponse>(
|
|
112
|
+
await GraphQLClient.getInstance().executeQuery<BaseMeConfigQueryResponse>(
|
|
113
|
+
query
|
|
114
|
+
);
|
|
105
115
|
|
|
106
116
|
return validateGraphQLOrgId(response.me.org?.id);
|
|
107
117
|
};
|
|
@@ -113,22 +123,24 @@ class GraphQLClient {
|
|
|
113
123
|
try {
|
|
114
124
|
const query = colorsAndFrontendConfigQuery();
|
|
115
125
|
if (!query) {
|
|
116
|
-
throw new Error(
|
|
126
|
+
throw new Error("Colors and frontend config query is not defined");
|
|
117
127
|
}
|
|
118
128
|
|
|
119
129
|
const response =
|
|
120
|
-
await GraphQLClient.getInstance().executeQuery<BaseMeConfigQueryResponse>(
|
|
130
|
+
await GraphQLClient.getInstance().executeQuery<BaseMeConfigQueryResponse>(
|
|
131
|
+
query
|
|
132
|
+
);
|
|
121
133
|
|
|
122
134
|
return {
|
|
123
135
|
colorsConfig: validateGraphQLColorsConfig(
|
|
124
|
-
response.me.getProductsConfigByVersion?.colors?.values
|
|
136
|
+
response.me.getProductsConfigByVersion?.colors?.values
|
|
125
137
|
),
|
|
126
138
|
frontendConfig: validateGraphQLFrontendConfig(
|
|
127
|
-
response.me.getProductsConfigByVersion?.frontend?.values
|
|
139
|
+
response.me.getProductsConfigByVersion?.frontend?.values
|
|
128
140
|
),
|
|
129
141
|
};
|
|
130
142
|
} catch (err) {
|
|
131
|
-
Logger.logError(
|
|
143
|
+
Logger.logError("Error fetching graphql colors and frontend config", err);
|
|
132
144
|
return {
|
|
133
145
|
colorsConfig: undefined,
|
|
134
146
|
frontendConfig: undefined,
|
|
@@ -136,46 +148,58 @@ class GraphQLClient {
|
|
|
136
148
|
}
|
|
137
149
|
};
|
|
138
150
|
|
|
139
|
-
static readonly getFrontendConfig = async (): Promise<
|
|
151
|
+
static readonly getFrontendConfig = async (): Promise<
|
|
152
|
+
FrontendConfig | undefined
|
|
153
|
+
> => {
|
|
140
154
|
try {
|
|
141
155
|
const query = getMerchantFrontendConfigQuery();
|
|
142
156
|
if (!query) {
|
|
143
|
-
throw new Error(
|
|
157
|
+
throw new Error("Frontend config query is not defined");
|
|
144
158
|
}
|
|
145
159
|
|
|
146
160
|
const response =
|
|
147
|
-
await GraphQLClient.getInstance().executeQuery<BaseMeConfigQueryResponse>(
|
|
161
|
+
await GraphQLClient.getInstance().executeQuery<BaseMeConfigQueryResponse>(
|
|
162
|
+
query
|
|
163
|
+
);
|
|
148
164
|
|
|
149
165
|
if (!response.me.getProductsConfigByVersion?.frontend) {
|
|
150
|
-
throw new Error(
|
|
166
|
+
throw new Error("No frontend config found");
|
|
151
167
|
}
|
|
152
168
|
|
|
153
|
-
return validateGraphQLFrontendConfig(
|
|
169
|
+
return validateGraphQLFrontendConfig(
|
|
170
|
+
response.me.getProductsConfigByVersion.frontend.values
|
|
171
|
+
);
|
|
154
172
|
} catch (err) {
|
|
155
|
-
Logger.logError(
|
|
173
|
+
Logger.logError("Error fetching graphql frontend config", err);
|
|
156
174
|
return undefined;
|
|
157
175
|
}
|
|
158
176
|
};
|
|
159
177
|
|
|
160
|
-
static readonly getColors = async (): Promise<
|
|
178
|
+
static readonly getColors = async (): Promise<
|
|
179
|
+
GetMerchantColorsQueryData | undefined
|
|
180
|
+
> => {
|
|
161
181
|
try {
|
|
162
182
|
const query = getMerchantColorsQuery();
|
|
163
183
|
if (!query) {
|
|
164
|
-
throw new Error(
|
|
184
|
+
throw new Error("Colors query is not defined");
|
|
165
185
|
}
|
|
166
186
|
|
|
167
187
|
const response =
|
|
168
|
-
await GraphQLClient.getInstance().executeQuery<BaseMeConfigQueryResponse>(
|
|
188
|
+
await GraphQLClient.getInstance().executeQuery<BaseMeConfigQueryResponse>(
|
|
189
|
+
query
|
|
190
|
+
);
|
|
169
191
|
|
|
170
192
|
if (!response.me.getProductsConfigByVersion?.colors) {
|
|
171
|
-
throw new Error(
|
|
193
|
+
throw new Error("No colors config found");
|
|
172
194
|
}
|
|
173
195
|
|
|
174
|
-
return isGraphQLColorsConfig(
|
|
196
|
+
return isGraphQLColorsConfig(
|
|
197
|
+
response.me.getProductsConfigByVersion.colors.values
|
|
198
|
+
)
|
|
175
199
|
? response.me.getProductsConfigByVersion.colors.values
|
|
176
200
|
: undefined;
|
|
177
201
|
} catch (err) {
|
|
178
|
-
Logger.logError(
|
|
202
|
+
Logger.logError("Error fetching graphql colors config", err);
|
|
179
203
|
return undefined;
|
|
180
204
|
}
|
|
181
205
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./generalStaticConfig";
|
|
@@ -1,20 +1,105 @@
|
|
|
1
1
|
// models
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
2
|
+
export * from "./cachedValue";
|
|
3
|
+
export * from "./chatElementDisplayLocation";
|
|
4
|
+
export * from "./clientDetails";
|
|
5
|
+
export * from "./colorsConfig";
|
|
6
|
+
export * from "./conversationalSearchIds";
|
|
7
|
+
export * from "./dataLayer";
|
|
8
|
+
export * from "./domMutationContinuation";
|
|
9
|
+
export * from "./domObservationStrategy";
|
|
10
|
+
export * from "./events";
|
|
11
|
+
export * from "./featureGates";
|
|
12
|
+
export * from "./frontendConfig";
|
|
13
|
+
export * from "./googleAnalyticsEvents";
|
|
14
|
+
export * from "./message";
|
|
15
|
+
export * from "./mobilePLPChatPlacementParameter";
|
|
16
|
+
export * from "./orgsEnum";
|
|
17
|
+
export * from "./productExperiment";
|
|
18
|
+
export * from "./spanxTakeAQuizCtaParameter";
|
|
19
|
+
export * from "./spiffyWidgets";
|
|
20
|
+
export * from "./supportedOrgs";
|
|
21
|
+
|
|
22
|
+
// api
|
|
23
|
+
export * from "./api/context";
|
|
24
|
+
export * from "./api/generationParams";
|
|
25
|
+
export * from "./api/nextMessageRequest";
|
|
26
|
+
export * from "./api/orgAnalyticsConfig";
|
|
27
|
+
export * from "./api/organizationConfig";
|
|
28
|
+
export * from "./api/orgConfigResults";
|
|
29
|
+
export * from "./api/response";
|
|
30
|
+
export * from "./api/responseGenerics";
|
|
31
|
+
export * from "./api/search";
|
|
32
|
+
export * from "./api/suggestion";
|
|
33
|
+
export * from "./api/supportedEventRequest";
|
|
34
|
+
export * from "./api/userEvent";
|
|
35
|
+
|
|
36
|
+
// graphql
|
|
37
|
+
export * from "./graphql";
|
|
38
|
+
export * from "./graphql/queries/getMerchantColorsQuery";
|
|
39
|
+
export * from "./graphql/queries/getMerchantFrontendConfigQuery";
|
|
40
|
+
export * from "./graphql/queries/getMerchantOrgIdQuery";
|
|
16
41
|
|
|
17
42
|
// type guards
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
43
|
+
export * from "./guards/isBaseEcommerceEvent";
|
|
44
|
+
export * from "./guards/isGA4EcommerceEvent";
|
|
45
|
+
export * from "./guards/isLegacyUAEcommerceEvent";
|
|
46
|
+
export * from "./guards/isMobilePLPChatPlacementParameter";
|
|
47
|
+
export * from "./guards/isSpanxTakeAQuizCtaParameter";
|
|
48
|
+
export * from "./guards/isVariantInfo";
|
|
49
|
+
export * from "./guards/utils";
|
|
50
|
+
export * from "./guards/api";
|
|
51
|
+
export * from "./guards/api/isApiFormResponse";
|
|
52
|
+
export * from "./guards/api/isApiFormSubmittedResponseAttributes";
|
|
53
|
+
export * from "./guards/api/isApiOrderResponseAttributes";
|
|
54
|
+
export * from "./guards/api/isApiOrganizationConfig";
|
|
55
|
+
export * from "./guards/api/isApiOrgConfigResults";
|
|
56
|
+
export * from "./guards/api/isApiPageResponseAttributes";
|
|
57
|
+
export * from "./guards/api/isApiPDPEventAttributes";
|
|
58
|
+
export * from "./guards/api/isApiPLPEventAttributes";
|
|
59
|
+
export * from "./guards/api/isApiProductResponseAttributes";
|
|
60
|
+
export * from "./guards/api/isApiProductSearchAttributes";
|
|
61
|
+
export * from "./guards/api/isApiProductSearchFilterAttributes";
|
|
62
|
+
export * from "./guards/api/isApiQueryTypedEventAttributes";
|
|
63
|
+
export * from "./guards/api/isApiResponse";
|
|
64
|
+
export * from "./guards/api/isApiReviewResponseAttributes";
|
|
65
|
+
export * from "./guards/api/isApiReviewRichInformation";
|
|
66
|
+
export * from "./guards/api/isApiSearchEventAttributes";
|
|
67
|
+
export * from "./guards/api/isApiSuggestion";
|
|
68
|
+
export * from "./guards/api/isApiSuggestionClickedEventAttributes";
|
|
69
|
+
export * from "./guards/api/isApiTextResponseAttributes";
|
|
70
|
+
export * from "./guards/api/isApiUserEvent";
|
|
71
|
+
export * from "./guards/graphQL/isGraphQLColorsConfig";
|
|
72
|
+
|
|
73
|
+
// utilityTypes
|
|
74
|
+
export * from "./utilityTypes/camelCase";
|
|
75
|
+
export * from "./utilityTypes/camelCasedPropertiesDeep";
|
|
76
|
+
export * from "./utilityTypes/delimiterCase";
|
|
77
|
+
export * from "./utilityTypes/delimiterCasedPropertiesDeep";
|
|
78
|
+
export * from "./utilityTypes";
|
|
79
|
+
export * from "./utilityTypes/internal";
|
|
80
|
+
export * from "./utilityTypes/primitive";
|
|
81
|
+
export * from "./utilityTypes/snakeCasedPropertiesDeep";
|
|
82
|
+
export * from "./utilityTypes/splitWords";
|
|
83
|
+
export * from "./utilityTypes/trim";
|
|
84
|
+
export * from "./utilityTypes/unknownArray";
|
|
85
|
+
|
|
86
|
+
// utils
|
|
87
|
+
export * from "./utils/snakeToCamelTransformer";
|
|
88
|
+
export * from "./utils/stringToFulfillmentDisplayStatusEnumValue";
|
|
89
|
+
|
|
90
|
+
// validators
|
|
91
|
+
export * from "./validators/validateGraphQLColorsConfig";
|
|
92
|
+
export * from "./validators/validateGraphQLFrontendConfig";
|
|
93
|
+
export * from "./validators/validateGraphQLOrgId";
|
|
94
|
+
export * from "./validators/validateMobilePLPChatPlacementParameter";
|
|
95
|
+
export * from "./validators/validateOrganizationConfig";
|
|
96
|
+
export * from "./validators/validateOrgConfigResults";
|
|
97
|
+
export * from "./validators/validateResponse";
|
|
98
|
+
export * from "./validators/validateSuggestion";
|
|
99
|
+
export * from "./validators/validateUserEvent";
|
|
100
|
+
|
|
101
|
+
// variantInfo
|
|
102
|
+
export * from "./variantInfo";
|
|
103
|
+
export * from "./variantInfo/pageVisitInfo";
|
|
104
|
+
export * from "./variantInfo/plpInfo";
|
|
105
|
+
export * from "./variantInfo/productInfo";
|