@moneylion/react-native-offer-carousel 1.0.0 → 1.0.1
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 +44 -0
- package/lib/commonjs/capabilities/configuration/src/brands/checkVisualEligibility.js +30 -0
- package/lib/commonjs/capabilities/configuration/src/brands/checkVisualEligibility.js.map +1 -0
- package/lib/commonjs/capabilities/configuration/src/brands/createDerivedBrands.js +40 -0
- package/lib/commonjs/capabilities/configuration/src/brands/createDerivedBrands.js.map +1 -0
- package/lib/commonjs/capabilities/configuration/src/brands/index.js +20 -0
- package/lib/commonjs/capabilities/configuration/src/brands/index.js.map +1 -0
- package/lib/commonjs/capabilities/configuration/src/brands/types.js +13 -0
- package/lib/commonjs/capabilities/configuration/src/brands/types.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/domain/third-party-search/index.js +17 -0
- package/lib/commonjs/capabilities/core/src/domain/third-party-search/index.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js +33 -0
- package/lib/commonjs/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/index.js +17 -0
- package/lib/commonjs/capabilities/core/src/index.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/CnfContext.js +18 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/CnfContext.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/App.js +18 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/App.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Brand.js +87 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Brand.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Configuration.js +41 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Configuration.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Request.js +21 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Request.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Session.js +12 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Session.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Signals.js +41 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Signals.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Subaccount.js +26 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Subaccount.js.map +1 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/index.js +83 -0
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/index.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/api/offerCatalogApi.js +131 -0
- package/lib/commonjs/capabilities/offer-catalog/src/api/offerCatalogApi.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/index.js +65 -0
- package/lib/commonjs/capabilities/offer-catalog/src/index.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/types/offerCatalogSchema.js +2 -0
- package/lib/commonjs/capabilities/offer-catalog/src/types/offerCatalogSchema.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/arrayToMarkdownList.js +11 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/arrayToMarkdownList.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/contextUtil.js +70 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/contextUtil.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/errorUtil.js +21 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/errorUtil.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/formatUtils.js +161 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/formatUtils.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/getOfferUrl.js +44 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/getOfferUrl.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.js +78 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/boolean.js +22 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/boolean.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.js +60 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/common.js +20 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/common.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.js +62 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.js +32 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.js +31 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currency.js +22 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currency.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.js +46 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.js +208 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.js +20 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.js +24 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.js +21 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.js +40 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/index.js +204 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/index.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.js +35 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.js +43 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/percentage.js +21 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/percentage.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.js +32 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.js +76 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.js +69 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.js +23 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.js +47 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.js +72 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.js +23 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.js +29 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.js +53 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.js +46 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.js +26 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.js +83 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.js +28 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.js +28 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.js +21 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.js +30 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/index.js +48 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/index.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/types.js +6 -0
- package/lib/commonjs/capabilities/offer-catalog/src/utils/stats/types.js.map +1 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.js +6 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.js.map +1 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.js +2 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.js.map +1 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/types/PublicApi.d.js +2 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/types/PublicApi.d.js.map +1 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/types/index.js +6 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/types/index.js.map +1 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.js +74 -0
- package/lib/commonjs/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.js +61 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/components.js +143 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/components.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/index.js +54 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/index.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.js +122 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/index.js +13 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/index.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/index.js +110 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/index.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.js +91 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.js +44 -0
- package/lib/commonjs/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/index.js +28 -0
- package/lib/commonjs/capabilities/ui/elements/src/index.js.map +1 -0
- package/lib/commonjs/capabilities/ui/elements/src/offerCardAttributes.js +23 -0
- package/lib/commonjs/capabilities/ui/elements/src/offerCardAttributes.js.map +1 -0
- package/lib/commonjs/components/Cards/VideosCard/VideosCard.js +1 -1
- package/lib/commonjs/components/Common/BaseOfferCard/Stat/Stat.js +1 -1
- package/lib/commonjs/components/Common/BaseOfferCard/Stat/Stat.js.map +1 -1
- package/lib/commonjs/components/Common/BaseOfferCard/index.js +4 -4
- package/lib/commonjs/components/Common/BaseOfferCard/index.js.map +1 -1
- package/lib/commonjs/components/Layouts/CreditCardOfferCard/statsBuilder.js +1 -1
- package/lib/commonjs/components/Layouts/DefaultOfferCard/statsBuilder.js +1 -1
- package/lib/commonjs/components/Modal/DescriptionPoints.js +3 -3
- package/lib/commonjs/components/Modal/DescriptionPoints.js.map +1 -1
- package/lib/commonjs/components/Modal/Disclaimer.js +1 -1
- package/lib/commonjs/components/Modal/Disclaimer.js.map +1 -1
- package/lib/commonjs/components/MoneyLionOfferCarousel.js +1 -1
- package/lib/commonjs/config/mocks/cnfContext.js +143 -0
- package/lib/commonjs/config/mocks/cnfContext.js.map +1 -0
- package/lib/commonjs/pageData.js +1 -1
- package/lib/commonjs/services/getProductTypesByQuery.js +1 -1
- package/lib/commonjs/utils/formatOfferUrl.js +1 -1
- package/lib/commonjs/utils/getOffersByProductTypes.js +2 -2
- package/lib/module/capabilities/configuration/src/brands/checkVisualEligibility.js +24 -0
- package/lib/module/capabilities/configuration/src/brands/checkVisualEligibility.js.map +1 -0
- package/lib/module/capabilities/configuration/src/brands/createDerivedBrands.js +34 -0
- package/lib/module/capabilities/configuration/src/brands/createDerivedBrands.js.map +1 -0
- package/lib/module/capabilities/configuration/src/brands/index.js +3 -0
- package/lib/module/capabilities/configuration/src/brands/index.js.map +1 -0
- package/lib/module/capabilities/configuration/src/brands/types.js +6 -0
- package/lib/module/capabilities/configuration/src/brands/types.js.map +1 -0
- package/lib/module/capabilities/core/src/domain/third-party-search/index.js +2 -0
- package/lib/module/capabilities/core/src/domain/third-party-search/index.js.map +1 -0
- package/lib/module/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js +26 -0
- package/lib/module/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js.map +1 -0
- package/lib/module/capabilities/core/src/index.js +2 -0
- package/lib/module/capabilities/core/src/index.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/CnfContext.js +12 -0
- package/lib/module/capabilities/core/src/system/cnfContext/CnfContext.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/App.js +12 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/App.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Brand.js +81 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Brand.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Configuration.js +35 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Configuration.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Request.js +15 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Request.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Session.js +6 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Session.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Signals.js +35 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Signals.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Subaccount.js +20 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Subaccount.js.map +1 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/index.js +8 -0
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/index.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/api/offerCatalogApi.js +122 -0
- package/lib/module/capabilities/offer-catalog/src/api/offerCatalogApi.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/index.js +5 -0
- package/lib/module/capabilities/offer-catalog/src/index.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/types/offerCatalogSchema.js +2 -0
- package/lib/module/capabilities/offer-catalog/src/types/offerCatalogSchema.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/arrayToMarkdownList.js +4 -0
- package/lib/module/capabilities/offer-catalog/src/utils/arrayToMarkdownList.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/contextUtil.js +58 -0
- package/lib/module/capabilities/offer-catalog/src/utils/contextUtil.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/errorUtil.js +15 -0
- package/lib/module/capabilities/offer-catalog/src/utils/errorUtil.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/formatUtils.js +151 -0
- package/lib/module/capabilities/offer-catalog/src/utils/formatUtils.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/getOfferUrl.js +37 -0
- package/lib/module/capabilities/offer-catalog/src/utils/getOfferUrl.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.js +71 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/boolean.js +15 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/boolean.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.js +59 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/common.js +13 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/common.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.js +61 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.js +25 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.js +30 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currency.js +15 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currency.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.js +39 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.js +207 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.js +13 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.js +23 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.js +14 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.js +39 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/index.js +20 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/index.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.js +28 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.js +42 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/percentage.js +14 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/percentage.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.js +31 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.js +69 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.js +68 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.js +16 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.js +40 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.js +71 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.js +16 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.js +28 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.js +46 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.js +45 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.js +19 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.js +82 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.js +21 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.js +27 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.js +14 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.js +29 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/index.js +41 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/index.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/types.js +2 -0
- package/lib/module/capabilities/offer-catalog/src/utils/stats/types.js.map +1 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.js +2 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.js.map +1 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.js +2 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.js.map +1 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/types/PublicApi.d.js +2 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/types/PublicApi.d.js.map +1 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/types/index.js +2 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/types/index.js.map +1 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.js +65 -0
- package/lib/module/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.js +50 -0
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/components.js +134 -0
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/components.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/index.js +46 -0
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/index.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.js +115 -0
- package/lib/module/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/components/index.js +2 -0
- package/lib/module/capabilities/ui/elements/src/components/index.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/components/thumbor/index.js +103 -0
- package/lib/module/capabilities/ui/elements/src/components/thumbor/index.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.js +86 -0
- package/lib/module/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.js +43 -0
- package/lib/module/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/index.js +3 -0
- package/lib/module/capabilities/ui/elements/src/index.js.map +1 -0
- package/lib/module/capabilities/ui/elements/src/offerCardAttributes.js +16 -0
- package/lib/module/capabilities/ui/elements/src/offerCardAttributes.js.map +1 -0
- package/lib/module/components/Cards/VideosCard/VideosCard.js +1 -1
- package/lib/module/components/Common/BaseOfferCard/Stat/Stat.js +1 -2
- package/lib/module/components/Common/BaseOfferCard/Stat/Stat.js.map +1 -1
- package/lib/module/components/Common/BaseOfferCard/index.js +3 -4
- package/lib/module/components/Common/BaseOfferCard/index.js.map +1 -1
- package/lib/module/components/Layouts/CreditCardOfferCard/statsBuilder.js +1 -1
- package/lib/module/components/Layouts/CreditCardOfferCard/statsBuilder.js.map +1 -1
- package/lib/module/components/Layouts/DefaultOfferCard/statsBuilder.js +1 -1
- package/lib/module/components/Layouts/DefaultOfferCard/statsBuilder.js.map +1 -1
- package/lib/module/components/Modal/DescriptionPoints.js +2 -2
- package/lib/module/components/Modal/DescriptionPoints.js.map +1 -1
- package/lib/module/components/Modal/Disclaimer.js +1 -1
- package/lib/module/components/Modal/Disclaimer.js.map +1 -1
- package/lib/module/components/MoneyLionOfferCarousel.js +1 -1
- package/lib/module/components/MoneyLionOfferCarousel.js.map +1 -1
- package/lib/module/config/mocks/cnfContext.js +137 -0
- package/lib/module/config/mocks/cnfContext.js.map +1 -0
- package/lib/module/pageData.js +1 -1
- package/lib/module/pageData.js.map +1 -1
- package/lib/module/services/getProductTypesByQuery.js +1 -1
- package/lib/module/services/getProductTypesByQuery.js.map +1 -1
- package/lib/module/utils/formatOfferUrl.js +1 -1
- package/lib/module/utils/formatOfferUrl.js.map +1 -1
- package/lib/module/utils/getOffersByProductTypes.js +2 -2
- package/lib/module/utils/getOffersByProductTypes.js.map +1 -1
- package/lib/typescript/builder/builder.d.ts +2 -2
- package/lib/typescript/builder/builder.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/configuration/src/brands/checkVisualEligibility.d.ts.map +1 -0
- package/lib/typescript/{capabilities → src/capabilities}/configuration/src/brands/createDerivedBrands.d.ts +1 -1
- package/lib/typescript/src/capabilities/configuration/src/brands/createDerivedBrands.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/configuration/src/brands/index.d.ts.map +1 -0
- package/lib/typescript/{capabilities → src/capabilities}/configuration/src/brands/types.d.ts +1 -1
- package/lib/typescript/src/capabilities/configuration/src/brands/types.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/domain/third-party-search/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/CnfContext.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/App.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Brand.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Configuration.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Request.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Session.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Signals.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Subaccount.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/api/offerCatalogApi.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/types/offerCatalogSchema.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/arrayToMarkdownList.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/contextUtil.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/errorUtil.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/formatUtils.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/getOfferUrl.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/boolean.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/common.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/currency.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/percentage.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/stats/types.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offers/pipeline/src/sources/ratetables/types/index.d.ts.map +1 -0
- package/lib/typescript/{capabilities → src/capabilities}/offers/pipeline/src/sources/ratetables/withDeviceSignals.d.ts +9 -9
- package/lib/typescript/src/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.d.ts.map +1 -0
- package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/MarkdownText/components.d.ts +1 -1
- package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/components.d.ts.map +1 -0
- package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/MarkdownText/index.d.ts +1 -1
- package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/ui/elements/src/components/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/ui/elements/src/components/thumbor/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/ui/elements/src/index.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/ui/elements/src/offerCardAttributes.d.ts.map +1 -0
- package/lib/typescript/src/components/Common/BaseOfferCard/Stat/Stat.d.ts +5 -1
- package/lib/typescript/src/components/Common/BaseOfferCard/Stat/Stat.d.ts.map +1 -1
- package/lib/typescript/src/components/Common/BaseOfferCard/index.d.ts +2 -2
- package/lib/typescript/src/components/Common/BaseOfferCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Common/DynamicOfferCard/CallToAction.d.ts +1 -1
- package/lib/typescript/src/components/Common/DynamicOfferCard/CallToAction.d.ts.map +1 -1
- package/lib/typescript/src/components/Common/DynamicOfferCard/SeeMore.d.ts +1 -1
- package/lib/typescript/src/components/Common/DynamicOfferCard/SeeMore.d.ts.map +1 -1
- package/lib/typescript/src/components/Common/DynamicOfferCard/index.d.ts +1 -1
- package/lib/typescript/src/components/Common/DynamicOfferCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/DynamicOffers/Render/DynamicOffersRender.d.ts +1 -1
- package/lib/typescript/src/components/DynamicOffers/Render/DynamicOffersRender.d.ts.map +1 -1
- package/lib/typescript/src/components/DynamicOffers/Render/FallbackOfferTemplate.d.ts +1 -1
- package/lib/typescript/src/components/DynamicOffers/Render/FallbackOfferTemplate.d.ts.map +1 -1
- package/lib/typescript/src/components/DynamicOffers/Render/Offer.d.ts +1 -1
- package/lib/typescript/src/components/DynamicOffers/Render/Offer.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/index.d.ts +1 -1
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/statsBuilder.d.ts +2 -2
- package/lib/typescript/src/components/Layouts/CreditCardOfferCard/statsBuilder.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/index.d.ts +1 -1
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/statsBuilder.d.ts +3 -3
- package/lib/typescript/src/components/Layouts/DefaultOfferCard/statsBuilder.d.ts.map +1 -1
- package/lib/typescript/src/components/Layouts/HeadlineWithDescriptionCard/index.d.ts +1 -1
- package/lib/typescript/src/components/Layouts/HeadlineWithDescriptionCard/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Modal/OfferDetailsModal.d.ts +1 -1
- package/lib/typescript/src/components/Modal/OfferDetailsModal.d.ts.map +1 -1
- package/lib/typescript/src/config/mocks/cnfContext.d.ts.map +1 -0
- package/lib/typescript/src/context/EventHandlerProvider.d.ts +1 -1
- package/lib/typescript/src/context/EventHandlerProvider.d.ts.map +1 -1
- package/lib/typescript/src/pageData.d.ts +2 -2
- package/lib/typescript/src/pageData.d.ts.map +1 -1
- package/lib/typescript/src/services/getDynamicOffers.d.ts +3 -3
- package/lib/typescript/src/services/getDynamicOffers.d.ts.map +1 -1
- package/lib/typescript/src/utils/addClientTagsToOfferLinks.d.ts +1 -1
- package/lib/typescript/src/utils/addClientTagsToOfferLinks.d.ts.map +1 -1
- package/lib/typescript/src/utils/formatOfferUrl.d.ts +1 -1
- package/lib/typescript/src/utils/formatOfferUrl.d.ts.map +1 -1
- package/lib/typescript/src/utils/getDefaultProductType.d.ts +1 -1
- package/lib/typescript/src/utils/getDefaultProductType.d.ts.map +1 -1
- package/lib/typescript/src/utils/getEnableUseCachedOffers.d.ts +1 -1
- package/lib/typescript/src/utils/getEnableUseCachedOffers.d.ts.map +1 -1
- package/lib/typescript/src/utils/getOffersBasedOnLayout.d.ts +1 -1
- package/lib/typescript/src/utils/getOffersBasedOnLayout.d.ts.map +1 -1
- package/lib/typescript/src/utils/getOffersByProductTypes.d.ts +2 -2
- package/lib/typescript/src/utils/getOffersByProductTypes.d.ts.map +1 -1
- package/lib/typescript/src/utils/getProductTypesDefinition.d.ts +1 -1
- package/lib/typescript/src/utils/getProductTypesDefinition.d.ts.map +1 -1
- package/lib/typescript/src/utils/selectDynamicOffers.d.ts +1 -1
- package/lib/typescript/src/utils/selectDynamicOffers.d.ts.map +1 -1
- package/lib/typescript/src/utils/sortOffersByRecommendationScore.d.ts +1 -1
- package/lib/typescript/src/utils/sortOffersByRecommendationScore.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/capabilities/configuration/src/brands/checkVisualEligibility.ts +29 -0
- package/src/capabilities/configuration/src/brands/createDerivedBrands.ts +39 -0
- package/src/capabilities/configuration/src/brands/index.ts +2 -0
- package/src/capabilities/configuration/src/brands/types.ts +8 -0
- package/src/capabilities/core/src/domain/third-party-search/index.ts +1 -0
- package/src/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.ts +33 -0
- package/src/capabilities/core/src/index.ts +1 -0
- package/src/capabilities/core/src/system/cnfContext/CnfContext.ts +21 -0
- package/src/capabilities/core/src/system/cnfContext/schemas/App.ts +13 -0
- package/src/capabilities/core/src/system/cnfContext/schemas/Brand.ts +119 -0
- package/src/capabilities/core/src/system/cnfContext/schemas/Configuration.ts +49 -0
- package/src/capabilities/core/src/system/cnfContext/schemas/Request.ts +16 -0
- package/src/capabilities/core/src/system/cnfContext/schemas/Session.ts +9 -0
- package/src/capabilities/core/src/system/cnfContext/schemas/Signals.ts +47 -0
- package/src/capabilities/core/src/system/cnfContext/schemas/Subaccount.ts +25 -0
- package/src/capabilities/core/src/system/cnfContext/schemas/index.ts +7 -0
- package/src/capabilities/offer-catalog/src/api/offerCatalogApi.ts +171 -0
- package/src/capabilities/offer-catalog/src/index.ts +10 -0
- package/src/capabilities/offer-catalog/src/types/offerCatalogSchema.ts +119 -0
- package/src/capabilities/offer-catalog/src/utils/arrayToMarkdownList.ts +3 -0
- package/src/capabilities/offer-catalog/src/utils/contextUtil.ts +73 -0
- package/src/capabilities/offer-catalog/src/utils/errorUtil.ts +18 -0
- package/src/capabilities/offer-catalog/src/utils/formatUtils.ts +168 -0
- package/src/capabilities/offer-catalog/src/utils/getOfferUrl.ts +61 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.ts +103 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.ts +58 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/boolean.ts +31 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.ts +60 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/common.ts +31 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.ts +29 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.ts +36 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/currency.ts +24 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.ts +206 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.ts +83 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.ts +22 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.ts +25 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.ts +38 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.ts +24 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/index.ts +19 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.ts +41 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.ts +52 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.ts +30 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/percentage.ts +23 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.ts +67 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.ts +92 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.ts +34 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.ts +70 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.ts +71 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.ts +27 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.ts +38 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.ts +44 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.ts +68 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.ts +81 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.ts +38 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.ts +26 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.ts +45 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.ts +28 -0
- package/src/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.ts +23 -0
- package/src/capabilities/offer-catalog/src/utils/stats/index.ts +141 -0
- package/src/capabilities/offer-catalog/src/utils/stats/types.ts +47 -0
- package/src/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.ts +6 -0
- package/src/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.ts +2272 -0
- package/src/capabilities/offers/pipeline/src/sources/ratetables/types/PublicApi.d.ts +1924 -0
- package/src/capabilities/offers/pipeline/src/sources/ratetables/types/index.ts +5 -0
- package/src/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.ts +83 -0
- package/src/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.tsx +66 -0
- package/src/capabilities/ui/elements/src/components/MarkdownText/components.tsx +175 -0
- package/src/capabilities/ui/elements/src/components/MarkdownText/index.tsx +52 -0
- package/src/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.ts +124 -0
- package/src/capabilities/ui/elements/src/components/index.ts +1 -0
- package/src/capabilities/ui/elements/src/components/thumbor/index.tsx +115 -0
- package/src/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.ts +42 -0
- package/src/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.ts +110 -0
- package/src/capabilities/ui/elements/src/index.ts +3 -0
- package/src/capabilities/ui/elements/src/offerCardAttributes.ts +28 -0
- package/src/components/Cards/VideosCard/VideosCard.tsx +1 -1
- package/src/components/Common/BaseOfferCard/Stat/Stat.tsx +7 -2
- package/src/components/Common/BaseOfferCard/index.tsx +3 -4
- package/src/components/Common/DynamicOfferCard/CallToAction.tsx +1 -1
- package/src/components/Common/DynamicOfferCard/SeeMore.tsx +1 -1
- package/src/components/Common/DynamicOfferCard/index.tsx +1 -1
- package/src/components/DynamicOffers/Render/DynamicOffersRender.tsx +1 -1
- package/src/components/DynamicOffers/Render/FallbackOfferTemplate.tsx +1 -1
- package/src/components/DynamicOffers/Render/Offer.tsx +1 -1
- package/src/components/Layouts/CreditCardOfferCard/index.tsx +1 -1
- package/src/components/Layouts/CreditCardOfferCard/statsBuilder.tsx +2 -2
- package/src/components/Layouts/DefaultOfferCard/index.tsx +1 -1
- package/src/components/Layouts/DefaultOfferCard/statsBuilder.tsx +2 -2
- package/src/components/Layouts/HeadlineWithDescriptionCard/index.tsx +1 -1
- package/src/components/Modal/DescriptionPoints.tsx +2 -2
- package/src/components/Modal/Disclaimer.tsx +1 -1
- package/src/components/Modal/OfferDetailsModal.tsx +1 -1
- package/src/components/MoneyLionOfferCarousel.tsx +2 -2
- package/src/config/mocks/cnfContext.ts +136 -0
- package/src/context/EventHandlerProvider.tsx +1 -1
- package/src/pageData.ts +2 -2
- package/src/services/getDynamicOffers.ts +2 -2
- package/src/services/getProductTypesByQuery.ts +1 -1
- package/src/utils/addClientTagsToOfferLinks.ts +1 -1
- package/src/utils/formatOfferUrl.ts +1 -1
- package/src/utils/getDefaultProductType.ts +1 -1
- package/src/utils/getEnableUseCachedOffers.ts +1 -1
- package/src/utils/getOffersBasedOnLayout.ts +1 -1
- package/src/utils/getOffersByProductTypes.ts +3 -3
- package/src/utils/getProductTypesDefinition.ts +1 -1
- package/src/utils/selectDynamicOffers.ts +1 -1
- package/src/utils/sortOffersByRecommendationScore.ts +1 -1
- package/lib/typescript/capabilities/configuration/src/brands/checkVisualEligibility.d.ts.map +0 -1
- package/lib/typescript/capabilities/configuration/src/brands/createDerivedBrands.d.ts.map +0 -1
- package/lib/typescript/capabilities/configuration/src/brands/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/configuration/src/brands/types.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/domain/third-party-search/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/CnfContext.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/App.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Brand.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Configuration.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Request.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Session.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Signals.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/Subaccount.d.ts.map +0 -1
- package/lib/typescript/capabilities/core/src/system/cnfContext/schemas/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/api/offerCatalogApi.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/types/offerCatalogSchema.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/arrayToMarkdownList.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/contextUtil.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/errorUtil.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/formatUtils.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/getOfferUrl.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/annualFee.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/boolean.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/boolean.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/common.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/common.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/currency.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/percentage.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/percentage.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrency.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rangePercent.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/offer-catalog/src/utils/stats/types.d.ts.map +0 -1
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.d.ts.map +0 -1
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/types/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.d.ts.map +0 -1
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/HyphenIcon.d.ts +0 -7
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/HyphenIcon.d.ts.map +0 -1
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/Stat.d.ts +0 -12
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/Stat.d.ts.map +0 -1
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/index.d.ts +0 -2
- package/lib/typescript/capabilities/offers/ux/src/elements/Stat/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/Abbreviation.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/components.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/components/MarkdownText/markdownPreprocessor.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/components/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/components/thumbor/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/components/thumbor/useSvgUriViewBox.test.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/index.d.ts.map +0 -1
- package/lib/typescript/capabilities/ui/elements/src/offerCardAttributes.d.ts.map +0 -1
- package/lib/typescript/config/mocks/cnfContext.d.ts.map +0 -1
- /package/lib/typescript/{capabilities → src/capabilities}/configuration/src/brands/checkVisualEligibility.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/configuration/src/brands/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/domain/third-party-search/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/domain/third-party-search/orderProductTypesByRankUtils.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/CnfContext.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/App.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/Brand.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/Configuration.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/Request.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/Session.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/Signals.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/Subaccount.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/core/src/system/cnfContext/schemas/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/api/offerCatalogApi.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/types/offerCatalogSchema.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/arrayToMarkdownList.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/contextUtil.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/errorUtil.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/formatUtils.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/getOfferUrl.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/annualFee.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/boolean.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/boolean.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/common.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/common.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/creditBureaus.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/creditBureaus.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/currency.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/currencyOrBasis.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/currencyOrBasis.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/freeTrialDays.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/freeTrialDays.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/fromListStringWithAnd.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/monthlyOrAnnualCurrency.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/percentage.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/percentage.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/purchaseApr.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/purchaseApr.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeCurrency.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeCurrencyByTime.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeCurrencyUnabbreviated.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeMonths.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangeMonths.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangePercent.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rangePercent.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/recommendedCredit.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/recommendedCredit.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rewardsDisplay.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/formatters/rewardsDisplay.spec.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offer-catalog/src/utils/stats/types.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offers/pipeline/src/sources/ratetables/offer-catalog/types/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offers/pipeline/src/sources/ratetables/offer-catalog/types/oas/offer-catalog.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/offers/pipeline/src/sources/ratetables/types/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/MarkdownText/Abbreviation.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/MarkdownText/markdownPreprocessor.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/thumbor/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/thumbor/useSvgUriViewBox.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/components/thumbor/useSvgUriViewBox.test.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/index.d.ts +0 -0
- /package/lib/typescript/{capabilities → src/capabilities}/ui/elements/src/offerCardAttributes.d.ts +0 -0
- /package/lib/typescript/{config → src/config}/mocks/cnfContext.d.ts +0 -0
package/package.json
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { get } from "radash";
|
|
2
|
+
import { enhanceType, type Brand } from "./types";
|
|
3
|
+
import { match, P } from "ts-pattern";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A UI centric concept that prioritizes brands for visual use, both by the data available and the preferences of the brand.
|
|
7
|
+
*/
|
|
8
|
+
export type VisualBrandKind = "primary" | "secondary" | "none";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Determines the highest visual eligibility a Brand supports.
|
|
12
|
+
* Used to rank a primary eligible brand highest if no brand prefers primary, such as a licensed brand
|
|
13
|
+
* @param brand
|
|
14
|
+
*/
|
|
15
|
+
export const checkVisualBrandEligibility = (brand: Brand) =>
|
|
16
|
+
match([enhanceType(brand), get(brand, "allowedMarks"), brand?.isLicensed])
|
|
17
|
+
.returnType<VisualBrandKind>()
|
|
18
|
+
.with(
|
|
19
|
+
[P._, P._, true],
|
|
20
|
+
["business", { logo: true, name: true }, P.any],
|
|
21
|
+
["product", { logo: true, name: true }, P.any],
|
|
22
|
+
() => "primary"
|
|
23
|
+
)
|
|
24
|
+
.with(
|
|
25
|
+
["individual", P._, P.any],
|
|
26
|
+
["business", { name: true, logo: false }, P.any],
|
|
27
|
+
() => "secondary"
|
|
28
|
+
)
|
|
29
|
+
.otherwise(() => "none");
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { isObject, sift } from "radash";
|
|
2
|
+
import type { Brand } from "../../../../../builder";
|
|
3
|
+
import { P, match } from "ts-pattern";
|
|
4
|
+
import { enhanceType } from "./types";
|
|
5
|
+
import { checkVisualBrandEligibility } from "./checkVisualEligibility";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Extracts and normalizes a brand into -
|
|
9
|
+
* LicensedBrand - The brand to be used for terms, legal and other compliance needs
|
|
10
|
+
* VisualBrands - The brands to be shown to the user
|
|
11
|
+
* @param brand
|
|
12
|
+
*/
|
|
13
|
+
export const createDerivedBrands = (brand: Brand) => {
|
|
14
|
+
// Determine the licensed brand for this brand, keeping in mind that this brand may be the licensed brand
|
|
15
|
+
const licensedBrand = match([
|
|
16
|
+
enhanceType(brand),
|
|
17
|
+
brand?.isLicensed || brand?.licensedBrand,
|
|
18
|
+
])
|
|
19
|
+
// Ensure we get back a brand at the end
|
|
20
|
+
.returnType<Brand>()
|
|
21
|
+
// If the type is licensed, return this brand
|
|
22
|
+
.with(["licensed", P._], () => brand)
|
|
23
|
+
// If the type is not licensed, but there is a cobrand setup, use that to get the licensed brand
|
|
24
|
+
.with(
|
|
25
|
+
[P.not("licensed"), P.select("licensedBrandObj")],
|
|
26
|
+
({ licensedBrandObj }) => {
|
|
27
|
+
if (isObject(licensedBrandObj)) return licensedBrandObj;
|
|
28
|
+
// Throw if no licensed brand is able to be found
|
|
29
|
+
throw new Error("Missing Licensed Brand");
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
.otherwise(() => {
|
|
33
|
+
throw new Error("Missing Licensed Brand");
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// Determine the set of visual brands which should be displayed on the page
|
|
37
|
+
const brandCanBeShown = checkVisualBrandEligibility(brand) !== "none";
|
|
38
|
+
return Array.from(new Set(sift([licensedBrand, brandCanBeShown && brand])));
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./orderProductTypesByRankUtils";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orders product types by rank.
|
|
3
|
+
*
|
|
4
|
+
* @param productTypes {Record<string, number>} - The product types to order.
|
|
5
|
+
* @returns {string[]} The product types ordered by rank.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* const productTypes = {
|
|
10
|
+
* 'credit-card': 1,
|
|
11
|
+
* 'loan': 2,
|
|
12
|
+
* 'insurance': 3,
|
|
13
|
+
* }
|
|
14
|
+
* const orderedProductTypes = orderProductTypesByRank(productTypes)
|
|
15
|
+
* // orderedProductTypes = ['insurance', 'loan', 'credit-card']
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export const orderProductTypesByRank = (
|
|
19
|
+
productTypes: Record<string, number>
|
|
20
|
+
) => {
|
|
21
|
+
const productTypesWithRank = Object.entries(productTypes).map(
|
|
22
|
+
([productType, count]) => ({
|
|
23
|
+
productType,
|
|
24
|
+
rank: count as number,
|
|
25
|
+
})
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
const sortedProductTypes = productTypesWithRank.sort(
|
|
29
|
+
(a, b) => b.rank - a.rank
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
return sortedProductTypes.map((pt) => pt.productType);
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./system/cnfContext/schemas";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import {
|
|
3
|
+
App,
|
|
4
|
+
Brand,
|
|
5
|
+
CnfRequest,
|
|
6
|
+
Configuration,
|
|
7
|
+
Signals,
|
|
8
|
+
Subaccount,
|
|
9
|
+
} from "./schemas";
|
|
10
|
+
|
|
11
|
+
export const CnfContext = Schema.Struct({
|
|
12
|
+
app: App,
|
|
13
|
+
brand: Brand,
|
|
14
|
+
configuration: Configuration,
|
|
15
|
+
request: CnfRequest,
|
|
16
|
+
signals: Signals,
|
|
17
|
+
subaccount: Subaccount,
|
|
18
|
+
isDev: Schema.Boolean,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export type CnfContext = Schema.Schema.Type<typeof CnfContext>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
|
|
3
|
+
export type App = Schema.Schema.Type<typeof App>;
|
|
4
|
+
export const App = Schema.Struct({
|
|
5
|
+
id: Schema.UUID,
|
|
6
|
+
name: Schema.String,
|
|
7
|
+
registry: Schema.String,
|
|
8
|
+
repository: Schema.String,
|
|
9
|
+
syncStatus: Schema.String,
|
|
10
|
+
createdAt: Schema.String,
|
|
11
|
+
updatedAt: Schema.String,
|
|
12
|
+
syncTimestamp: Schema.String,
|
|
13
|
+
});
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
|
|
3
|
+
export type Palette = Schema.Schema.Type<typeof Palette>;
|
|
4
|
+
const Palette = Schema.Struct({
|
|
5
|
+
promotional: Schema.optional(Schema.String),
|
|
6
|
+
generation: Schema.optional(Schema.Literal("generate", "provided")),
|
|
7
|
+
colorScheme: Schema.optional(Schema.Literal("balanced", "light", "dark")),
|
|
8
|
+
positive: Schema.optional(Schema.String),
|
|
9
|
+
critical: Schema.optional(Schema.String),
|
|
10
|
+
highlight: Schema.optional(Schema.String),
|
|
11
|
+
neutral: Schema.optional(Schema.String),
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export type Links = Schema.Schema.Type<typeof Links>;
|
|
15
|
+
const Links = Schema.Struct({
|
|
16
|
+
home: Schema.optional(Schema.String),
|
|
17
|
+
terms: Schema.optional(Schema.String),
|
|
18
|
+
support: Schema.optional(Schema.String),
|
|
19
|
+
privacy: Schema.optional(Schema.String),
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export type AiInference = Schema.Schema.Type<typeof AiInference>;
|
|
23
|
+
const AiInference = Schema.Struct({
|
|
24
|
+
status: Schema.String,
|
|
25
|
+
error: Schema.optional(Schema.String),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export type Media = Schema.Schema.Type<typeof Media>;
|
|
29
|
+
const Media = Schema.Struct({
|
|
30
|
+
id: Schema.String,
|
|
31
|
+
autoCrop: Schema.Boolean,
|
|
32
|
+
prefix: Schema.optional(Schema.String),
|
|
33
|
+
alt: Schema.optional(Schema.String),
|
|
34
|
+
url: Schema.optional(Schema.String),
|
|
35
|
+
filename: Schema.optional(Schema.String),
|
|
36
|
+
mimeType: Schema.optional(Schema.String),
|
|
37
|
+
filesize: Schema.optional(Schema.Number),
|
|
38
|
+
width: Schema.optional(Schema.Number),
|
|
39
|
+
height: Schema.optional(Schema.Number),
|
|
40
|
+
createdAt: Schema.optional(Schema.String),
|
|
41
|
+
updatedAt: Schema.optional(Schema.String),
|
|
42
|
+
aiInference: Schema.optional(AiInference),
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export type Logos = Schema.Schema.Type<typeof Logos>;
|
|
46
|
+
const Logos = Schema.Struct({
|
|
47
|
+
horizontal: Schema.optional(Media),
|
|
48
|
+
icon: Schema.optional(Schema.NullOr(Media)),
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export type FontFamily = Schema.Schema.Type<typeof FontFamily>;
|
|
52
|
+
const FontFamily = Schema.Literal(
|
|
53
|
+
"nunito",
|
|
54
|
+
"lato",
|
|
55
|
+
"sourceSans3",
|
|
56
|
+
"openSans",
|
|
57
|
+
"roboto",
|
|
58
|
+
"arimo",
|
|
59
|
+
"montserrat"
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
export type Font = Schema.Schema.Type<typeof Font>;
|
|
63
|
+
const Font = Schema.Struct({
|
|
64
|
+
family: Schema.optional(FontFamily),
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
export type AllowedMarks = Schema.Schema.Type<typeof AllowedMarks>;
|
|
68
|
+
const AllowedMarks = Schema.Struct({
|
|
69
|
+
logo: Schema.Boolean,
|
|
70
|
+
name: Schema.Boolean,
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
export type CtaRoundness = Schema.Schema.Type<typeof CtaRoundness>;
|
|
74
|
+
const CtaRoundness = Schema.Struct({
|
|
75
|
+
small: Schema.optional(Schema.Number),
|
|
76
|
+
medium: Schema.optional(Schema.Number),
|
|
77
|
+
large: Schema.optional(Schema.Number),
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
type BrandFields = Schema.Schema.Type<typeof BrandFields>;
|
|
81
|
+
const BrandFields = Schema.Struct({
|
|
82
|
+
id: Schema.String,
|
|
83
|
+
domain: Schema.String,
|
|
84
|
+
displayName: Schema.String,
|
|
85
|
+
isLicensed: Schema.optional(Schema.Boolean),
|
|
86
|
+
hideLicensedLogo: Schema.optional(Schema.Boolean),
|
|
87
|
+
palette: Schema.optional(Palette),
|
|
88
|
+
links: Schema.optional(Links),
|
|
89
|
+
logos: Schema.optional(Logos),
|
|
90
|
+
font: Schema.optional(Font),
|
|
91
|
+
type: Schema.optional(Schema.Literal("business", "product", "individual")),
|
|
92
|
+
allowedMarks: AllowedMarks,
|
|
93
|
+
ctaRoundness: Schema.optional(CtaRoundness),
|
|
94
|
+
createdAt: Schema.optional(Schema.String),
|
|
95
|
+
updatedAt: Schema.optional(Schema.String),
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
export type Brand = BrandFields & {
|
|
99
|
+
licensedBrand?: Brand | null;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export const Brand = Schema.suspend((): Schema.Schema<Brand> => {
|
|
103
|
+
const withDepth = (
|
|
104
|
+
depth: number
|
|
105
|
+
): Schema.Schema<Brand> | Schema.Schema<BrandFields> => {
|
|
106
|
+
if (depth > 2) {
|
|
107
|
+
return BrandFields; // We don't want infinite recursion of licensedBrand field
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return Schema.Struct({
|
|
111
|
+
...BrandFields.fields,
|
|
112
|
+
licensedBrand: Schema.optional(
|
|
113
|
+
Schema.NullOr(Schema.suspend(() => withDepth(depth + 1)))
|
|
114
|
+
),
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
return withDepth(0); // Start with depth 0
|
|
119
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
|
|
3
|
+
const ProductTypesDefinition = Schema.Struct({
|
|
4
|
+
id: Schema.String,
|
|
5
|
+
partnerPageUrl: Schema.String,
|
|
6
|
+
productTypeSlug: Schema.String,
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
const PartnersOverrideDefinition = Schema.Struct({
|
|
10
|
+
id: Schema.String,
|
|
11
|
+
overrideUrl: Schema.String,
|
|
12
|
+
financialInstitutionUuid: Schema.String,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export const DynamicOffersConfigurationSchema = Schema.Struct({
|
|
16
|
+
hideFooter: Schema.optionalWith(Schema.Boolean, { default: () => false }),
|
|
17
|
+
enableUseCachedOffers: Schema.optionalWith(Schema.Boolean, {
|
|
18
|
+
default: () => false,
|
|
19
|
+
}),
|
|
20
|
+
defaultProductTypeSlug: Schema.optionalWith(Schema.String, {
|
|
21
|
+
default: () => "EarnedWageAccess",
|
|
22
|
+
}),
|
|
23
|
+
productTypesDefinition: Schema.optionalWith(
|
|
24
|
+
Schema.Array(ProductTypesDefinition),
|
|
25
|
+
{
|
|
26
|
+
default: () => [],
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
partnersOverrideDefinition: Schema.optionalWith(
|
|
30
|
+
Schema.Array(PartnersOverrideDefinition),
|
|
31
|
+
{ default: () => [] }
|
|
32
|
+
),
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export type DynamicOffersConfigurationSchema = Schema.Schema.Type<
|
|
36
|
+
typeof DynamicOffersConfigurationSchema
|
|
37
|
+
>;
|
|
38
|
+
|
|
39
|
+
export const Configuration = Schema.Struct({
|
|
40
|
+
app: Schema.Union(
|
|
41
|
+
Schema.String,
|
|
42
|
+
Schema.Struct({
|
|
43
|
+
name: Schema.String,
|
|
44
|
+
})
|
|
45
|
+
),
|
|
46
|
+
configuration: DynamicOffersConfigurationSchema,
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export type Configuration = Schema.Schema.Type<typeof Configuration>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
|
|
3
|
+
export type CnfRequest = Schema.Schema.Type<typeof CnfRequest>;
|
|
4
|
+
export const CnfRequest = Schema.Struct({
|
|
5
|
+
referer: Schema.optional(Schema.String),
|
|
6
|
+
channel: Schema.optional(Schema.String),
|
|
7
|
+
zone: Schema.optional(Schema.String),
|
|
8
|
+
cnfAppBaseUrl: Schema.optionalWith(Schema.String, {
|
|
9
|
+
default: () => "http://localhost:3000",
|
|
10
|
+
}),
|
|
11
|
+
path: Schema.optional(Schema.String),
|
|
12
|
+
pathname: Schema.optional(Schema.String),
|
|
13
|
+
query: Schema.optional(Schema.String),
|
|
14
|
+
searchParams: Schema.Struct({}),
|
|
15
|
+
host: Schema.optional(Schema.String),
|
|
16
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
|
|
3
|
+
export type SessionId = Schema.Schema.Type<typeof SessionId>;
|
|
4
|
+
export const SessionId = Schema.UUID.pipe(Schema.brand("SessionId"));
|
|
5
|
+
|
|
6
|
+
export type Session = Schema.Schema.Type<typeof Session>;
|
|
7
|
+
export const Session = Schema.Struct({
|
|
8
|
+
id: SessionId,
|
|
9
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
|
|
3
|
+
export type PartnerSignals = Schema.Schema.Type<typeof PartnerSignals>;
|
|
4
|
+
export const PartnerSignals = Schema.Struct({
|
|
5
|
+
clientTags: Schema.Struct({}, { key: Schema.String, value: Schema.String }),
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
export type DeviceId = Schema.Schema.Type<typeof DeviceId>;
|
|
9
|
+
export const DeviceId = Schema.UUID;
|
|
10
|
+
|
|
11
|
+
export type DeviceSignals = Schema.Schema.Type<typeof DeviceSignals>;
|
|
12
|
+
const DeviceSignals = Schema.Struct({
|
|
13
|
+
id: DeviceId,
|
|
14
|
+
ipAddress: Schema.optional(Schema.String),
|
|
15
|
+
os: Schema.optional(Schema.String),
|
|
16
|
+
isMobile: Schema.optional(Schema.Boolean),
|
|
17
|
+
country: Schema.optional(Schema.String),
|
|
18
|
+
state: Schema.optional(
|
|
19
|
+
Schema.Struct({
|
|
20
|
+
name: Schema.optional(Schema.String),
|
|
21
|
+
code: Schema.optional(Schema.String),
|
|
22
|
+
})
|
|
23
|
+
),
|
|
24
|
+
postalCode: Schema.String,
|
|
25
|
+
city: Schema.String,
|
|
26
|
+
fingerprintId: Schema.optional(Schema.String),
|
|
27
|
+
userAgent: Schema.optional(Schema.String),
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export type LeadUuid = Schema.Schema.Type<typeof LeadUuid>;
|
|
31
|
+
export const LeadUuid = Schema.UUID;
|
|
32
|
+
|
|
33
|
+
export type LeadSignals = Schema.Schema.Type<typeof LeadSignals>;
|
|
34
|
+
export const LeadSignals = Schema.Struct({
|
|
35
|
+
uuid: LeadUuid,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export type ReferralSignals = Schema.Schema.Type<typeof ReferralSignals>;
|
|
39
|
+
export const ReferralSignals = Schema.Struct({});
|
|
40
|
+
|
|
41
|
+
export type Signals = Schema.Schema.Type<typeof Signals>;
|
|
42
|
+
export const Signals = Schema.Struct({
|
|
43
|
+
partnerSignals: PartnerSignals,
|
|
44
|
+
deviceSignals: DeviceSignals,
|
|
45
|
+
lead: LeadSignals,
|
|
46
|
+
referral: ReferralSignals,
|
|
47
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
|
|
3
|
+
const EmptyString = Schema.Literal("");
|
|
4
|
+
const NullOrEmptyString = <S extends Schema.Schema.Any>(schema: S) =>
|
|
5
|
+
Schema.Union(Schema.Null, EmptyString, schema);
|
|
6
|
+
|
|
7
|
+
const Tag = Schema.Struct({
|
|
8
|
+
id: Schema.String,
|
|
9
|
+
key: Schema.String,
|
|
10
|
+
value: Schema.String,
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export const Subaccount = Schema.Struct({
|
|
14
|
+
id: Schema.UUID,
|
|
15
|
+
publicToken: Schema.String,
|
|
16
|
+
name: Schema.String,
|
|
17
|
+
companyUuid: Schema.String,
|
|
18
|
+
subaccount: Schema.NullOr(Schema.Number),
|
|
19
|
+
supplySubaccountUuid: Schema.UUID.pipe(NullOrEmptyString, Schema.optional),
|
|
20
|
+
tags: Schema.Array(Tag),
|
|
21
|
+
createdAt: Schema.String,
|
|
22
|
+
updatedAt: Schema.String,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export type Subaccount = Schema.Schema.Type<typeof Subaccount>;
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { isEmpty } from "radash";
|
|
2
|
+
import type { CnfContext } from "../../../core/src/system/cnfContext/CnfContext";
|
|
3
|
+
import type { OffersData } from "../types/offerCatalogSchema";
|
|
4
|
+
import {
|
|
5
|
+
getIsDevEnvironment,
|
|
6
|
+
getLeadUUID,
|
|
7
|
+
getStateCode,
|
|
8
|
+
getSubAccountUUID,
|
|
9
|
+
getSubaccountToken,
|
|
10
|
+
} from "../utils/contextUtil";
|
|
11
|
+
import errorUtil from "../utils/errorUtil";
|
|
12
|
+
import type { State } from "../../../offers/pipeline/src/sources/ratetables/types";
|
|
13
|
+
import { withDeviceSignals } from "../../../offers/pipeline/src/sources/ratetables/withDeviceSignals";
|
|
14
|
+
import { getOfferCatalogApiBaseUrl } from "../../../../apiEnvironment";
|
|
15
|
+
|
|
16
|
+
export const getCachedOffersByProductTypes =
|
|
17
|
+
(context: CnfContext) => async (productTypes: string[]) => {
|
|
18
|
+
// const cachedOffersByProductTypesLogger = pinoRootLogger.child({
|
|
19
|
+
// name: "cachedOffersByProductTypesLogger",
|
|
20
|
+
// });
|
|
21
|
+
|
|
22
|
+
try {
|
|
23
|
+
const subAccountUuid = getSubAccountUUID(context);
|
|
24
|
+
const isDev = getIsDevEnvironment(context);
|
|
25
|
+
|
|
26
|
+
const url = new URL(
|
|
27
|
+
`${getOfferCatalogApiBaseUrl(isDev)}/leads/public/channelOffers`
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
url.searchParams.append("productType", productTypes.join(","));
|
|
31
|
+
if (subAccountUuid) {
|
|
32
|
+
url.searchParams.append("channelUuid", subAccountUuid);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// TODO find a way to add the revalidate: 3600 kind of logic here
|
|
36
|
+
const response = await fetch(url.toString(), {
|
|
37
|
+
method: "GET",
|
|
38
|
+
headers: {
|
|
39
|
+
"Content-Type": "application/json",
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
const logFormat = {
|
|
44
|
+
status: response.status,
|
|
45
|
+
statusText: response.statusText,
|
|
46
|
+
url: response.url,
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
if (!response.ok) {
|
|
50
|
+
const errorMessage = errorUtil.getErrorMessageForResponseStatus(
|
|
51
|
+
response.status,
|
|
52
|
+
response.statusText
|
|
53
|
+
);
|
|
54
|
+
console.error(logFormat, errorMessage);
|
|
55
|
+
throw new Error(errorMessage);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const offersData: OffersData = await response.json();
|
|
59
|
+
|
|
60
|
+
if (isEmpty(offersData.offers)) {
|
|
61
|
+
const errorMessage =
|
|
62
|
+
errorUtil.getErrorForOffersFromProductTypes("NO_OFFERS");
|
|
63
|
+
console.error(logFormat, errorMessage);
|
|
64
|
+
throw new Error(errorMessage);
|
|
65
|
+
}
|
|
66
|
+
return offersData;
|
|
67
|
+
} catch (error) {
|
|
68
|
+
const errorMessage =
|
|
69
|
+
errorUtil.getErrorForOffersFromProductTypes("DEFAULT");
|
|
70
|
+
console.error(error, errorMessage);
|
|
71
|
+
|
|
72
|
+
return {
|
|
73
|
+
isError: true,
|
|
74
|
+
leadUuid: "",
|
|
75
|
+
offers: [],
|
|
76
|
+
uuid: "",
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export const getOffersForProductTypes =
|
|
82
|
+
(context: CnfContext) =>
|
|
83
|
+
async (
|
|
84
|
+
productTypes: string[],
|
|
85
|
+
customClientTags?: Record<string, string[]>
|
|
86
|
+
): Promise<OffersData> => {
|
|
87
|
+
// const offersFromProductTypesLogger = pinoRootLogger.child({
|
|
88
|
+
// name: "offersFromProductTypesLogger",
|
|
89
|
+
// });
|
|
90
|
+
|
|
91
|
+
try {
|
|
92
|
+
const token = getSubaccountToken(context);
|
|
93
|
+
const leadUuid = getLeadUUID(context);
|
|
94
|
+
const isDev = getIsDevEnvironment(context);
|
|
95
|
+
|
|
96
|
+
let fields = {
|
|
97
|
+
productTypes,
|
|
98
|
+
clientTags: customClientTags,
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
try {
|
|
102
|
+
const stateCode = getStateCode(context);
|
|
103
|
+
// TODO: Refactor to not use this withDeviceSignals
|
|
104
|
+
fields = withDeviceSignals(context, {
|
|
105
|
+
productTypes,
|
|
106
|
+
clientTags: customClientTags,
|
|
107
|
+
personalInformation: { state: stateCode as State },
|
|
108
|
+
});
|
|
109
|
+
} catch (error) {
|
|
110
|
+
// handle error if context is not available. This scenario should not occur in production
|
|
111
|
+
console.error(
|
|
112
|
+
error,
|
|
113
|
+
errorUtil.getErrorForOffersFromProductTypes("DEVICE_SIGNALS_ERROR")
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const url = `${getOfferCatalogApiBaseUrl(isDev)}/leads/${leadUuid}/offerCatalogRateTables`;
|
|
118
|
+
|
|
119
|
+
const response = await fetch(url, {
|
|
120
|
+
method: "POST",
|
|
121
|
+
headers: {
|
|
122
|
+
"Content-Type": "application/json",
|
|
123
|
+
"Authorization": `Bearer ${token}`,
|
|
124
|
+
},
|
|
125
|
+
body: JSON.stringify(fields),
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
const body = await response.json();
|
|
129
|
+
|
|
130
|
+
const logFormat = {
|
|
131
|
+
status: response.status,
|
|
132
|
+
statusText: response.statusText,
|
|
133
|
+
url: response.url,
|
|
134
|
+
body,
|
|
135
|
+
fields,
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
if (!response.ok) {
|
|
139
|
+
const errorMessage = errorUtil.getErrorMessageForResponseStatus(
|
|
140
|
+
response.status,
|
|
141
|
+
response.statusText
|
|
142
|
+
);
|
|
143
|
+
|
|
144
|
+
console.error(logFormat, errorMessage);
|
|
145
|
+
|
|
146
|
+
throw new Error(errorMessage);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const offersData: OffersData = body;
|
|
150
|
+
|
|
151
|
+
if (isEmpty(offersData.offers)) {
|
|
152
|
+
const errorMessage =
|
|
153
|
+
errorUtil.getErrorForOffersFromProductTypes("NO_OFFERS");
|
|
154
|
+
console.error(logFormat, errorMessage);
|
|
155
|
+
throw new Error(errorMessage);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
return offersData;
|
|
159
|
+
} catch (error) {
|
|
160
|
+
const errorMessage =
|
|
161
|
+
errorUtil.getErrorForOffersFromProductTypes("DEFAULT");
|
|
162
|
+
console.error(error, errorMessage);
|
|
163
|
+
|
|
164
|
+
return {
|
|
165
|
+
isError: true,
|
|
166
|
+
leadUuid: "",
|
|
167
|
+
offers: [],
|
|
168
|
+
uuid: "",
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type * from "./types/offerCatalogSchema";
|
|
2
|
+
export * from "./utils/arrayToMarkdownList";
|
|
3
|
+
export { getOfferUrl } from "./utils/getOfferUrl";
|
|
4
|
+
export { getSubAccountUUID } from "./utils/contextUtil";
|
|
5
|
+
export {
|
|
6
|
+
formatAmount,
|
|
7
|
+
formatPercentage,
|
|
8
|
+
formatStringListWithAnd,
|
|
9
|
+
formatRange,
|
|
10
|
+
} from "./utils/formatUtils";
|