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