@moneylion/react-native-offer-carousel 1.0.0
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/README.md +1 -0
- package/lib/commonjs/apiEnvironment.js +24 -0
- package/lib/commonjs/apiEnvironment.js.map +1 -0
- package/lib/commonjs/components/Button/index.js +119 -0
- package/lib/commonjs/components/Button/index.js.map +1 -0
- package/lib/commonjs/components/Cards/VideosCard/VideoContent.js +40 -0
- package/lib/commonjs/components/Cards/VideosCard/VideoContent.js.map +1 -0
- package/lib/commonjs/components/Cards/VideosCard/VideosCard.js +56 -0
- package/lib/commonjs/components/Cards/VideosCard/VideosCard.js.map +1 -0
- package/lib/commonjs/components/Cards/index.js +3 -0
- package/lib/commonjs/components/Cards/index.js.map +1 -0
- package/lib/commonjs/components/Common/BaseOfferCard/Content/Content.js +20 -0
- package/lib/commonjs/components/Common/BaseOfferCard/Content/Content.js.map +1 -0
- package/lib/commonjs/components/Common/BaseOfferCard/Content/index.js +17 -0
- package/lib/commonjs/components/Common/BaseOfferCard/Content/index.js.map +1 -0
- package/lib/commonjs/components/Common/BaseOfferCard/Stat/Stat.js +83 -0
- package/lib/commonjs/components/Common/BaseOfferCard/Stat/Stat.js.map +1 -0
- package/lib/commonjs/components/Common/BaseOfferCard/Stat/index.js +17 -0
- package/lib/commonjs/components/Common/BaseOfferCard/Stat/index.js.map +1 -0
- package/lib/commonjs/components/Common/BaseOfferCard/StatsContainer/StatsContainer.js +18 -0
- package/lib/commonjs/components/Common/BaseOfferCard/StatsContainer/StatsContainer.js.map +1 -0
- package/lib/commonjs/components/Common/BaseOfferCard/StatsContainer/index.js +17 -0
- package/lib/commonjs/components/Common/BaseOfferCard/StatsContainer/index.js.map +1 -0
- package/lib/commonjs/components/Common/BaseOfferCard/ThumbsUpIcon.js +29 -0
- package/lib/commonjs/components/Common/BaseOfferCard/ThumbsUpIcon.js.map +1 -0
- package/lib/commonjs/components/Common/BaseOfferCard/index.js +254 -0
- package/lib/commonjs/components/Common/BaseOfferCard/index.js.map +1 -0
- package/lib/commonjs/components/Common/DynamicOfferCard/CallToAction.js +45 -0
- package/lib/commonjs/components/Common/DynamicOfferCard/CallToAction.js.map +1 -0
- package/lib/commonjs/components/Common/DynamicOfferCard/SeeMore.js +72 -0
- package/lib/commonjs/components/Common/DynamicOfferCard/SeeMore.js.map +1 -0
- package/lib/commonjs/components/Common/DynamicOfferCard/index.js +37 -0
- package/lib/commonjs/components/Common/DynamicOfferCard/index.js.map +1 -0
- package/lib/commonjs/components/Common/index.js +27 -0
- package/lib/commonjs/components/Common/index.js.map +1 -0
- package/lib/commonjs/components/Divider/index.js +39 -0
- package/lib/commonjs/components/Divider/index.js.map +1 -0
- package/lib/commonjs/components/DynamicOffers/DynamicOffers.js +32 -0
- package/lib/commonjs/components/DynamicOffers/DynamicOffers.js.map +1 -0
- package/lib/commonjs/components/DynamicOffers/DynamicOffersContainer.js +49 -0
- package/lib/commonjs/components/DynamicOffers/DynamicOffersContainer.js.map +1 -0
- package/lib/commonjs/components/DynamicOffers/Render/DynamicOffersRender.js +205 -0
- package/lib/commonjs/components/DynamicOffers/Render/DynamicOffersRender.js.map +1 -0
- package/lib/commonjs/components/DynamicOffers/Render/FallbackOfferTemplate.js +28 -0
- package/lib/commonjs/components/DynamicOffers/Render/FallbackOfferTemplate.js.map +1 -0
- package/lib/commonjs/components/DynamicOffers/Render/Offer.js +70 -0
- package/lib/commonjs/components/DynamicOffers/Render/Offer.js.map +1 -0
- package/lib/commonjs/components/DynamicOffers/Render/index.js +20 -0
- package/lib/commonjs/components/DynamicOffers/Render/index.js.map +1 -0
- package/lib/commonjs/components/Layouts/CreditCardOfferCard/index.js +65 -0
- package/lib/commonjs/components/Layouts/CreditCardOfferCard/index.js.map +1 -0
- package/lib/commonjs/components/Layouts/CreditCardOfferCard/statsBuilder.js +15 -0
- package/lib/commonjs/components/Layouts/CreditCardOfferCard/statsBuilder.js.map +1 -0
- package/lib/commonjs/components/Layouts/DefaultOfferCard/index.js +53 -0
- package/lib/commonjs/components/Layouts/DefaultOfferCard/index.js.map +1 -0
- package/lib/commonjs/components/Layouts/DefaultOfferCard/statsBuilder.js +17 -0
- package/lib/commonjs/components/Layouts/DefaultOfferCard/statsBuilder.js.map +1 -0
- package/lib/commonjs/components/Layouts/HeadlineWithDescriptionCard/index.js +47 -0
- package/lib/commonjs/components/Layouts/HeadlineWithDescriptionCard/index.js.map +1 -0
- package/lib/commonjs/components/Layouts/index.js +27 -0
- package/lib/commonjs/components/Layouts/index.js.map +1 -0
- package/lib/commonjs/components/Modal/DescriptionPoints.js +28 -0
- package/lib/commonjs/components/Modal/DescriptionPoints.js.map +1 -0
- package/lib/commonjs/components/Modal/Disclaimer.js +27 -0
- package/lib/commonjs/components/Modal/Disclaimer.js.map +1 -0
- package/lib/commonjs/components/Modal/OfferDetailsModal.js +95 -0
- package/lib/commonjs/components/Modal/OfferDetailsModal.js.map +1 -0
- package/lib/commonjs/components/MoneyLionOfferCarousel.js +174 -0
- package/lib/commonjs/components/MoneyLionOfferCarousel.js.map +1 -0
- package/lib/commonjs/components/Skeleton/Skeleton.js +65 -0
- package/lib/commonjs/components/Skeleton/Skeleton.js.map +1 -0
- package/lib/commonjs/components/Skeleton/index.js +10 -0
- package/lib/commonjs/components/Skeleton/index.js.map +1 -0
- package/lib/commonjs/components/Text/index.js +184 -0
- package/lib/commonjs/components/Text/index.js.map +1 -0
- package/lib/commonjs/components/View/index.js +162 -0
- package/lib/commonjs/components/View/index.js.map +1 -0
- package/lib/commonjs/context/CNFProvider.js +2 -0
- package/lib/commonjs/context/CNFProvider.js.map +1 -0
- package/lib/commonjs/context/EventHandlerProvider.js +25 -0
- package/lib/commonjs/context/EventHandlerProvider.js.map +1 -0
- package/lib/commonjs/context/ThemeProvider.js +59 -0
- package/lib/commonjs/context/ThemeProvider.js.map +1 -0
- package/lib/commonjs/deps/configuration.js +2 -0
- package/lib/commonjs/deps/configuration.js.map +1 -0
- package/lib/commonjs/index.js +17 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/pageData.js +93 -0
- package/lib/commonjs/pageData.js.map +1 -0
- package/lib/commonjs/services/getDynamicOffers.js +55 -0
- package/lib/commonjs/services/getDynamicOffers.js.map +1 -0
- package/lib/commonjs/services/getProductTypes.js +50 -0
- package/lib/commonjs/services/getProductTypes.js.map +1 -0
- package/lib/commonjs/services/getProductTypesByQuery.js +55 -0
- package/lib/commonjs/services/getProductTypesByQuery.js.map +1 -0
- package/lib/commonjs/utils/addClientTagsToOfferLinks.js +25 -0
- package/lib/commonjs/utils/addClientTagsToOfferLinks.js.map +1 -0
- package/lib/commonjs/utils/formatOfferUrl.js +31 -0
- package/lib/commonjs/utils/formatOfferUrl.js.map +1 -0
- package/lib/commonjs/utils/getDefaultPaletteColor.js +20 -0
- package/lib/commonjs/utils/getDefaultPaletteColor.js.map +1 -0
- package/lib/commonjs/utils/getDefaultProductType.js +9 -0
- package/lib/commonjs/utils/getDefaultProductType.js.map +1 -0
- package/lib/commonjs/utils/getEnableUseCachedOffers.js +21 -0
- package/lib/commonjs/utils/getEnableUseCachedOffers.js.map +1 -0
- package/lib/commonjs/utils/getOffersBasedOnLayout.js +48 -0
- package/lib/commonjs/utils/getOffersBasedOnLayout.js.map +1 -0
- package/lib/commonjs/utils/getOffersByProductTypes.js +31 -0
- package/lib/commonjs/utils/getOffersByProductTypes.js.map +1 -0
- package/lib/commonjs/utils/getProductTypesDefinition.js +17 -0
- package/lib/commonjs/utils/getProductTypesDefinition.js.map +1 -0
- package/lib/commonjs/utils/index.js +116 -0
- package/lib/commonjs/utils/index.js.map +1 -0
- package/lib/commonjs/utils/layouts.js +27 -0
- package/lib/commonjs/utils/layouts.js.map +1 -0
- package/lib/commonjs/utils/parseStringProductTypes.js +14 -0
- package/lib/commonjs/utils/parseStringProductTypes.js.map +1 -0
- package/lib/commonjs/utils/resolveProductTypes.js +12 -0
- package/lib/commonjs/utils/resolveProductTypes.js.map +1 -0
- package/lib/commonjs/utils/selectDynamicOffers.js +13 -0
- package/lib/commonjs/utils/selectDynamicOffers.js.map +1 -0
- package/lib/commonjs/utils/sortOffersByRecommendationScore.js +12 -0
- package/lib/commonjs/utils/sortOffersByRecommendationScore.js.map +1 -0
- package/lib/commonjs/version.js +10 -0
- package/lib/commonjs/version.js.map +1 -0
- package/lib/module/apiEnvironment.js +15 -0
- package/lib/module/apiEnvironment.js.map +1 -0
- package/lib/module/components/Button/index.js +111 -0
- package/lib/module/components/Button/index.js.map +1 -0
- package/lib/module/components/Cards/VideosCard/VideoContent.js +32 -0
- package/lib/module/components/Cards/VideosCard/VideoContent.js.map +1 -0
- package/lib/module/components/Cards/VideosCard/VideosCard.js +55 -0
- package/lib/module/components/Cards/VideosCard/VideosCard.js.map +1 -0
- package/lib/module/components/Cards/index.js +2 -0
- package/lib/module/components/Cards/index.js.map +1 -0
- package/lib/module/components/Common/BaseOfferCard/Content/Content.js +13 -0
- package/lib/module/components/Common/BaseOfferCard/Content/Content.js.map +1 -0
- package/lib/module/components/Common/BaseOfferCard/Content/index.js +2 -0
- package/lib/module/components/Common/BaseOfferCard/Content/index.js.map +1 -0
- package/lib/module/components/Common/BaseOfferCard/Stat/Stat.js +76 -0
- package/lib/module/components/Common/BaseOfferCard/Stat/Stat.js.map +1 -0
- package/lib/module/components/Common/BaseOfferCard/Stat/index.js +2 -0
- package/lib/module/components/Common/BaseOfferCard/Stat/index.js.map +1 -0
- package/lib/module/components/Common/BaseOfferCard/StatsContainer/StatsContainer.js +10 -0
- package/lib/module/components/Common/BaseOfferCard/StatsContainer/StatsContainer.js.map +1 -0
- package/lib/module/components/Common/BaseOfferCard/StatsContainer/index.js +2 -0
- package/lib/module/components/Common/BaseOfferCard/StatsContainer/index.js.map +1 -0
- package/lib/module/components/Common/BaseOfferCard/ThumbsUpIcon.js +21 -0
- package/lib/module/components/Common/BaseOfferCard/ThumbsUpIcon.js.map +1 -0
- package/lib/module/components/Common/BaseOfferCard/index.js +248 -0
- package/lib/module/components/Common/BaseOfferCard/index.js.map +1 -0
- package/lib/module/components/Common/DynamicOfferCard/CallToAction.js +37 -0
- package/lib/module/components/Common/DynamicOfferCard/CallToAction.js.map +1 -0
- package/lib/module/components/Common/DynamicOfferCard/SeeMore.js +62 -0
- package/lib/module/components/Common/DynamicOfferCard/SeeMore.js.map +1 -0
- package/lib/module/components/Common/DynamicOfferCard/index.js +31 -0
- package/lib/module/components/Common/DynamicOfferCard/index.js.map +1 -0
- package/lib/module/components/Common/index.js +4 -0
- package/lib/module/components/Common/index.js.map +1 -0
- package/lib/module/components/Divider/index.js +33 -0
- package/lib/module/components/Divider/index.js.map +1 -0
- package/lib/module/components/DynamicOffers/DynamicOffers.js +24 -0
- package/lib/module/components/DynamicOffers/DynamicOffers.js.map +1 -0
- package/lib/module/components/DynamicOffers/DynamicOffersContainer.js +40 -0
- package/lib/module/components/DynamicOffers/DynamicOffersContainer.js.map +1 -0
- package/lib/module/components/DynamicOffers/Render/DynamicOffersRender.js +196 -0
- package/lib/module/components/DynamicOffers/Render/DynamicOffersRender.js.map +1 -0
- package/lib/module/components/DynamicOffers/Render/FallbackOfferTemplate.js +21 -0
- package/lib/module/components/DynamicOffers/Render/FallbackOfferTemplate.js.map +1 -0
- package/lib/module/components/DynamicOffers/Render/Offer.js +61 -0
- package/lib/module/components/DynamicOffers/Render/Offer.js.map +1 -0
- package/lib/module/components/DynamicOffers/Render/index.js +3 -0
- package/lib/module/components/DynamicOffers/Render/index.js.map +1 -0
- package/lib/module/components/Layouts/CreditCardOfferCard/index.js +57 -0
- package/lib/module/components/Layouts/CreditCardOfferCard/index.js.map +1 -0
- package/lib/module/components/Layouts/CreditCardOfferCard/statsBuilder.js +8 -0
- package/lib/module/components/Layouts/CreditCardOfferCard/statsBuilder.js.map +1 -0
- package/lib/module/components/Layouts/DefaultOfferCard/index.js +45 -0
- package/lib/module/components/Layouts/DefaultOfferCard/index.js.map +1 -0
- package/lib/module/components/Layouts/DefaultOfferCard/statsBuilder.js +10 -0
- package/lib/module/components/Layouts/DefaultOfferCard/statsBuilder.js.map +1 -0
- package/lib/module/components/Layouts/HeadlineWithDescriptionCard/index.js +39 -0
- package/lib/module/components/Layouts/HeadlineWithDescriptionCard/index.js.map +1 -0
- package/lib/module/components/Layouts/index.js +4 -0
- package/lib/module/components/Layouts/index.js.map +1 -0
- package/lib/module/components/Modal/DescriptionPoints.js +21 -0
- package/lib/module/components/Modal/DescriptionPoints.js.map +1 -0
- package/lib/module/components/Modal/Disclaimer.js +20 -0
- package/lib/module/components/Modal/Disclaimer.js.map +1 -0
- package/lib/module/components/Modal/OfferDetailsModal.js +87 -0
- package/lib/module/components/Modal/OfferDetailsModal.js.map +1 -0
- package/lib/module/components/MoneyLionOfferCarousel.js +165 -0
- package/lib/module/components/MoneyLionOfferCarousel.js.map +1 -0
- package/lib/module/components/Skeleton/Skeleton.js +57 -0
- package/lib/module/components/Skeleton/Skeleton.js.map +1 -0
- package/lib/module/components/Skeleton/index.js +3 -0
- package/lib/module/components/Skeleton/index.js.map +1 -0
- package/lib/module/components/Text/index.js +179 -0
- package/lib/module/components/Text/index.js.map +1 -0
- package/lib/module/components/View/index.js +155 -0
- package/lib/module/components/View/index.js.map +1 -0
- package/lib/module/context/CNFProvider.js +2 -0
- package/lib/module/context/CNFProvider.js.map +1 -0
- package/lib/module/context/EventHandlerProvider.js +15 -0
- package/lib/module/context/EventHandlerProvider.js.map +1 -0
- package/lib/module/context/ThemeProvider.js +49 -0
- package/lib/module/context/ThemeProvider.js.map +1 -0
- package/lib/module/deps/configuration.js +2 -0
- package/lib/module/deps/configuration.js.map +1 -0
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/pageData.js +86 -0
- package/lib/module/pageData.js.map +1 -0
- package/lib/module/services/getDynamicOffers.js +48 -0
- package/lib/module/services/getDynamicOffers.js.map +1 -0
- package/lib/module/services/getProductTypes.js +43 -0
- package/lib/module/services/getProductTypes.js.map +1 -0
- package/lib/module/services/getProductTypesByQuery.js +48 -0
- package/lib/module/services/getProductTypesByQuery.js.map +1 -0
- package/lib/module/utils/addClientTagsToOfferLinks.js +18 -0
- package/lib/module/utils/addClientTagsToOfferLinks.js.map +1 -0
- package/lib/module/utils/formatOfferUrl.js +25 -0
- package/lib/module/utils/formatOfferUrl.js.map +1 -0
- package/lib/module/utils/getDefaultPaletteColor.js +13 -0
- package/lib/module/utils/getDefaultPaletteColor.js.map +1 -0
- package/lib/module/utils/getDefaultProductType.js +2 -0
- package/lib/module/utils/getDefaultProductType.js.map +1 -0
- package/lib/module/utils/getEnableUseCachedOffers.js +14 -0
- package/lib/module/utils/getEnableUseCachedOffers.js.map +1 -0
- package/lib/module/utils/getOffersBasedOnLayout.js +39 -0
- package/lib/module/utils/getOffersBasedOnLayout.js.map +1 -0
- package/lib/module/utils/getOffersByProductTypes.js +24 -0
- package/lib/module/utils/getOffersByProductTypes.js.map +1 -0
- package/lib/module/utils/getProductTypesDefinition.js +10 -0
- package/lib/module/utils/getProductTypesDefinition.js.map +1 -0
- package/lib/module/utils/index.js +11 -0
- package/lib/module/utils/index.js.map +1 -0
- package/lib/module/utils/layouts.js +20 -0
- package/lib/module/utils/layouts.js.map +1 -0
- package/lib/module/utils/parseStringProductTypes.js +7 -0
- package/lib/module/utils/parseStringProductTypes.js.map +1 -0
- package/lib/module/utils/resolveProductTypes.js +5 -0
- package/lib/module/utils/resolveProductTypes.js.map +1 -0
- package/lib/module/utils/selectDynamicOffers.js +6 -0
- package/lib/module/utils/selectDynamicOffers.js.map +1 -0
- package/lib/module/utils/sortOffersByRecommendationScore.js +5 -0
- package/lib/module/utils/sortOffersByRecommendationScore.js.map +1 -0
- package/lib/module/version.js +3 -0
- package/lib/module/version.js.map +1 -0
- package/lib/typescript/builder/builder.d.ts +24 -0
- package/lib/typescript/builder/builder.d.ts.map +1 -0
- package/lib/typescript/builder/config/types.d.ts +89 -0
- package/lib/typescript/builder/config/types.d.ts.map +1 -0
- package/lib/typescript/builder/index.d.ts +3 -0
- package/lib/typescript/builder/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/configuration/src/brands/checkVisualEligibility.d.ts +12 -0
- package/lib/typescript/capabilities/configuration/src/brands/checkVisualEligibility.d.ts.map +1 -0
- package/lib/typescript/capabilities/configuration/src/brands/createDerivedBrands.d.ts +9 -0
- package/lib/typescript/capabilities/configuration/src/brands/createDerivedBrands.d.ts.map +1 -0
- package/lib/typescript/capabilities/configuration/src/brands/index.d.ts +3 -0
- package/lib/typescript/capabilities/configuration/src/brands/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/configuration/src/brands/types.d.ts +4 -0
- package/lib/typescript/capabilities/configuration/src/brands/types.d.ts.map +1 -0
- package/lib/typescript/capabilities/core/src/domain/third-party-search/index.d.ts +2 -0
- package/lib/typescript/capabilities/core/src/domain/third-party-search/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.d.ts +19 -0
- package/lib/typescript/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.d.ts.map +1 -0
- package/lib/typescript/capabilities/core/src/index.d.ts +2 -0
- package/lib/typescript/capabilities/core/src/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/CnfContext.d.ts +103 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/CnfContext.d.ts.map +1 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/App.d.ts +13 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/App.d.ts.map +1 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Brand.d.ts +180 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Brand.d.ts.map +1 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Configuration.d.ts +59 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Configuration.d.ts.map +1 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Request.d.ts +16 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Request.d.ts.map +1 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Session.d.ts +8 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Session.d.ts.map +1 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Signals.d.ts +64 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Signals.d.ts.map +1 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Subaccount.d.ts +18 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Subaccount.d.ts.map +1 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/index.d.ts +8 -0
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/api/offerCatalogApi.d.ts +5 -0
- package/lib/typescript/capabilities/offer-catalog/src/api/offerCatalogApi.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/index.d.ts +6 -0
- package/lib/typescript/capabilities/offer-catalog/src/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/types/offerCatalogSchema.d.ts +91 -0
- package/lib/typescript/capabilities/offer-catalog/src/types/offerCatalogSchema.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/arrayToMarkdownList.d.ts +2 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/arrayToMarkdownList.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/contextUtil.d.ts +8 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/contextUtil.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/errorUtil.d.ts +6 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/errorUtil.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/formatUtils.d.ts +68 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/formatUtils.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/getOfferUrl.d.ts +24 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/getOfferUrl.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.d.ts +13 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/boolean.d.ts +11 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/boolean.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/common.d.ts +14 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/common.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.d.ts +9 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/currency.d.ts +10 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/currency.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.d.ts +12 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.d.ts +9 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.d.ts +9 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/index.d.ts +20 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.d.ts +11 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/percentage.d.ts +9 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/percentage.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.d.ts +12 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.d.ts +10 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.d.ts +12 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.d.ts +10 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.d.ts +10 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.d.ts +11 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.d.ts +9 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.d.ts +9 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.d.ts +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/index.d.ts +5 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/types.d.ts +9 -0
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/types.d.ts.map +1 -0
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.d.ts +4 -0
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.d.ts +1837 -0
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.d.ts.map +1 -0
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/types/index.d.ts +5 -0
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/types/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.d.ts +208 -0
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.d.ts.map +1 -0
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/HyphenIcon.d.ts +7 -0
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/HyphenIcon.d.ts.map +1 -0
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/Stat.d.ts +12 -0
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/Stat.d.ts.map +1 -0
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/index.d.ts +2 -0
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.d.ts +5 -0
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.d.ts.map +1 -0
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/components.d.ts +9 -0
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/components.d.ts.map +1 -0
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/index.d.ts +7 -0
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.d.ts +2 -0
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.d.ts.map +1 -0
- package/lib/typescript/capabilities/ui/elements/src/components/index.d.ts +2 -0
- package/lib/typescript/capabilities/ui/elements/src/components/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/ui/elements/src/components/thumbor/index.d.ts +10 -0
- package/lib/typescript/capabilities/ui/elements/src/components/thumbor/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.d.ts +14 -0
- package/lib/typescript/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.d.ts.map +1 -0
- package/lib/typescript/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.d.ts +1 -0
- package/lib/typescript/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.d.ts.map +1 -0
- package/lib/typescript/capabilities/ui/elements/src/index.d.ts +3 -0
- package/lib/typescript/capabilities/ui/elements/src/index.d.ts.map +1 -0
- package/lib/typescript/capabilities/ui/elements/src/offerCardAttributes.d.ts +10 -0
- package/lib/typescript/capabilities/ui/elements/src/offerCardAttributes.d.ts.map +1 -0
- package/lib/typescript/config/mocks/cnfContext.d.ts +3 -0
- package/lib/typescript/config/mocks/cnfContext.d.ts.map +1 -0
- package/lib/typescript/src/apiEnvironment.d.ts +13 -0
- package/lib/typescript/src/apiEnvironment.d.ts.map +1 -0
- package/lib/typescript/src/components/Button/index.d.ts +15 -0
- package/lib/typescript/src/components/Button/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Cards/VideosCard/VideoContent.d.ts +9 -0
- package/lib/typescript/src/components/Cards/VideosCard/VideoContent.d.ts.map +1 -0
- package/lib/typescript/src/components/Cards/VideosCard/VideosCard.d.ts +1 -0
- package/lib/typescript/src/components/Cards/VideosCard/VideosCard.d.ts.map +1 -0
- package/lib/typescript/src/components/Cards/index.d.ts +1 -0
- package/lib/typescript/src/components/Cards/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/Content/Content.d.ts +4 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/Content/Content.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/Content/index.d.ts +2 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/Content/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/Stat/Stat.d.ts +8 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/Stat/Stat.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/Stat/index.d.ts +2 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/Stat/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/StatsContainer/StatsContainer.d.ts +4 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/StatsContainer/StatsContainer.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/StatsContainer/index.d.ts +2 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/StatsContainer/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/ThumbsUpIcon.d.ts +3 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/ThumbsUpIcon.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/index.d.ts +42 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/DynamicOfferCard/CallToAction.d.ts +13 -0
- package/lib/typescript/src/components/Common/DynamicOfferCard/CallToAction.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/DynamicOfferCard/SeeMore.d.ts +8 -0
- package/lib/typescript/src/components/Common/DynamicOfferCard/SeeMore.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/DynamicOfferCard/index.d.ts +12 -0
- package/lib/typescript/src/components/Common/DynamicOfferCard/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/index.d.ts +4 -0
- package/lib/typescript/src/components/Common/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Divider/index.d.ts +16 -0
- package/lib/typescript/src/components/Divider/index.d.ts.map +1 -0
- package/lib/typescript/src/components/DynamicOffers/DynamicOffers.d.ts +12 -0
- package/lib/typescript/src/components/DynamicOffers/DynamicOffers.d.ts.map +1 -0
- package/lib/typescript/src/components/DynamicOffers/DynamicOffersContainer.d.ts +10 -0
- package/lib/typescript/src/components/DynamicOffers/DynamicOffersContainer.d.ts.map +1 -0
- package/lib/typescript/src/components/DynamicOffers/Render/DynamicOffersRender.d.ts +19 -0
- package/lib/typescript/src/components/DynamicOffers/Render/DynamicOffersRender.d.ts.map +1 -0
- package/lib/typescript/src/components/DynamicOffers/Render/FallbackOfferTemplate.d.ts +9 -0
- package/lib/typescript/src/components/DynamicOffers/Render/FallbackOfferTemplate.d.ts.map +1 -0
- package/lib/typescript/src/components/DynamicOffers/Render/Offer.d.ts +17 -0
- package/lib/typescript/src/components/DynamicOffers/Render/Offer.d.ts.map +1 -0
- package/lib/typescript/src/components/DynamicOffers/Render/index.d.ts +3 -0
- package/lib/typescript/src/components/DynamicOffers/Render/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/index.d.ts +13 -0
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/statsBuilder.d.ts +6 -0
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/statsBuilder.d.ts.map +1 -0
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/index.d.ts +13 -0
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/statsBuilder.d.ts +7 -0
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/statsBuilder.d.ts.map +1 -0
- package/lib/typescript/src/components/Layouts/HeadlineWithDescriptionCard/index.d.ts +13 -0
- package/lib/typescript/src/components/Layouts/HeadlineWithDescriptionCard/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Layouts/index.d.ts +4 -0
- package/lib/typescript/src/components/Layouts/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Modal/DescriptionPoints.d.ts +5 -0
- package/lib/typescript/src/components/Modal/DescriptionPoints.d.ts.map +1 -0
- package/lib/typescript/src/components/Modal/Disclaimer.d.ts +5 -0
- package/lib/typescript/src/components/Modal/Disclaimer.d.ts.map +1 -0
- package/lib/typescript/src/components/Modal/OfferDetailsModal.d.ts +11 -0
- package/lib/typescript/src/components/Modal/OfferDetailsModal.d.ts.map +1 -0
- package/lib/typescript/src/components/MoneyLionOfferCarousel.d.ts +20 -0
- package/lib/typescript/src/components/MoneyLionOfferCarousel.d.ts.map +1 -0
- package/lib/typescript/src/components/Skeleton/Skeleton.d.ts +12 -0
- package/lib/typescript/src/components/Skeleton/Skeleton.d.ts.map +1 -0
- package/lib/typescript/src/components/Skeleton/index.d.ts +3 -0
- package/lib/typescript/src/components/Skeleton/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Text/index.d.ts +17 -0
- package/lib/typescript/src/components/Text/index.d.ts.map +1 -0
- package/lib/typescript/src/components/View/index.d.ts +23 -0
- package/lib/typescript/src/components/View/index.d.ts.map +1 -0
- package/lib/typescript/src/context/CNFProvider.d.ts +1 -0
- package/lib/typescript/src/context/CNFProvider.d.ts.map +1 -0
- package/lib/typescript/src/context/EventHandlerProvider.d.ts +71 -0
- package/lib/typescript/src/context/EventHandlerProvider.d.ts.map +1 -0
- package/lib/typescript/src/context/ThemeProvider.d.ts +31 -0
- package/lib/typescript/src/context/ThemeProvider.d.ts.map +1 -0
- package/lib/typescript/src/deps/configuration.d.ts +1 -0
- package/lib/typescript/src/deps/configuration.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +2 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/pageData.d.ts +19 -0
- package/lib/typescript/src/pageData.d.ts.map +1 -0
- package/lib/typescript/src/services/getDynamicOffers.d.ts +27 -0
- package/lib/typescript/src/services/getDynamicOffers.d.ts.map +1 -0
- package/lib/typescript/src/services/getProductTypes.d.ts +19 -0
- package/lib/typescript/src/services/getProductTypes.d.ts.map +1 -0
- package/lib/typescript/src/services/getProductTypesByQuery.d.ts +28 -0
- package/lib/typescript/src/services/getProductTypesByQuery.d.ts.map +1 -0
- package/lib/typescript/src/utils/addClientTagsToOfferLinks.d.ts +9 -0
- package/lib/typescript/src/utils/addClientTagsToOfferLinks.d.ts.map +1 -0
- package/lib/typescript/src/utils/formatOfferUrl.d.ts +64 -0
- package/lib/typescript/src/utils/formatOfferUrl.d.ts.map +1 -0
- package/lib/typescript/src/utils/getDefaultPaletteColor.d.ts +3 -0
- package/lib/typescript/src/utils/getDefaultPaletteColor.d.ts.map +1 -0
- package/lib/typescript/src/utils/getDefaultProductType.d.ts +3 -0
- package/lib/typescript/src/utils/getDefaultProductType.d.ts.map +1 -0
- package/lib/typescript/src/utils/getEnableUseCachedOffers.d.ts +12 -0
- package/lib/typescript/src/utils/getEnableUseCachedOffers.d.ts.map +1 -0
- package/lib/typescript/src/utils/getOffersBasedOnLayout.d.ts +26 -0
- package/lib/typescript/src/utils/getOffersBasedOnLayout.d.ts.map +1 -0
- package/lib/typescript/src/utils/getOffersByProductTypes.d.ts +17 -0
- package/lib/typescript/src/utils/getOffersByProductTypes.d.ts.map +1 -0
- package/lib/typescript/src/utils/getProductTypesDefinition.d.ts +14 -0
- package/lib/typescript/src/utils/getProductTypesDefinition.d.ts.map +1 -0
- package/lib/typescript/src/utils/index.d.ts +11 -0
- package/lib/typescript/src/utils/index.d.ts.map +1 -0
- package/lib/typescript/src/utils/layouts.d.ts +19 -0
- package/lib/typescript/src/utils/layouts.d.ts.map +1 -0
- package/lib/typescript/src/utils/parseStringProductTypes.d.ts +2 -0
- package/lib/typescript/src/utils/parseStringProductTypes.d.ts.map +1 -0
- package/lib/typescript/src/utils/resolveProductTypes.d.ts +14 -0
- package/lib/typescript/src/utils/resolveProductTypes.d.ts.map +1 -0
- package/lib/typescript/src/utils/selectDynamicOffers.d.ts +3 -0
- package/lib/typescript/src/utils/selectDynamicOffers.d.ts.map +1 -0
- package/lib/typescript/src/utils/sortOffersByRecommendationScore.d.ts +3 -0
- package/lib/typescript/src/utils/sortOffersByRecommendationScore.d.ts.map +1 -0
- package/lib/typescript/src/version.d.ts +2 -0
- package/lib/typescript/src/version.d.ts.map +1 -0
- package/package.json +139 -0
- package/src/apiEnvironment.ts +17 -0
- package/src/components/Button/index.tsx +140 -0
- package/src/components/Cards/VideosCard/VideoContent.tsx +38 -0
- package/src/components/Cards/VideosCard/VideosCard.tsx +54 -0
- package/src/components/Cards/index.ts +1 -0
- package/src/components/Common/BaseOfferCard/Content/Content.tsx +10 -0
- package/src/components/Common/BaseOfferCard/Content/index.tsx +1 -0
- package/src/components/Common/BaseOfferCard/Stat/Stat.tsx +91 -0
- package/src/components/Common/BaseOfferCard/Stat/index.tsx +1 -0
- package/src/components/Common/BaseOfferCard/StatsContainer/StatsContainer.tsx +8 -0
- package/src/components/Common/BaseOfferCard/StatsContainer/index.tsx +1 -0
- package/src/components/Common/BaseOfferCard/ThumbsUpIcon.tsx +27 -0
- package/src/components/Common/BaseOfferCard/index.tsx +282 -0
- package/src/components/Common/DynamicOfferCard/CallToAction.tsx +47 -0
- package/src/components/Common/DynamicOfferCard/SeeMore.tsx +76 -0
- package/src/components/Common/DynamicOfferCard/index.tsx +64 -0
- package/src/components/Common/index.ts +3 -0
- package/src/components/Divider/index.tsx +35 -0
- package/src/components/DynamicOffers/DynamicOffers.tsx +46 -0
- package/src/components/DynamicOffers/DynamicOffersContainer.tsx +41 -0
- package/src/components/DynamicOffers/Render/DynamicOffersRender.tsx +261 -0
- package/src/components/DynamicOffers/Render/FallbackOfferTemplate.tsx +29 -0
- package/src/components/DynamicOffers/Render/Offer.tsx +100 -0
- package/src/components/DynamicOffers/Render/index.ts +2 -0
- package/src/components/Layouts/CreditCardOfferCard/index.tsx +96 -0
- package/src/components/Layouts/CreditCardOfferCard/statsBuilder.tsx +10 -0
- package/src/components/Layouts/DefaultOfferCard/index.tsx +72 -0
- package/src/components/Layouts/DefaultOfferCard/statsBuilder.tsx +14 -0
- package/src/components/Layouts/HeadlineWithDescriptionCard/index.tsx +59 -0
- package/src/components/Layouts/index.ts +3 -0
- package/src/components/Modal/DescriptionPoints.tsx +24 -0
- package/src/components/Modal/Disclaimer.tsx +15 -0
- package/src/components/Modal/OfferDetailsModal.tsx +111 -0
- package/src/components/MoneyLionOfferCarousel.tsx +202 -0
- package/src/components/Skeleton/Skeleton.tsx +86 -0
- package/src/components/Skeleton/index.ts +2 -0
- package/src/components/Text/index.tsx +209 -0
- package/src/components/View/index.tsx +144 -0
- package/src/context/CNFProvider.tsx +0 -0
- package/src/context/EventHandlerProvider.tsx +89 -0
- package/src/context/ThemeProvider.tsx +91 -0
- package/src/deps/configuration.ts +0 -0
- package/src/index.tsx +1 -0
- package/src/pageData.ts +98 -0
- package/src/services/getDynamicOffers.ts +93 -0
- package/src/services/getProductTypes.ts +53 -0
- package/src/services/getProductTypesByQuery.ts +53 -0
- package/src/utils/addClientTagsToOfferLinks.ts +22 -0
- package/src/utils/formatOfferUrl.ts +32 -0
- package/src/utils/getDefaultPaletteColor.ts +15 -0
- package/src/utils/getDefaultProductType.ts +4 -0
- package/src/utils/getEnableUseCachedOffers.ts +13 -0
- package/src/utils/getOffersBasedOnLayout.ts +51 -0
- package/src/utils/getOffersByProductTypes.ts +36 -0
- package/src/utils/getProductTypesDefinition.ts +13 -0
- package/src/utils/index.ts +10 -0
- package/src/utils/layouts.ts +22 -0
- package/src/utils/parseStringProductTypes.ts +7 -0
- package/src/utils/resolveProductTypes.ts +18 -0
- package/src/utils/selectDynamicOffers.ts +18 -0
- package/src/utils/sortOffersByRecommendationScore.ts +6 -0
- package/src/version.ts +2 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { isEmpty } from "radash";
|
|
2
|
+
import type { CnfContext } from "../../capabilities/core/src/system/cnfContext/CnfContext";
|
|
3
|
+
import type {
|
|
4
|
+
PartnerOverride,
|
|
5
|
+
ProductTypeDefinition,
|
|
6
|
+
} from "../../capabilities/offer-catalog/src";
|
|
7
|
+
import {
|
|
8
|
+
addClientTagsToOfferLinks,
|
|
9
|
+
getOffersByProductTypes,
|
|
10
|
+
selectDynamicOffers,
|
|
11
|
+
type Layout,
|
|
12
|
+
} from "../utils";
|
|
13
|
+
import type {
|
|
14
|
+
GetProductTypesProps,
|
|
15
|
+
ProductTypesResult,
|
|
16
|
+
} from "./getProductTypes";
|
|
17
|
+
import { sortOffersByRecommendationScore } from "../utils/sortOffersByRecommendationScore";
|
|
18
|
+
import { pipe } from "effect";
|
|
19
|
+
import { formatOfferUrl } from "../utils/formatOfferUrl";
|
|
20
|
+
import { getOffersBasedOnLayout } from "../utils/getOffersBasedOnLayout";
|
|
21
|
+
|
|
22
|
+
export type GetDynamicOffersProps = {
|
|
23
|
+
tags: string;
|
|
24
|
+
displayLayout: Layout;
|
|
25
|
+
productTypes: string[];
|
|
26
|
+
resultType: ProductTypesResult["resultType"];
|
|
27
|
+
enableUseCachedOffers: boolean;
|
|
28
|
+
productTypesDefinition: ProductTypeDefinition[];
|
|
29
|
+
partnersOverrideDefinition: PartnerOverride[];
|
|
30
|
+
context: CnfContext;
|
|
31
|
+
} & Omit<
|
|
32
|
+
GetProductTypesProps,
|
|
33
|
+
| "context"
|
|
34
|
+
| "productTypeOrUrl"
|
|
35
|
+
| "query"
|
|
36
|
+
| "isDevMode"
|
|
37
|
+
| "referrer"
|
|
38
|
+
| "searchAPIToken"
|
|
39
|
+
>;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Retrieves dynamic offers based on the provided parameters.
|
|
43
|
+
*
|
|
44
|
+
* @param {GetDynamicOffersProps} params - The parameters for retrieving dynamic offers.
|
|
45
|
+
* @returns {Promise<{ productTypeDisplayName: string; offers: typeof offers }>} An object containing the product type display name and the offers.
|
|
46
|
+
*/
|
|
47
|
+
export const getDynamicOffers = async ({
|
|
48
|
+
tags,
|
|
49
|
+
displayLayout,
|
|
50
|
+
defaultProductType,
|
|
51
|
+
productTypes,
|
|
52
|
+
resultType,
|
|
53
|
+
enableUseCachedOffers,
|
|
54
|
+
productTypesDefinition,
|
|
55
|
+
partnersOverrideDefinition,
|
|
56
|
+
context,
|
|
57
|
+
}: Omit<GetDynamicOffersProps, "isDev">) => {
|
|
58
|
+
// Get the initial offers
|
|
59
|
+
const initialOffersData = await getOffersByProductTypes({
|
|
60
|
+
enableUseCachedOffers,
|
|
61
|
+
productTypes,
|
|
62
|
+
tags,
|
|
63
|
+
context,
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
// If no initial offers are returned, get offers for the default product type
|
|
67
|
+
// if initial offers are returned, return them
|
|
68
|
+
const offersData = isEmpty(initialOffersData?.offers)
|
|
69
|
+
? await getOffersByProductTypes({
|
|
70
|
+
enableUseCachedOffers,
|
|
71
|
+
productTypes: [defaultProductType],
|
|
72
|
+
tags,
|
|
73
|
+
context,
|
|
74
|
+
})
|
|
75
|
+
: initialOffersData;
|
|
76
|
+
|
|
77
|
+
const sortedOffers =
|
|
78
|
+
resultType === "QUERY"
|
|
79
|
+
? selectDynamicOffers(offersData.offers, productTypes)
|
|
80
|
+
: sortOffersByRecommendationScore(offersData.offers);
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
offers: pipe(
|
|
84
|
+
sortedOffers,
|
|
85
|
+
formatOfferUrl(productTypesDefinition, partnersOverrideDefinition),
|
|
86
|
+
addClientTagsToOfferLinks(enableUseCachedOffers, tags),
|
|
87
|
+
getOffersBasedOnLayout(displayLayout)
|
|
88
|
+
),
|
|
89
|
+
isError: offersData.isError,
|
|
90
|
+
leadUuid: offersData.leadUuid,
|
|
91
|
+
rateTableUuid: offersData.uuid,
|
|
92
|
+
};
|
|
93
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { getProductTypesByQuery } from "./getProductTypesByQuery";
|
|
2
|
+
|
|
3
|
+
export type GetProductTypesProps = {
|
|
4
|
+
productType?: string;
|
|
5
|
+
query?: string;
|
|
6
|
+
defaultProductType: string;
|
|
7
|
+
searchAPIToken: string;
|
|
8
|
+
isDev: boolean;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export type ResultType = "STATIC" | "QUERY" | "PRODUCT_TYPE" | "DEFAULT";
|
|
12
|
+
|
|
13
|
+
export type ProductTypesResult = {
|
|
14
|
+
productTypes: string[];
|
|
15
|
+
resultType: ResultType;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const parseProductTypes = (query: string): string[] => {
|
|
19
|
+
return query.includes(",")
|
|
20
|
+
? query.split(",").map((productType) => productType.trim())
|
|
21
|
+
: [query];
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Get the product types
|
|
26
|
+
* @param props - The properties to get the product types
|
|
27
|
+
* @returns The product types
|
|
28
|
+
*/
|
|
29
|
+
export const getProductTypes = async ({
|
|
30
|
+
productType,
|
|
31
|
+
defaultProductType,
|
|
32
|
+
query,
|
|
33
|
+
searchAPIToken,
|
|
34
|
+
isDev,
|
|
35
|
+
}: GetProductTypesProps): Promise<ProductTypesResult> => {
|
|
36
|
+
if (query && query.trim().length > 0) {
|
|
37
|
+
const productTypes = await getProductTypesByQuery({
|
|
38
|
+
query,
|
|
39
|
+
searchAPIToken,
|
|
40
|
+
isDev,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
return { productTypes, resultType: "QUERY" };
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// TODO: Check if need to add support for productType as enf app
|
|
47
|
+
if (productType && productType.trim().length > 0) {
|
|
48
|
+
const productTypes = await parseProductTypes(productType);
|
|
49
|
+
return { productTypes, resultType: "PRODUCT_TYPE" };
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return { productTypes: [defaultProductType], resultType: "DEFAULT" };
|
|
53
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { pipe } from "effect";
|
|
2
|
+
import { orderProductTypesByRank } from "../../capabilities/core/src/domain/third-party-search";
|
|
3
|
+
import { getEwsSearchApiBaseUrl } from "../apiEnvironment";
|
|
4
|
+
|
|
5
|
+
type GetProductTypesByQueryProps = {
|
|
6
|
+
query: string;
|
|
7
|
+
searchAPIToken: string;
|
|
8
|
+
isDev: boolean;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Get product types by query
|
|
13
|
+
* @param query {string} - The query to get the product types for
|
|
14
|
+
* @param context The context to get the product types from
|
|
15
|
+
* @returns {Promise<string[]>} The product types
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const productTypes = await getProductTypesByQuery('best credit cards', {
|
|
20
|
+
* cnfEnv: {
|
|
21
|
+
* THIRD_PARTY_SEARCH_API_URL: 'https://api.third-party-search.com',
|
|
22
|
+
* THIRD_PARTY_SEARCH_API_TOKEN: 'your-token',
|
|
23
|
+
* },
|
|
24
|
+
* thirdPartySearchApiClient: makeThirdPartySearchApiClient,
|
|
25
|
+
* })
|
|
26
|
+
* // productTypes = ['credit-card', 'loan', 'insurance']
|
|
27
|
+
* or
|
|
28
|
+
* // productTypes = []
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
export const getProductTypesByQuery = async ({
|
|
33
|
+
query,
|
|
34
|
+
searchAPIToken,
|
|
35
|
+
isDev,
|
|
36
|
+
}: GetProductTypesByQueryProps) => {
|
|
37
|
+
const url = `${getEwsSearchApiBaseUrl(isDev)}/search/product-types?query=${encodeURIComponent(query)}`;
|
|
38
|
+
const headers = {
|
|
39
|
+
Authorization: `Bearer ${searchAPIToken}`,
|
|
40
|
+
};
|
|
41
|
+
try {
|
|
42
|
+
const response = await fetch(url, { headers });
|
|
43
|
+
if (!response.ok) {
|
|
44
|
+
throw new Error();
|
|
45
|
+
}
|
|
46
|
+
const productTypes = await response.json();
|
|
47
|
+
|
|
48
|
+
return pipe(productTypes, orderProductTypesByRank);
|
|
49
|
+
} catch (error) {
|
|
50
|
+
console.error("Error fetching ProductTypesByQuery", JSON.stringify(error));
|
|
51
|
+
return [];
|
|
52
|
+
}
|
|
53
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { BaseOffer } from "../../capabilities/offer-catalog/src";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Add client tags to offer links
|
|
5
|
+
* @param enableUseCachedOffers - Whether to use cached offers
|
|
6
|
+
* @param clientTags - The client tags
|
|
7
|
+
* @returns The offers with the client tags added to the links
|
|
8
|
+
*/
|
|
9
|
+
export const addClientTagsToOfferLinks =
|
|
10
|
+
(enableUseCachedOffers: boolean, clientTags: string) =>
|
|
11
|
+
(offers: BaseOffer[]): BaseOffer[] => {
|
|
12
|
+
if (!enableUseCachedOffers) {
|
|
13
|
+
return offers;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return offers.map((offer) => {
|
|
17
|
+
return {
|
|
18
|
+
...offer,
|
|
19
|
+
url: `${offer.url}?${clientTags}`,
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getOfferUrl,
|
|
3
|
+
type BaseOffer,
|
|
4
|
+
type PartnerOverride,
|
|
5
|
+
type ProductTypeDefinition,
|
|
6
|
+
} from "../../capabilities/offer-catalog/src";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Format the offer URL
|
|
10
|
+
* @param offers - The offers to format if needed
|
|
11
|
+
* @returns The offers with the formatted URL
|
|
12
|
+
*/
|
|
13
|
+
export const formatOfferUrl =
|
|
14
|
+
(
|
|
15
|
+
productTypesDefinition: ProductTypeDefinition[],
|
|
16
|
+
partnersOverrideDefinition: PartnerOverride[]
|
|
17
|
+
) =>
|
|
18
|
+
(offers: BaseOffer[]) => {
|
|
19
|
+
return offers.map((offer) => {
|
|
20
|
+
const { url, overrideUrl } = getOfferUrl({
|
|
21
|
+
offer,
|
|
22
|
+
productTypesDefinition,
|
|
23
|
+
partnersOverrideDefinition,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
...offer,
|
|
28
|
+
url,
|
|
29
|
+
overrideUrl,
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Colors } from "../components/Button";
|
|
2
|
+
|
|
3
|
+
export const getDefaultPaletteColor = (colorKey: Colors): string => {
|
|
4
|
+
const defaultColors: Partial<Record<Colors, string>> = {
|
|
5
|
+
positive: "#00E5C4",
|
|
6
|
+
// promotional: "#FFD700",
|
|
7
|
+
// generation: "#4CAF50",
|
|
8
|
+
// colorScheme: "#9E9E9E",
|
|
9
|
+
// critical: "#FF0000",
|
|
10
|
+
// highlight: "#FFA500",
|
|
11
|
+
// neutral: "#808080",
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
return defaultColors[colorKey] ?? "#000000"; // subject to change
|
|
15
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CnfContext } from "../../capabilities/core/src/system/cnfContext/CnfContext";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Get enabled cache offers request
|
|
5
|
+
*
|
|
6
|
+
* @param {DynamicOffersContext} cnfContext - The context object
|
|
7
|
+
* @returns {boolean} - The enabled cache offers request
|
|
8
|
+
*
|
|
9
|
+
* @description
|
|
10
|
+
* This function is used to get the enabled cache offers request from payload cms configuration
|
|
11
|
+
*/
|
|
12
|
+
export const getEnableUseCachedOffers = (context: CnfContext) =>
|
|
13
|
+
context.configuration.configuration?.enableUseCachedOffers;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { pipe } from "effect";
|
|
2
|
+
import type { Layout } from "./layouts";
|
|
3
|
+
import { sortOffersByRecommendationScore } from "./sortOffersByRecommendationScore";
|
|
4
|
+
import type { BaseOffer } from "../../capabilities/offer-catalog/src";
|
|
5
|
+
|
|
6
|
+
const MAX_OFFERS_TO_DISPLAY = 3;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Sorts the offers based on the layout.
|
|
10
|
+
*
|
|
11
|
+
* @param offers - The offers to sort.
|
|
12
|
+
* @returns The sorted offers.
|
|
13
|
+
*/
|
|
14
|
+
export const sortFixedOffers = (offers: BaseOffer[]): BaseOffer[] => {
|
|
15
|
+
const resultOffers = Array.from(
|
|
16
|
+
{
|
|
17
|
+
length:
|
|
18
|
+
offers.length >= MAX_OFFERS_TO_DISPLAY
|
|
19
|
+
? MAX_OFFERS_TO_DISPLAY
|
|
20
|
+
: offers.length,
|
|
21
|
+
},
|
|
22
|
+
(_, index) => offers[index % offers.length]
|
|
23
|
+
).filter((offer): offer is BaseOffer => offer !== undefined);
|
|
24
|
+
|
|
25
|
+
return resultOffers;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Gets the offers based on the layout.
|
|
30
|
+
*
|
|
31
|
+
* @param layout - The layout to get the offers for.
|
|
32
|
+
* @param offers - The offers to get.
|
|
33
|
+
* @returns The offers.
|
|
34
|
+
*/
|
|
35
|
+
export const getOffersByLayout = (layout: Layout) => (offers: BaseOffer[]) => {
|
|
36
|
+
return layout === "carousel"
|
|
37
|
+
? sortOffersByRecommendationScore(offers)
|
|
38
|
+
: sortFixedOffers(offers);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Gets the offers based on the layout.
|
|
43
|
+
*
|
|
44
|
+
* @param layout - The layout to get the offers for.
|
|
45
|
+
* @param offers - The offers to get.
|
|
46
|
+
* @returns The offers.
|
|
47
|
+
*/
|
|
48
|
+
export const getOffersBasedOnLayout =
|
|
49
|
+
(layout: Layout) => (offers: BaseOffer[]) => {
|
|
50
|
+
return pipe(offers, getOffersByLayout(layout));
|
|
51
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { CnfContext } from "../../capabilities/core/src/system/cnfContext/CnfContext";
|
|
2
|
+
import {
|
|
3
|
+
getCachedOffersByProductTypes,
|
|
4
|
+
getOffersForProductTypes,
|
|
5
|
+
} from "../../capabilities/offer-catalog/src/api/offerCatalogApi";
|
|
6
|
+
import { parseClientTags } from "../../capabilities/offer-catalog/src/utils/contextUtil";
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves offers by product types.
|
|
9
|
+
*
|
|
10
|
+
* @param {Object} params - The parameters for retrieving offers by product types.
|
|
11
|
+
* @param {boolean} params.enableUseCachedOffers - Indicates if the offers should be retrieved from the cache.
|
|
12
|
+
* @param {string[]} params.productTypes - The product types to retrieve offers for.
|
|
13
|
+
* @param {string} params.tags - The tags to use for retrieving offers.
|
|
14
|
+
* @returns {Promise<OffersData>} A promise that resolves to an array of offers or undefined if no offers are found.
|
|
15
|
+
*/
|
|
16
|
+
export const getOffersByProductTypes = async ({
|
|
17
|
+
enableUseCachedOffers,
|
|
18
|
+
productTypes,
|
|
19
|
+
tags,
|
|
20
|
+
context,
|
|
21
|
+
}: {
|
|
22
|
+
enableUseCachedOffers: boolean;
|
|
23
|
+
productTypes: string[];
|
|
24
|
+
tags: string;
|
|
25
|
+
context: CnfContext;
|
|
26
|
+
}) => {
|
|
27
|
+
// TODO it should be just enableUseCachedOffers and not !enableUseCachedOffers
|
|
28
|
+
if (enableUseCachedOffers) {
|
|
29
|
+
return await getCachedOffersByProductTypes(context)(productTypes);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return await getOffersForProductTypes(context)(
|
|
33
|
+
productTypes,
|
|
34
|
+
parseClientTags(tags)
|
|
35
|
+
);
|
|
36
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CnfContext } from "../../capabilities/core/src/system/cnfContext/CnfContext";
|
|
2
|
+
|
|
3
|
+
export const getProductTypesDefinition = (context: CnfContext) => {
|
|
4
|
+
const offersConfig = context.configuration.configuration;
|
|
5
|
+
|
|
6
|
+
const productTypesDefinition = offersConfig?.productTypesDefinition;
|
|
7
|
+
const partnersOverrideDefinition = offersConfig?.partnersOverrideDefinition;
|
|
8
|
+
|
|
9
|
+
return {
|
|
10
|
+
productTypesDefinition,
|
|
11
|
+
partnersOverrideDefinition,
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./addClientTagsToOfferLinks";
|
|
2
|
+
export * from "./getDefaultProductType";
|
|
3
|
+
export * from "./getOffersByProductTypes";
|
|
4
|
+
export * from "./getProductTypesDefinition";
|
|
5
|
+
export * from "./layouts";
|
|
6
|
+
export * from "./resolveProductTypes";
|
|
7
|
+
export * from "./selectDynamicOffers";
|
|
8
|
+
export * from "./sortOffersByRecommendationScore";
|
|
9
|
+
export * from "./parseStringProductTypes";
|
|
10
|
+
export * from "./getEnableUseCachedOffers";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const layouts = {
|
|
2
|
+
carousel: "carousel",
|
|
3
|
+
fixed: "fixed",
|
|
4
|
+
} as const;
|
|
5
|
+
|
|
6
|
+
export type Layout = keyof typeof layouts;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Get layout based on the provided layout
|
|
10
|
+
* @param layout {string | null} layout
|
|
11
|
+
* @returns {Layout} layout or default layout
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* getLayout('fixed') // 'fixed'
|
|
15
|
+
* getLayout('invalidLayout') // 'carousel'
|
|
16
|
+
* getLayout(null) // 'carousel'
|
|
17
|
+
* getLayout('') // 'carousel'
|
|
18
|
+
* getLayout('carousel') // 'carousel'
|
|
19
|
+
*/
|
|
20
|
+
export const getLayout = (layout?: string): Layout => {
|
|
21
|
+
return layouts[layout as Layout] ?? layouts.carousel;
|
|
22
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { getProductTypes, type ResultType } from "../services/getProductTypes";
|
|
2
|
+
|
|
3
|
+
type ResolveProductTypesProps = {
|
|
4
|
+
productType?: string;
|
|
5
|
+
query?: string;
|
|
6
|
+
defaultProductType: string;
|
|
7
|
+
searchAPIToken: string;
|
|
8
|
+
isDev: boolean;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const resolveProductTypes = async (
|
|
12
|
+
props: ResolveProductTypesProps
|
|
13
|
+
): Promise<{
|
|
14
|
+
productTypes: string[];
|
|
15
|
+
resultType: ResultType;
|
|
16
|
+
}> => {
|
|
17
|
+
return await getProductTypes(props);
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BaseOffer } from "../../capabilities/offer-catalog/src";
|
|
2
|
+
import { sortOffersByRecommendationScore } from "./sortOffersByRecommendationScore";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export const selectDynamicOffers = (
|
|
6
|
+
offers: BaseOffer[],
|
|
7
|
+
productTypes: string[]
|
|
8
|
+
) => {
|
|
9
|
+
const resultOffers = productTypes
|
|
10
|
+
.flatMap((productType) =>
|
|
11
|
+
sortOffersByRecommendationScore(
|
|
12
|
+
offers.filter((offer) => offer.productType === productType)
|
|
13
|
+
)
|
|
14
|
+
)
|
|
15
|
+
.slice(0, 10) as BaseOffer[];
|
|
16
|
+
|
|
17
|
+
return resultOffers;
|
|
18
|
+
};
|
package/src/version.ts
ADDED