@moneylion/react-native-offer-carousel 1.5.1 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/capabilities/configuration/src/userData/types.js +2 -0
- package/lib/commonjs/capabilities/configuration/src/userData/types.js.map +1 -0
- package/lib/commonjs/capabilities/offer-catalog/src/api/offerCatalogApi.js +14 -3
- package/lib/commonjs/capabilities/offer-catalog/src/api/offerCatalogApi.js.map +1 -1
- package/lib/commonjs/components/MoneyLionOfferCarousel.js.map +1 -1
- package/lib/commonjs/pageData.js +4 -2
- package/lib/commonjs/pageData.js.map +1 -1
- package/lib/commonjs/services/getDynamicOffers.js +6 -3
- package/lib/commonjs/services/getDynamicOffers.js.map +1 -1
- package/lib/commonjs/utils/getOffersByProductTypes.js +4 -2
- package/lib/commonjs/utils/getOffersByProductTypes.js.map +1 -1
- package/lib/module/capabilities/configuration/src/userData/types.js +2 -0
- package/lib/module/capabilities/configuration/src/userData/types.js.map +1 -0
- package/lib/module/capabilities/offer-catalog/src/api/offerCatalogApi.js +14 -3
- package/lib/module/capabilities/offer-catalog/src/api/offerCatalogApi.js.map +1 -1
- package/lib/module/components/MoneyLionOfferCarousel.js.map +1 -1
- package/lib/module/pageData.js +4 -2
- package/lib/module/pageData.js.map +1 -1
- package/lib/module/services/getDynamicOffers.js +6 -3
- package/lib/module/services/getDynamicOffers.js.map +1 -1
- package/lib/module/utils/getOffersByProductTypes.js +4 -2
- package/lib/module/utils/getOffersByProductTypes.js.map +1 -1
- package/lib/typescript/src/capabilities/configuration/src/userData/types.d.ts +4 -0
- package/lib/typescript/src/capabilities/configuration/src/userData/types.d.ts.map +1 -0
- package/lib/typescript/src/capabilities/offer-catalog/src/api/offerCatalogApi.d.ts +2 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/api/offerCatalogApi.d.ts.map +1 -1
- package/lib/typescript/src/components/MoneyLionOfferCarousel.d.ts +2 -0
- package/lib/typescript/src/components/MoneyLionOfferCarousel.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/pageData.d.ts.map +1 -1
- package/lib/typescript/src/services/getDynamicOffers.d.ts +3 -1
- package/lib/typescript/src/services/getDynamicOffers.d.ts.map +1 -1
- package/lib/typescript/src/utils/getOffersByProductTypes.d.ts +4 -1
- package/lib/typescript/src/utils/getOffersByProductTypes.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/capabilities/configuration/src/userData/types.ts +3 -0
- package/src/capabilities/offer-catalog/src/api/offerCatalogApi.ts +16 -2
- package/src/components/MoneyLionOfferCarousel.tsx +2 -0
- package/src/index.tsx +2 -0
- package/src/pageData.ts +2 -0
- package/src/services/getDynamicOffers.ts +5 -0
- package/src/utils/getOffersByProductTypes.ts +6 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../src","sources":["capabilities/configuration/src/userData/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -68,7 +68,7 @@ const getCachedOffersByProductTypes = context => async productTypes => {
|
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
exports.getCachedOffersByProductTypes = getCachedOffersByProductTypes;
|
|
71
|
-
const getOffersForProductTypes = context => async (productTypes, customClientTags) => {
|
|
71
|
+
const getOffersForProductTypes = context => async (productTypes, customClientTags, userData) => {
|
|
72
72
|
// const offersFromProductTypesLogger = pinoRootLogger.child({
|
|
73
73
|
// name: "offersFromProductTypesLogger",
|
|
74
74
|
// });
|
|
@@ -77,9 +77,19 @@ const getOffersForProductTypes = context => async (productTypes, customClientTag
|
|
|
77
77
|
const token = (0, _contextUtil.getSubaccountToken)(context);
|
|
78
78
|
const leadUuid = (0, _contextUtil.getLeadUUID)(context);
|
|
79
79
|
const isDev = (0, _contextUtil.getIsDevEnvironment)(context);
|
|
80
|
+
const userEmail = userData === null || userData === void 0 ? void 0 : userData.email;
|
|
81
|
+
const userInformation = {
|
|
82
|
+
// If no email passed, do not include in the payload
|
|
83
|
+
...(Boolean(userEmail) && {
|
|
84
|
+
email: userEmail
|
|
85
|
+
})
|
|
86
|
+
};
|
|
80
87
|
let fields = {
|
|
81
88
|
productTypes,
|
|
82
|
-
clientTags: customClientTags
|
|
89
|
+
clientTags: customClientTags,
|
|
90
|
+
personalInformation: {
|
|
91
|
+
...userInformation
|
|
92
|
+
}
|
|
83
93
|
};
|
|
84
94
|
try {
|
|
85
95
|
const stateCode = (0, _contextUtil.getStateCode)(context);
|
|
@@ -88,7 +98,8 @@ const getOffersForProductTypes = context => async (productTypes, customClientTag
|
|
|
88
98
|
productTypes,
|
|
89
99
|
clientTags: customClientTags,
|
|
90
100
|
personalInformation: {
|
|
91
|
-
state: stateCode
|
|
101
|
+
state: stateCode,
|
|
102
|
+
...userInformation
|
|
92
103
|
}
|
|
93
104
|
});
|
|
94
105
|
} catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_radash","require","_contextUtil","_errorUtil","_interopRequireDefault","_withDeviceSignals","_apiEnvironment","e","__esModule","default","getCachedOffersByProductTypes","context","productTypes","subAccountUuid","getSubAccountUUID","isDev","getIsDevEnvironment","url","URL","getOfferCatalogApiBaseUrl","searchParams","append","join","response","fetch","toString","method","headers","logFormat","status","statusText","ok","errorMessage","errorUtil","getErrorMessageForResponseStatus","console","error","Error","code","offersData","json","isEmpty","offers","getErrorForOffersFromProductTypes","errorCode","isError","leadUuid","uuid","exports","getOffersForProductTypes","customClientTags","token","getSubaccountToken","getLeadUUID","fields","clientTags","stateCode","getStateCode","withDeviceSignals","
|
|
1
|
+
{"version":3,"names":["_radash","require","_contextUtil","_errorUtil","_interopRequireDefault","_withDeviceSignals","_apiEnvironment","e","__esModule","default","getCachedOffersByProductTypes","context","productTypes","subAccountUuid","getSubAccountUUID","isDev","getIsDevEnvironment","url","URL","getOfferCatalogApiBaseUrl","searchParams","append","join","response","fetch","toString","method","headers","logFormat","status","statusText","ok","errorMessage","errorUtil","getErrorMessageForResponseStatus","console","error","Error","code","offersData","json","isEmpty","offers","getErrorForOffersFromProductTypes","errorCode","isError","leadUuid","uuid","exports","getOffersForProductTypes","customClientTags","userData","token","getSubaccountToken","getLeadUUID","userEmail","email","userInformation","Boolean","fields","clientTags","personalInformation","stateCode","getStateCode","withDeviceSignals","state","body","JSON","stringify"],"sourceRoot":"../../../../../../src","sources":["capabilities/offer-catalog/src/api/offerCatalogApi.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAOA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,kBAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAL,OAAA;AAAuE,SAAAG,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAQhE,MAAMG,6BAA6B,GACxCC,OAAmB,IAAK,MAAOC,YAAsB,IAAK;EAC1D;EACA;EACA;;EAEA,IAAI;IACH,MAAMC,cAAc,GAAG,IAAAC,8BAAiB,EAACH,OAAO,CAAC;IACjD,MAAMI,KAAK,GAAG,IAAAC,gCAAmB,EAACL,OAAO,CAAC;IAE1C,MAAMM,GAAG,GAAG,IAAIC,GAAG,CAClB,GAAG,IAAAC,yCAAyB,EAACJ,KAAK,CAAC,6BACpC,CAAC;IAEDE,GAAG,CAACG,YAAY,CAACC,MAAM,CAAC,aAAa,EAAET,YAAY,CAACU,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9D,IAAIT,cAAc,EAAE;MACnBI,GAAG,CAACG,YAAY,CAACC,MAAM,CAAC,aAAa,EAAER,cAAc,CAAC;IACvD;;IAEA;IACA,MAAMU,QAAQ,GAAG,MAAMC,KAAK,CAACP,GAAG,CAACQ,QAAQ,CAAC,CAAC,EAAE;MAC5CC,MAAM,EAAE,KAAK;MACbC,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AAE,GAAGG,UAAU;MAAEK,SAAS,EAAErB,QAAQ,CAACM;IAAO,CAAC;EACrD,CAAC,CAAC,OAAOO,KAAK,EAAE;IACf,MAAMJ,YAAY,GACjBC,kBAAS,CAACU,iCAAiC,CAAC,SAAS,CAAC;IACvDR,OAAO,CAACC,KAAK,CAACA,KAAK,EAAEJ,YAAY,CAAC;IAElC,OAAO;MACNY,SAAS,EAAGR,KAAK,CAAcE,IAAI;MACnCO,OAAO,EAAE,IAAI;MACbC,QAAQ,EAAE,EAAE;MACZJ,MAAM,EAAE,EAAE;MACVK,IAAI,EAAE;IACP,CAAC;EACF;AACD,CAAC;AAACC,OAAA,CAAAC,wBAAA,GAAAA,wBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_cnfContext","_reactNative","_pageData","_DynamicOffersContainer","_ThemeProvider","_EventHandlerProvider","_apiEnvironment","_ConfigurationProvider","_getThemeColors","_ErrorBoundary","_interopRequireDefault","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","getConfiguration","channel","zone","subAccountToken","isDev","onError","url","getConfigApiBaseUrl","headers","Authorization","response","fetch","ok","errorCode","status","code","message","timestamp","Date","toISOString","Error","data","json","error","console","includes","localCnfContext","InternalMoneyLionOfferCarousel","props","fontFamily","showDescriptionPoints","onLoad","title","subtitle","isDarkTheme","onInitialize","onRateTableSubmit","onRateTableResponse","onOfferDisplayInViewport","onOfferClick","onOfferDetailsPageOpen","onOfferDetailsPageClose","eventHandlers","context","setContext","useState","isLoading","setIsLoading","setError","pageData","setPageData","useEffect","fetchConfiguration","serializableContext","err","errorObj","fetchPageData","getPageData","params","isError","Boolean","offers","rateTableUuid","leadUuid","length","themeColors","useMemo","getThemeColors","brand","reshapedThemeColors","createElement","DynamicOfferSkeleton","Text","shouldHideFooter","showProductTypeLabel","showCardBorder","config","ThemeProvider","EventHandlerProvider","ConfigurationProvider","DynamicOffersContainer","MoneyLionOfferCarousel","fallbackUI","handleError","exports"],"sourceRoot":"../../../src","sources":["components/MoneyLionOfferCarousel.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,uBAAA,GAAAJ,OAAA;AAKA,IAAAK,cAAA,GAAAL,OAAA;AACA,IAAAM,qBAAA,GAAAN,OAAA;AAIA,IAAAO,eAAA,GAAAP,OAAA;AACA,IAAAQ,sBAAA,GAAAR,OAAA;AAEA,IAAAS,eAAA,GAAAT,OAAA;
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_cnfContext","_reactNative","_pageData","_DynamicOffersContainer","_ThemeProvider","_EventHandlerProvider","_apiEnvironment","_ConfigurationProvider","_getThemeColors","_ErrorBoundary","_interopRequireDefault","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","getConfiguration","channel","zone","subAccountToken","isDev","onError","url","getConfigApiBaseUrl","headers","Authorization","response","fetch","ok","errorCode","status","code","message","timestamp","Date","toISOString","Error","data","json","error","console","includes","localCnfContext","InternalMoneyLionOfferCarousel","props","fontFamily","showDescriptionPoints","onLoad","title","subtitle","isDarkTheme","onInitialize","onRateTableSubmit","onRateTableResponse","onOfferDisplayInViewport","onOfferClick","onOfferDetailsPageOpen","onOfferDetailsPageClose","eventHandlers","context","setContext","useState","isLoading","setIsLoading","setError","pageData","setPageData","useEffect","fetchConfiguration","serializableContext","err","errorObj","fetchPageData","getPageData","params","isError","Boolean","offers","rateTableUuid","leadUuid","length","themeColors","useMemo","getThemeColors","brand","reshapedThemeColors","createElement","DynamicOfferSkeleton","Text","shouldHideFooter","showProductTypeLabel","showCardBorder","config","ThemeProvider","EventHandlerProvider","ConfigurationProvider","DynamicOffersContainer","MoneyLionOfferCarousel","fallbackUI","handleError","exports"],"sourceRoot":"../../../src","sources":["components/MoneyLionOfferCarousel.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,uBAAA,GAAAJ,OAAA;AAKA,IAAAK,cAAA,GAAAL,OAAA;AACA,IAAAM,qBAAA,GAAAN,OAAA;AAIA,IAAAO,eAAA,GAAAP,OAAA;AACA,IAAAQ,sBAAA,GAAAR,OAAA;AAEA,IAAAS,eAAA,GAAAT,OAAA;AAGA,IAAAU,cAAA,GAAAC,sBAAA,CAAAX,OAAA;AAA4C,SAAAW,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAb,wBAAAa,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAE,OAAA,EAAAF,CAAA,QAAAM,CAAA,GAAAH,wBAAA,CAAAE,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAP,CAAA,UAAAM,CAAA,CAAAE,GAAA,CAAAR,CAAA,OAAAS,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,w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21
|
tags,
|
|
22
22
|
searchAPIToken,
|
|
23
23
|
showProductTypeLabel,
|
|
24
|
-
showCardBorder
|
|
24
|
+
showCardBorder,
|
|
25
|
+
userData
|
|
25
26
|
} = params;
|
|
26
27
|
|
|
27
28
|
// Resolve Tags
|
|
@@ -73,7 +74,8 @@ async function getPageData({
|
|
|
73
74
|
productTypesDefinition: [...productTypesDefinition],
|
|
74
75
|
partnersOverrideDefinition: [...partnersOverrideDefinition],
|
|
75
76
|
context,
|
|
76
|
-
defaultProductType
|
|
77
|
+
defaultProductType,
|
|
78
|
+
userData
|
|
77
79
|
});
|
|
78
80
|
return {
|
|
79
81
|
isError,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_contextUtil","require","_getDynamicOffers","_utils","_getEnableUseCachedOffers","getPageData","context","params","onRateTableSubmit","productType","query","tags","searchAPIToken","showProductTypeLabel","showCardBorder","resolvedTags","trim","isCachedOffersRequest","getEnableUseCachedOffers","defaultProductType","getDefaultProductType","isDev","getIsDevEnvironment","productTypesDefinition","partnersOverrideDefinition","getProductTypesDefinition","currentCountry","signals","deviceSignals","country","safeTags","encodeURI","productTypes","resultType","resolveProductTypes","timestamp","Date","toISOString","offers","isError","leadUuid","rateTableUuid","errorCode","getDynamicOffers"],"sourceRoot":"../../src","sources":["pageData.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAIA,IAAAC,iBAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAKA,IAAAG,yBAAA,GAAAH,OAAA;AANA;;AAcO,eAAeI,WAAWA,CAAC;EACjCC,OAAO;EACPC,MAAM;EACNC;AACiB,CAAC,EAAE;EACpB,MAAM;IACLC,WAAW;IACXC,KAAK;IACLC,IAAI;IACJC,cAAc;IACdC,oBAAoB;IACpBC;EACD,CAAC,
|
|
1
|
+
{"version":3,"names":["_contextUtil","require","_getDynamicOffers","_utils","_getEnableUseCachedOffers","getPageData","context","params","onRateTableSubmit","productType","query","tags","searchAPIToken","showProductTypeLabel","showCardBorder","userData","resolvedTags","trim","isCachedOffersRequest","getEnableUseCachedOffers","defaultProductType","getDefaultProductType","isDev","getIsDevEnvironment","productTypesDefinition","partnersOverrideDefinition","getProductTypesDefinition","currentCountry","signals","deviceSignals","country","safeTags","encodeURI","productTypes","resultType","resolveProductTypes","timestamp","Date","toISOString","offers","isError","leadUuid","rateTableUuid","errorCode","getDynamicOffers"],"sourceRoot":"../../src","sources":["pageData.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAIA,IAAAC,iBAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAKA,IAAAG,yBAAA,GAAAH,OAAA;AANA;;AAcO,eAAeI,WAAWA,CAAC;EACjCC,OAAO;EACPC,MAAM;EACNC;AACiB,CAAC,EAAE;EACpB,MAAM;IACLC,WAAW;IACXC,KAAK;IACLC,IAAI;IACJC,cAAc;IACdC,oBAAoB;IACpBC,cAAc;IACdC;EACD,CAAC,GAAGR,MAAM;;EAEV;EACA,MAAMS,YAAY,GAAG,GAAGL,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEM,IAAI,CAAC,CAAC,EAAE;EAEtC,MAAMC,qBAAqB,GAAG,IAAAC,kDAAwB,EAACb,OAAO,CAAC;EAE/D,MAAMc,kBAAkB,GAAG,IAAAC,4BAAqB,EAACf,OAAO,CAAC;;EAEzD;EACA;;EAEA,MAAMgB,KAAK,GAAG,IAAAC,gCAAmB,EAACjB,OAAO,CAAC;EAE1C,MAAM;IAAEkB,sBAAsB;IAAEC;EAA2B,CAAC,GAC3D,IAAAC,gCAAyB,EAACpB,OAAO,CAAC;EAEnC,MAAMqB,cAAc,GAAGrB,OAAO,CAACsB,OAAO,CAACC,aAAa,CAACC,OAAO;EAE5D,MAAMC,QAAQ,GAAGC,SAAS,CAAChB,YAAY,CAAC;;EAExC;EACA,MAAM;IAAEiB,YAAY;IAAEC;EAAW,CAAC,GAAG,MAAM,IAAAC,0BAAmB,EAAC;IAC9Df,kBAAkB;IAClBX,WAAW;IACXC,KAAK;IACLE,cAAc;IACdU;EACD,CAAC,CAAC;EAEFd,iBAAiB,aAAjBA,iBAAiB,eAAjBA,iBAAiB,CAAG;IACnB4B,SAAS,EAAE,IAAIC,IAAI,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC;IACnCL,YAAY;IACZC,UAAU;IACVd;EACD,CAAC,CAAC;;EAEF;EACA,MAAM;IAAEmB,MAAM;IAAEC,OAAO;IAAEC,QAAQ;IAAEC,aAAa;IAAEC;EAAU,CAAC,GAC5D,MAAM,IAAAC,kCAAgB,EAAC;IACtBjC,IAAI,EAAEoB,QAAQ;IACdE,YAAY;IACZC,UAAU;IACVhB,qBAAqB;IACrBM,sBAAsB,EAAE,CAAC,GAAGA,sBAAsB,CAAC;IACnDC,0BAA0B,EAAE,CAAC,GAAGA,0BAA0B,CAAC;IAC3DnB,OAAO;IACPc,kBAAkB;IAClBL;EACD,CAAC,CAAC;EAEH,OAAO;IACNyB,OAAO;IACPG,SAAS;IACTF,QAAQ;IACRC,aAAa;IACb;IACAH,MAAM;IACNZ,cAAc;IACd;IACAb,cAAc;IACd;IACAD;EACD,CAAC;AACF","ignoreList":[]}
|
|
@@ -23,7 +23,8 @@ const getDynamicOffers = async ({
|
|
|
23
23
|
isCachedOffersRequest,
|
|
24
24
|
productTypesDefinition,
|
|
25
25
|
partnersOverrideDefinition,
|
|
26
|
-
context
|
|
26
|
+
context,
|
|
27
|
+
userData
|
|
27
28
|
}) => {
|
|
28
29
|
// Get the initial offers
|
|
29
30
|
let {
|
|
@@ -36,7 +37,8 @@ const getDynamicOffers = async ({
|
|
|
36
37
|
isCachedOffersRequest,
|
|
37
38
|
productTypes,
|
|
38
39
|
tags,
|
|
39
|
-
context
|
|
40
|
+
context,
|
|
41
|
+
userData
|
|
40
42
|
});
|
|
41
43
|
|
|
42
44
|
// If no offers found, fall back to the default product type
|
|
@@ -45,7 +47,8 @@ const getDynamicOffers = async ({
|
|
|
45
47
|
isCachedOffersRequest,
|
|
46
48
|
productTypes: [defaultProductType],
|
|
47
49
|
tags,
|
|
48
|
-
context
|
|
50
|
+
context,
|
|
51
|
+
userData
|
|
49
52
|
});
|
|
50
53
|
|
|
51
54
|
// Update the offers, rateTableUuid, isError, leafUuid and productTypes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_radash","require","_utils","_sortOffersByRecommendationScore","_effect","_formatOfferUrl","getDynamicOffers","tags","defaultProductType","productTypes","resultType","isCachedOffersRequest","productTypesDefinition","partnersOverrideDefinition","context","offers","rateTableUuid","isError","leadUuid","errorCode","getOffersByProductTypes","isEmpty","fallbackResult","sortedOffers","selectDynamicOffers","sortOffersByRecommendationScore","pipe","formatOfferUrl","addClientTagsToOfferLinks","exports"],"sourceRoot":"../../../src","sources":["services/getDynamicOffers.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AASA,IAAAE,gCAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;
|
|
1
|
+
{"version":3,"names":["_radash","require","_utils","_sortOffersByRecommendationScore","_effect","_formatOfferUrl","getDynamicOffers","tags","defaultProductType","productTypes","resultType","isCachedOffersRequest","productTypesDefinition","partnersOverrideDefinition","context","userData","offers","rateTableUuid","isError","leadUuid","errorCode","getOffersByProductTypes","isEmpty","fallbackResult","sortedOffers","selectDynamicOffers","sortOffersByRecommendationScore","pipe","formatOfferUrl","addClientTagsToOfferLinks","exports"],"sourceRoot":"../../../src","sources":["services/getDynamicOffers.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AASA,IAAAE,gCAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AA2BA;AACA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EAAEA,QAAQ;IAClBF;EACD,CAAC;AACF,CAAC;AAACa,OAAA,CAAAxB,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -13,13 +13,15 @@ var _contextUtil = require("../capabilities/offer-catalog/src/utils/contextUtil"
|
|
|
13
13
|
* @param {boolean} params.isCachedOffersRequest - Indicates if the offers should be retrieved from the cache.
|
|
14
14
|
* @param {string[]} params.productTypes - The product types to retrieve offers for.
|
|
15
15
|
* @param {string} params.tags - The tags to use for retrieving offers.
|
|
16
|
+
* @param {UserData} params.userData - Optional user data.
|
|
16
17
|
* @returns {Promise<OffersData>} A promise that resolves to an array of offers or undefined if no offers are found.
|
|
17
18
|
*/
|
|
18
19
|
const getOffersByProductTypes = async ({
|
|
19
20
|
isCachedOffersRequest,
|
|
20
21
|
productTypes,
|
|
21
22
|
tags,
|
|
22
|
-
context
|
|
23
|
+
context,
|
|
24
|
+
userData
|
|
23
25
|
}) => {
|
|
24
26
|
if (isCachedOffersRequest) {
|
|
25
27
|
const {
|
|
@@ -43,7 +45,7 @@ const getOffersByProductTypes = async ({
|
|
|
43
45
|
isError,
|
|
44
46
|
leadUuid,
|
|
45
47
|
errorCode
|
|
46
|
-
} = await (0, _offerCatalogApi.getOffersForProductTypes)(context)(productTypes, (0, _contextUtil.parseClientTags)(tags));
|
|
48
|
+
} = await (0, _offerCatalogApi.getOffersForProductTypes)(context)(productTypes, (0, _contextUtil.parseClientTags)(tags), userData);
|
|
47
49
|
return {
|
|
48
50
|
offers,
|
|
49
51
|
rateTableUuid: uuid,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_offerCatalogApi","require","_contextUtil","getOffersByProductTypes","isCachedOffersRequest","productTypes","tags","context","offers","uuid","isError","leadUuid","errorCode","getCachedOffersByProductTypes","rateTableUuid","getOffersForProductTypes","parseClientTags","exports"],"sourceRoot":"../../../src","sources":["utils/getOffersByProductTypes.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"names":["_offerCatalogApi","require","_contextUtil","getOffersByProductTypes","isCachedOffersRequest","productTypes","tags","context","userData","offers","uuid","isError","leadUuid","errorCode","getCachedOffersByProductTypes","rateTableUuid","getOffersForProductTypes","parseClientTags","exports"],"sourceRoot":"../../../src","sources":["utils/getOffersByProductTypes.ts"],"mappings":";;;;;;AAEA,IAAAA,gBAAA,GAAAC,OAAA;AAIA,IAAAC,YAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,uBAAuB,GAAG,MAAAA,CAAO;EAC7CC,qBAAqB;EACrBC,YAAY;EACZC,IAAI;EACJC,OAAO;EACPC;AAOD,CAAC,KAAK;EACL,IAAIJ,qBAAqB,EAAE;IAC1B,MAAM;MAAEK,MAAM;MAAEC,IAAI;MAAEC,OAAO;MAAEC,QAAQ;MAAEC;IAAU,CAAC,GACnD,MAAM,IAAAC,8CAA6B,EAACP,OAAO,CAAC,CAACF,YAAY,CAAC;IAE3D,OAAO;MAAEI,MAAM;MAAEM,aAAa,EAAEL,IAAI;MAAEC,OAAO;MAAEC,QAAQ;MAAEC;IAAU,CAAC;EACrE;EAEA,MAAM;IAAEJ,MAAM;IAAEC,IAAI;IAAEC,OAAO;IAAEC,QAAQ;IAAEC;EAAU,CAAC,GACnD,MAAM,IAAAG,yCAAwB,EAACT,OAAO,CAAC,CACtCF,YAAY,EACZ,IAAAY,4BAAe,EAACX,IAAI,CAAC,EACrBE,QACD,CAAC;EAEF,OAAO;IAAEC,MAAM;IAAEM,aAAa,EAAEL,IAAI;IAAEC,OAAO;IAAEC,QAAQ;IAAEC;EAAU,CAAC;AACrE,CAAC;AAACK,OAAA,CAAAf,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../src","sources":["capabilities/configuration/src/userData/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -60,7 +60,7 @@ export const getCachedOffersByProductTypes = context => async productTypes => {
|
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
|
-
export const getOffersForProductTypes = context => async (productTypes, customClientTags) => {
|
|
63
|
+
export const getOffersForProductTypes = context => async (productTypes, customClientTags, userData) => {
|
|
64
64
|
// const offersFromProductTypesLogger = pinoRootLogger.child({
|
|
65
65
|
// name: "offersFromProductTypesLogger",
|
|
66
66
|
// });
|
|
@@ -69,9 +69,19 @@ export const getOffersForProductTypes = context => async (productTypes, customCl
|
|
|
69
69
|
const token = getSubaccountToken(context);
|
|
70
70
|
const leadUuid = getLeadUUID(context);
|
|
71
71
|
const isDev = getIsDevEnvironment(context);
|
|
72
|
+
const userEmail = userData === null || userData === void 0 ? void 0 : userData.email;
|
|
73
|
+
const userInformation = {
|
|
74
|
+
// If no email passed, do not include in the payload
|
|
75
|
+
...(Boolean(userEmail) && {
|
|
76
|
+
email: userEmail
|
|
77
|
+
})
|
|
78
|
+
};
|
|
72
79
|
let fields = {
|
|
73
80
|
productTypes,
|
|
74
|
-
clientTags: customClientTags
|
|
81
|
+
clientTags: customClientTags,
|
|
82
|
+
personalInformation: {
|
|
83
|
+
...userInformation
|
|
84
|
+
}
|
|
75
85
|
};
|
|
76
86
|
try {
|
|
77
87
|
const stateCode = getStateCode(context);
|
|
@@ -80,7 +90,8 @@ export const getOffersForProductTypes = context => async (productTypes, customCl
|
|
|
80
90
|
productTypes,
|
|
81
91
|
clientTags: customClientTags,
|
|
82
92
|
personalInformation: {
|
|
83
|
-
state: stateCode
|
|
93
|
+
state: stateCode,
|
|
94
|
+
...userInformation
|
|
84
95
|
}
|
|
85
96
|
});
|
|
86
97
|
} catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isEmpty","getIsDevEnvironment","getLeadUUID","getStateCode","getSubAccountUUID","getSubaccountToken","errorUtil","withDeviceSignals","getOfferCatalogApiBaseUrl","getCachedOffersByProductTypes","context","productTypes","subAccountUuid","isDev","url","URL","searchParams","append","join","response","fetch","toString","method","headers","logFormat","status","statusText","ok","errorMessage","getErrorMessageForResponseStatus","console","error","Error","code","offersData","json","offers","getErrorForOffersFromProductTypes","errorCode","isError","leadUuid","uuid","getOffersForProductTypes","customClientTags","token","fields","clientTags","
|
|
1
|
+
{"version":3,"names":["isEmpty","getIsDevEnvironment","getLeadUUID","getStateCode","getSubAccountUUID","getSubaccountToken","errorUtil","withDeviceSignals","getOfferCatalogApiBaseUrl","getCachedOffersByProductTypes","context","productTypes","subAccountUuid","isDev","url","URL","searchParams","append","join","response","fetch","toString","method","headers","logFormat","status","statusText","ok","errorMessage","getErrorMessageForResponseStatus","console","error","Error","code","offersData","json","offers","getErrorForOffersFromProductTypes","errorCode","isError","leadUuid","uuid","getOffersForProductTypes","customClientTags","userData","token","userEmail","email","userInformation","Boolean","fields","clientTags","personalInformation","stateCode","state","body","JSON","stringify"],"sourceRoot":"../../../../../../src","sources":["capabilities/offer-catalog/src/api/offerCatalogApi.ts"],"mappings":"AAAA,SAASA,OAAO,QAAQ,QAAQ;AAEhC,SACCC,mBAAmB,EACnBC,WAAW,EACXC,YAAY,EACZC,iBAAiB,EACjBC,kBAAkB,QACZ,sBAAsB;AAC7B,OAAOC,SAAS,MAAM,oBAAoB;AAE1C,SAASC,iBAAiB,QAAQ,mEAAmE;AACrG,SAASC,yBAAyB,QAAQ,4BAA4B;AAQtE,OAAO,MAAMC,6BAA6B,GACxCC,OAAmB,IAAK,MAAOC,YAAsB,IAAK;EAC1D;EACA;EACA;;EAEA,IAAI;IACH,MAAMC,cAAc,GAAGR,iBAAiB,CAACM,OAAO,CAAC;IACjD,MAAMG,KAAK,GAAGZ,mBAAmB,CAACS,OAAO,CAAC;IAE1C,MAAMI,GAAG,GAAG,IAAIC,GAAG,CAClB,GAAGP,yBAAyB,CAACK,KAAK,CAAC,6BACpC,CAAC;IAEDC,GAAG,CAACE,YAAY,CAACC,MAAM,CAAC,aAAa,EAAEN,YAAY,CAACO,IAAI,CAAC,GAA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CAAC;MAEtC,MAAMG,KAAK,GAAG,IAAIC,KAAK,CAACJ,YAAY,CAAa;MACjDG,KAAK,CAACE,IAAI,GAAGd,QAAQ,CAACM,MAAM;MAC5B,MAAMM,KAAK;IACZ;IAEA,OAAO;MAAE,GAAGG,UAAU;MAAEI,SAAS,EAAEnB,QAAQ,CAACM;IAAO,CAAC;EACrD,CAAC,CAAC,OAAOM,KAAK,EAAE;IACf,MAAMH,YAAY,GACjBtB,SAAS,CAAC+B,iCAAiC,CAAC,SAAS,CAAC;IACvDP,OAAO,CAACC,KAAK,CAACA,KAAK,EAAEH,YAAY,CAAC;IAElC,OAAO;MACNU,SAAS,EAAGP,KAAK,CAAcE,IAAI;MACnCM,OAAO,EAAE,IAAI;MACbC,QAAQ,EAAE,EAAE;MACZJ,MAAM,EAAE,EAAE;MACVK,IAAI,EAAE;IACP,CAAC;EACF;AACD,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useMemo","useState","localCnfContext","Text","getPageData","DynamicOffersContainer","DynamicOfferSkeleton","ThemeProvider","EventHandlerProvider","getConfigApiBaseUrl","ConfigurationProvider","getThemeColors","ErrorBoundary","getConfiguration","channel","zone","subAccountToken","isDev","onError","url","headers","Authorization","response","fetch","ok","errorCode","status","code","message","timestamp","Date","toISOString","Error","data","json","error","console","includes","InternalMoneyLionOfferCarousel","props","fontFamily","showDescriptionPoints","onLoad","title","subtitle","isDarkTheme","onInitialize","onRateTableSubmit","onRateTableResponse","onOfferDisplayInViewport","onOfferClick","onOfferDetailsPageOpen","onOfferDetailsPageClose","eventHandlers","context","setContext","isLoading","setIsLoading","setError","pageData","setPageData","fetchConfiguration","serializableContext","err","errorObj","fetchPageData","params","isError","Boolean","offers","rateTableUuid","leadUuid","length","themeColors","brand","reshapedThemeColors","createElement","shouldHideFooter","showProductTypeLabel","showCardBorder","config","MoneyLionOfferCarousel","fallbackUI","handleError"],"sourceRoot":"../../../src","sources":["components/MoneyLionOfferCarousel.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC3D,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,WAAW,QAAQ,aAAa;AACzC,SACCC,sBAAsB,EACtBC,oBAAoB,QACd,wCAAwC;AAE/C,SAASC,aAAa,QAAyB,0BAA0B;AACzE,SACCC,oBAAoB,QAEd,iCAAiC;AACxC,SAASC,mBAAmB,QAAQ,mBAAmB;AACvD,SAASC,qBAAqB,QAAQ,kCAAkC;AAExE,SAASC,cAAc,QAAQ,yBAAyB;
|
|
1
|
+
{"version":3,"names":["React","useEffect","useMemo","useState","localCnfContext","Text","getPageData","DynamicOffersContainer","DynamicOfferSkeleton","ThemeProvider","EventHandlerProvider","getConfigApiBaseUrl","ConfigurationProvider","getThemeColors","ErrorBoundary","getConfiguration","channel","zone","subAccountToken","isDev","onError","url","headers","Authorization","response","fetch","ok","errorCode","status","code","message","timestamp","Date","toISOString","Error","data","json","error","console","includes","InternalMoneyLionOfferCarousel","props","fontFamily","showDescriptionPoints","onLoad","title","subtitle","isDarkTheme","onInitialize","onRateTableSubmit","onRateTableResponse","onOfferDisplayInViewport","onOfferClick","onOfferDetailsPageOpen","onOfferDetailsPageClose","eventHandlers","context","setContext","isLoading","setIsLoading","setError","pageData","setPageData","fetchConfiguration","serializableContext","err","errorObj","fetchPageData","params","isError","Boolean","offers","rateTableUuid","leadUuid","length","themeColors","brand","reshapedThemeColors","createElement","shouldHideFooter","showProductTypeLabel","showCardBorder","config","MoneyLionOfferCarousel","fallbackUI","handleError"],"sourceRoot":"../../../src","sources":["components/MoneyLionOfferCarousel.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC3D,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,SAASC,IAAI,QAAQ,c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,aAAA,CAAClE,qBAAqB;IAAC+B,qBAAqB,EAAEA;EAAsB,gBACnE3C,KAAA,CAAA8E,aAAA,CAACvE,sBAAsB;IAAC2E,MAAM,EAAEA;EAAO,CAAE,CACnB,CACF,CACR,CAAC;AAElB,CAAC;AAED,OAAO,MAAMC,sBAAsB,GAClC1C,KAC4D,IACxD;EACJ,MAAM;IAAE2C,UAAU;IAAEhE;EAAQ,CAAC,GAAGqB,KAAK;EAErC,MAAM4C,WAAW,GAAIpB,GAAgB,IAAW;IAC/C7C,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAG6C,GAAG,CAAC;EACf,CAAC;EAED,oBACCjE,KAAA,CAAA8E,aAAA,CAAChE,aAAa;IAACsE,UAAU,EAAEA,UAAW;IAAChE,OAAO,EAAEiE;EAAY,gBAC3DrF,KAAA,CAAA8E,aAAA,CAACtC,8BAA8B,EAAKC,KAAQ,CAC9B,CAAC;AAElB,CAAC","ignoreList":[]}
|
package/lib/module/pageData.js
CHANGED
|
@@ -14,7 +14,8 @@ export async function getPageData({
|
|
|
14
14
|
tags,
|
|
15
15
|
searchAPIToken,
|
|
16
16
|
showProductTypeLabel,
|
|
17
|
-
showCardBorder
|
|
17
|
+
showCardBorder,
|
|
18
|
+
userData
|
|
18
19
|
} = params;
|
|
19
20
|
|
|
20
21
|
// Resolve Tags
|
|
@@ -66,7 +67,8 @@ export async function getPageData({
|
|
|
66
67
|
productTypesDefinition: [...productTypesDefinition],
|
|
67
68
|
partnersOverrideDefinition: [...partnersOverrideDefinition],
|
|
68
69
|
context,
|
|
69
|
-
defaultProductType
|
|
70
|
+
defaultProductType,
|
|
71
|
+
userData
|
|
70
72
|
});
|
|
71
73
|
return {
|
|
72
74
|
isError,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getIsDevEnvironment","getDynamicOffers","getDefaultProductType","getProductTypesDefinition","resolveProductTypes","getEnableUseCachedOffers","getPageData","context","params","onRateTableSubmit","productType","query","tags","searchAPIToken","showProductTypeLabel","showCardBorder","resolvedTags","trim","isCachedOffersRequest","defaultProductType","isDev","productTypesDefinition","partnersOverrideDefinition","currentCountry","signals","deviceSignals","country","safeTags","encodeURI","productTypes","resultType","timestamp","Date","toISOString","offers","isError","leadUuid","rateTableUuid","errorCode"],"sourceRoot":"../../src","sources":["pageData.ts"],"mappings":"AACA,SAASA,mBAAmB,QAAQ,oDAAoD;AAIxF,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D;AACA,SACCC,qBAAqB,EACrBC,yBAAyB,EACzBC,mBAAmB,QACb,SAAS;AAChB,SAASC,wBAAwB,QAAQ,kCAAkC;AAQ3E,OAAO,eAAeC,WAAWA,CAAC;EACjCC,OAAO;EACPC,MAAM;EACNC;AACiB,CAAC,EAAE;EACpB,MAAM;IACLC,WAAW;IACXC,KAAK;IACLC,IAAI;IACJC,cAAc;IACdC,oBAAoB;IACpBC;EACD,CAAC,
|
|
1
|
+
{"version":3,"names":["getIsDevEnvironment","getDynamicOffers","getDefaultProductType","getProductTypesDefinition","resolveProductTypes","getEnableUseCachedOffers","getPageData","context","params","onRateTableSubmit","productType","query","tags","searchAPIToken","showProductTypeLabel","showCardBorder","userData","resolvedTags","trim","isCachedOffersRequest","defaultProductType","isDev","productTypesDefinition","partnersOverrideDefinition","currentCountry","signals","deviceSignals","country","safeTags","encodeURI","productTypes","resultType","timestamp","Date","toISOString","offers","isError","leadUuid","rateTableUuid","errorCode"],"sourceRoot":"../../src","sources":["pageData.ts"],"mappings":"AACA,SAASA,mBAAmB,QAAQ,oDAAoD;AAIxF,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D;AACA,SACCC,qBAAqB,EACrBC,yBAAyB,EACzBC,mBAAmB,QACb,SAAS;AAChB,SAASC,wBAAwB,QAAQ,kCAAkC;AAQ3E,OAAO,eAAeC,WAAWA,CAAC;EACjCC,OAAO;EACPC,MAAM;EACNC;AACiB,CAAC,EAAE;EACpB,MAAM;IACLC,WAAW;IACXC,KAAK;IACLC,IA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;EACD,CAAC,CAAC;EAEH,OAAO;IACNoB,OAAO;IACPG,SAAS;IACTF,QAAQ;IACRC,aAAa;IACb;IACAH,MAAM;IACNX,cAAc;IACd;IACAT,cAAc;IACd;IACAD;EACD,CAAC;AACF","ignoreList":[]}
|
|
@@ -17,7 +17,8 @@ export const getDynamicOffers = async ({
|
|
|
17
17
|
isCachedOffersRequest,
|
|
18
18
|
productTypesDefinition,
|
|
19
19
|
partnersOverrideDefinition,
|
|
20
|
-
context
|
|
20
|
+
context,
|
|
21
|
+
userData
|
|
21
22
|
}) => {
|
|
22
23
|
// Get the initial offers
|
|
23
24
|
let {
|
|
@@ -30,7 +31,8 @@ export const getDynamicOffers = async ({
|
|
|
30
31
|
isCachedOffersRequest,
|
|
31
32
|
productTypes,
|
|
32
33
|
tags,
|
|
33
|
-
context
|
|
34
|
+
context,
|
|
35
|
+
userData
|
|
34
36
|
});
|
|
35
37
|
|
|
36
38
|
// If no offers found, fall back to the default product type
|
|
@@ -39,7 +41,8 @@ export const getDynamicOffers = async ({
|
|
|
39
41
|
isCachedOffersRequest,
|
|
40
42
|
productTypes: [defaultProductType],
|
|
41
43
|
tags,
|
|
42
|
-
context
|
|
44
|
+
context,
|
|
45
|
+
userData
|
|
43
46
|
});
|
|
44
47
|
|
|
45
48
|
// Update the offers, rateTableUuid, isError, leafUuid and productTypes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["isEmpty","addClientTagsToOfferLinks","getOffersByProductTypes","selectDynamicOffers","sortOffersByRecommendationScore","pipe","formatOfferUrl","getDynamicOffers","tags","defaultProductType","productTypes","resultType","isCachedOffersRequest","productTypesDefinition","partnersOverrideDefinition","context","offers","rateTableUuid","isError","leadUuid","errorCode","fallbackResult","sortedOffers"],"sourceRoot":"../../../src","sources":["services/getDynamicOffers.ts"],"mappings":"AAAA,SAASA,OAAO,QAAQ,QAAQ;AAChC,SACCC,yBAAyB,EACzBC,uBAAuB,EACvBC,mBAAmB,QACb,UAAU;AAKjB,SAASC,+BAA+B,QAAQ,0CAA0C;AAC1F,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,cAAc,QAAQ,yBAAyB;
|
|
1
|
+
{"version":3,"names":["isEmpty","addClientTagsToOfferLinks","getOffersByProductTypes","selectDynamicOffers","sortOffersByRecommendationScore","pipe","formatOfferUrl","getDynamicOffers","tags","defaultProductType","productTypes","resultType","isCachedOffersRequest","productTypesDefinition","partnersOverrideDefinition","context","userData","offers","rateTableUuid","isError","leadUuid","errorCode","fallbackResult","sortedOffers"],"sourceRoot":"../../../src","sources":["services/getDynamicOffers.ts"],"mappings":"AAAA,SAASA,OAAO,QAAQ,QAAQ;AAChC,SACCC,yBAAyB,EACzBC,uBAAuB,EACvBC,mBAAmB,QACb,UAAU;AAKjB,SAASC,+BAA+B,QAAQ,0CAA0C;AAC1F,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,cAAc,QAAQ,yBAAyB;AA2BxD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,GAAG,MAAAA,CAAO;EACtCC,IAAI;EACJC,kBAAkB;EAClBC,YAAY;EACZC,UAAU;EACVC,qBAAqB;EACrBC,sBAAsB;EACtBC,0BAA0B;EAC1BC,OAAO;EACPC;AACqC,CAAC,KAAK;EAC3C;EACA,IAAI;IAAEC,MAAM;IAAEC,aAAa;IAAEC,OAAO;IAAEC,QAAQ;IAAEC;EAAU,CAAC,GAC1D,MAAMnB,uBAAuB,CAAC;IAC7BU,qBAAqB;IACrBF,YAAY;IACZF,IAAI;IACJO,OAAO;IACPC;EACD,CAAC,CAAC;;EAEH;EACA,IAAIhB,OAAO,CAACiB,MAAM,CAAC,EAAE;IACpB,MAAMK,cAAc,GAAG,MAAMpB,uBAAuB,CAAC;MACpDU,qBAAqB;MACrBF,YAAY,EAAE,CAACD,kBAAkB,CAAC;MAClCD,IAAI;MACJO,OAAO;MACPC;IACD,CAAC,CAAC;;IAEF;IACAC,MAAM,GAAGK,cAAc,CAACL,MAAM;IAC9BC,aAAa,GAAGI,cAAc,CAACJ,aAAa;IAC5CC,OAAO,GAAGG,cAAc,CAACH,OAAO;IAChCC,QAAQ,GAAGE,cAAc,CAACF,QAAQ;IAClCV,YAAY,GAAG,CAACD,kBAAkB,CAAC;IACnCY,SAAS,GAAGC,cAAc,CAACD,SAAS;EACrC;EAEA,MAAME,YAAY,GACjBZ,UAAU,KAAK,OAAO,GACnBR,mBAAmB,CAACc,MAAM,EAAEP,YAAY,CAAC,GACzCN,+BAA+B,CAACa,MAAM,CAAC;EAE3C,OAAO;IACNA,MAAM,EAAEZ,IAAI,CACXkB,YAAY,EACZjB,cAAc,CAACO,sBAAsB,EAAEC,0BAA0B,CAAC,EAClEb,yBAAyB,CAACW,qBAAqB,EAAEJ,IAAI,CAAC,EACtDJ,+BACD,CAAC;IACDe,OAAO;IACPE,SAAS;IACTD,QAAQ,EAAEA,QAAQ;IAClBF;EACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -8,13 +8,15 @@ import { parseClientTags } from "../capabilities/offer-catalog/src/utils/context
|
|
|
8
8
|
* @param {boolean} params.isCachedOffersRequest - Indicates if the offers should be retrieved from the cache.
|
|
9
9
|
* @param {string[]} params.productTypes - The product types to retrieve offers for.
|
|
10
10
|
* @param {string} params.tags - The tags to use for retrieving offers.
|
|
11
|
+
* @param {UserData} params.userData - Optional user data.
|
|
11
12
|
* @returns {Promise<OffersData>} A promise that resolves to an array of offers or undefined if no offers are found.
|
|
12
13
|
*/
|
|
13
14
|
export const getOffersByProductTypes = async ({
|
|
14
15
|
isCachedOffersRequest,
|
|
15
16
|
productTypes,
|
|
16
17
|
tags,
|
|
17
|
-
context
|
|
18
|
+
context,
|
|
19
|
+
userData
|
|
18
20
|
}) => {
|
|
19
21
|
if (isCachedOffersRequest) {
|
|
20
22
|
const {
|
|
@@ -38,7 +40,7 @@ export const getOffersByProductTypes = async ({
|
|
|
38
40
|
isError,
|
|
39
41
|
leadUuid,
|
|
40
42
|
errorCode
|
|
41
|
-
} = await getOffersForProductTypes(context)(productTypes, parseClientTags(tags));
|
|
43
|
+
} = await getOffersForProductTypes(context)(productTypes, parseClientTags(tags), userData);
|
|
42
44
|
return {
|
|
43
45
|
offers,
|
|
44
46
|
rateTableUuid: uuid,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getCachedOffersByProductTypes","getOffersForProductTypes","parseClientTags","getOffersByProductTypes","isCachedOffersRequest","productTypes","tags","context","offers","uuid","isError","leadUuid","errorCode","rateTableUuid"],"sourceRoot":"../../../src","sources":["utils/getOffersByProductTypes.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["getCachedOffersByProductTypes","getOffersForProductTypes","parseClientTags","getOffersByProductTypes","isCachedOffersRequest","productTypes","tags","context","userData","offers","uuid","isError","leadUuid","errorCode","rateTableUuid"],"sourceRoot":"../../../src","sources":["utils/getOffersByProductTypes.ts"],"mappings":"AAEA,SACCA,6BAA6B,EAC7BC,wBAAwB,QAClB,uDAAuD;AAC9D,SAASC,eAAe,QAAQ,qDAAqD;;AAErF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,MAAAA,CAAO;EAC7CC,qBAAqB;EACrBC,YAAY;EACZC,IAAI;EACJC,OAAO;EACPC;AAOD,CAAC,KAAK;EACL,IAAIJ,qBAAqB,EAAE;IAC1B,MAAM;MAAEK,MAAM;MAAEC,IAAI;MAAEC,OAAO;MAAEC,QAAQ;MAAEC;IAAU,CAAC,GACnD,MAAMb,6BAA6B,CAACO,OAAO,CAAC,CAACF,YAAY,CAAC;IAE3D,OAAO;MAAEI,MAAM;MAAEK,aAAa,EAAEJ,IAAI;MAAEC,OAAO;MAAEC,QAAQ;MAAEC;IAAU,CAAC;EACrE;EAEA,MAAM;IAAEJ,MAAM;IAAEC,IAAI;IAAEC,OAAO;IAAEC,QAAQ;IAAEC;EAAU,CAAC,GACnD,MAAMZ,wBAAwB,CAACM,OAAO,CAAC,CACtCF,YAAY,EACZH,eAAe,CAACI,IAAI,CAAC,EACrBE,QACD,CAAC;EAEF,OAAO;IAAEC,MAAM;IAAEK,aAAa,EAAEJ,IAAI;IAAEC,OAAO;IAAEC,QAAQ;IAAEC;EAAU,CAAC;AACrE,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/capabilities/configuration/src/userData/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { OffersData } from "../types/offerCatalogSchema";
|
|
2
|
+
import type { UserData } from "../../../configuration/src/userData/types";
|
|
2
3
|
import type { CnfContext } from "../../../core/src/system/cnfContext/CnfContext";
|
|
3
4
|
export declare const getCachedOffersByProductTypes: (context: CnfContext) => (productTypes: string[]) => Promise<{
|
|
4
5
|
errorCode: number;
|
|
@@ -14,5 +15,5 @@ export declare const getCachedOffersByProductTypes: (context: CnfContext) => (pr
|
|
|
14
15
|
offers: never[];
|
|
15
16
|
uuid: string;
|
|
16
17
|
}>;
|
|
17
|
-
export declare const getOffersForProductTypes: (context: CnfContext) => (productTypes: string[], customClientTags?: Record<string, string[]
|
|
18
|
+
export declare const getOffersForProductTypes: (context: CnfContext) => (productTypes: string[], customClientTags?: Record<string, string[]>, userData?: UserData) => Promise<OffersData>;
|
|
18
19
|
//# sourceMappingURL=offerCatalogApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"offerCatalogApi.d.ts","sourceRoot":"","sources":["../../../../../../../src/capabilities/offer-catalog/src/api/offerCatalogApi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAY9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gDAAgD,CAAC;AAMjF,eAAO,MAAM,6BAA6B,YAC/B,UAAU,oBAA0B,MAAM,EAAE;;;;;;;;;;;;;EAsErD,CAAC;AAEH,eAAO,MAAM,wBAAwB,YAC1B,UAAU,oBAEL,MAAM,EAAE,qBACH,OAAO,MAAM,EAAE,MAAM,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"offerCatalogApi.d.ts","sourceRoot":"","sources":["../../../../../../../src/capabilities/offer-catalog/src/api/offerCatalogApi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAY9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gDAAgD,CAAC;AAMjF,eAAO,MAAM,6BAA6B,YAC/B,UAAU,oBAA0B,MAAM,EAAE;;;;;;;;;;;;;EAsErD,CAAC;AAEH,eAAO,MAAM,wBAAwB,YAC1B,UAAU,oBAEL,MAAM,EAAE,qBACH,OAAO,MAAM,EAAE,MAAM,EAAE,CAAC,aAChC,QAAQ,KACjB,QAAQ,UAAU,CAuGpB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { type FontFamily } from "../context/ThemeProvider";
|
|
3
3
|
import { type EventHandlerContextType } from "../context/EventHandlerProvider";
|
|
4
|
+
import type { UserData } from "../capabilities/configuration/src/userData/types";
|
|
4
5
|
export type CustomError = {
|
|
5
6
|
code?: number;
|
|
6
7
|
message: string;
|
|
@@ -26,6 +27,7 @@ export type MoneyLionOfferCarouselProps = {
|
|
|
26
27
|
fallbackUI?: React.ReactNode;
|
|
27
28
|
onError?: (error: CustomError) => void;
|
|
28
29
|
onLoad?: (numOffers: number) => void;
|
|
30
|
+
userData?: UserData;
|
|
29
31
|
};
|
|
30
32
|
export declare const MoneyLionOfferCarousel: (props: MoneyLionOfferCarouselProps & Omit<EventHandlerContextType, "rateTableUuid" | "leadUuid">) => React.JSX.Element;
|
|
31
33
|
//# sourceMappingURL=MoneyLionOfferCarousel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoneyLionOfferCarousel.d.ts","sourceRoot":"","sources":["../../../../src/components/MoneyLionOfferCarousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAS5D,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAEN,KAAK,uBAAuB,EAC5B,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"MoneyLionOfferCarousel.d.ts","sourceRoot":"","sources":["../../../../src/components/MoneyLionOfferCarousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAS5D,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAEN,KAAK,uBAAuB,EAC5B,MAAM,iCAAiC,CAAC;AAKzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kDAAkD,CAAC;AAIjF,MAAM,MAAM,WAAW,GAAG;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACjC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IACvC,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACpB,CAAC;AA+PF,eAAO,MAAM,sBAAsB,UAC3B,2BAA2B,GACjC,KAAK,uBAAuB,EAAE,eAAe,GAAG,UAAU,CAAC,sBAa5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AAEpD,YAAY,EAAE,QAAQ,EAAE,MAAM,iDAAiD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pageData.d.ts","sourceRoot":"","sources":["../../../src/pageData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sDAAsD,CAAC;AAGvF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AACvF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAU7E,KAAK,gBAAgB,GAAG;IACvB,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,EAAE,2BAA2B,CAAC;IACpC,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,IAAI,CAAC;CAC5D,CAAC;AAEF,wBAAsB,WAAW,CAAC,EACjC,OAAO,EACP,MAAM,EACN,iBAAiB,GACjB,EAAE,gBAAgB;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"pageData.d.ts","sourceRoot":"","sources":["../../../src/pageData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sDAAsD,CAAC;AAGvF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AACvF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAU7E,KAAK,gBAAgB,GAAG;IACvB,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,EAAE,2BAA2B,CAAC;IACpC,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,IAAI,CAAC;CAC5D,CAAC;AAEF,wBAAsB,WAAW,CAAC,EACjC,OAAO,EACP,MAAM,EACN,iBAAiB,GACjB,EAAE,gBAAgB;;;;;;;;;GAyElB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { GetProductTypesProps, ProductTypesResult } from "./getProductTypes";
|
|
2
2
|
import type { PartnerOverride, ProductTypeDefinition } from "../capabilities/offer-catalog/src";
|
|
3
|
+
import type { UserData } from "../capabilities/configuration/src/userData/types";
|
|
3
4
|
import type { CnfContext } from "../capabilities/core/src/system/cnfContext/CnfContext";
|
|
4
5
|
export type GetDynamicOffersProps = {
|
|
5
6
|
tags: string;
|
|
@@ -9,6 +10,7 @@ export type GetDynamicOffersProps = {
|
|
|
9
10
|
productTypesDefinition: ProductTypeDefinition[];
|
|
10
11
|
partnersOverrideDefinition: PartnerOverride[];
|
|
11
12
|
context: CnfContext;
|
|
13
|
+
userData?: UserData;
|
|
12
14
|
} & Omit<GetProductTypesProps, "context" | "productTypeOrUrl" | "query" | "isDevMode" | "referrer" | "searchAPIToken">;
|
|
13
15
|
/**
|
|
14
16
|
* Retrieves dynamic offers based on the provided parameters.
|
|
@@ -16,7 +18,7 @@ export type GetDynamicOffersProps = {
|
|
|
16
18
|
* @param {GetDynamicOffersProps} params - The parameters for retrieving dynamic offers.
|
|
17
19
|
* @returns {Promise<{ productTypeDisplayName: string; offers: typeof offers }>} An object containing the product type display name and the offers.
|
|
18
20
|
*/
|
|
19
|
-
export declare const getDynamicOffers: ({ tags, defaultProductType, productTypes, resultType, isCachedOffersRequest, productTypesDefinition, partnersOverrideDefinition, context, }: Omit<GetDynamicOffersProps, "isDev">) => Promise<{
|
|
21
|
+
export declare const getDynamicOffers: ({ tags, defaultProductType, productTypes, resultType, isCachedOffersRequest, productTypesDefinition, partnersOverrideDefinition, context, userData, }: Omit<GetDynamicOffersProps, "isDev">) => Promise<{
|
|
20
22
|
offers: import("../capabilities/offer-catalog/src").BaseOffer[];
|
|
21
23
|
isError: boolean | undefined;
|
|
22
24
|
errorCode: number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDynamicOffers.d.ts","sourceRoot":"","sources":["../../../../src/services/getDynamicOffers.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACX,oBAAoB,EACpB,kBAAkB,EAClB,MAAM,mBAAmB,CAAC;AAI3B,OAAO,KAAK,EACX,eAAe,EACf,qBAAqB,EACrB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uDAAuD,CAAC;AAExF,MAAM,MAAM,qBAAqB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC;IAC7C,qBAAqB,EAAE,OAAO,CAAC;IAC/B,sBAAsB,EAAE,qBAAqB,EAAE,CAAC;IAChD,0BAA0B,EAAE,eAAe,EAAE,CAAC;IAC9C,OAAO,EAAE,UAAU,CAAC;CACpB,GAAG,IAAI,CACP,oBAAoB,EAClB,SAAS,GACT,kBAAkB,GAClB,OAAO,GACP,WAAW,GACX,UAAU,GACV,gBAAgB,CAClB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"getDynamicOffers.d.ts","sourceRoot":"","sources":["../../../../src/services/getDynamicOffers.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACX,oBAAoB,EACpB,kBAAkB,EAClB,MAAM,mBAAmB,CAAC;AAI3B,OAAO,KAAK,EACX,eAAe,EACf,qBAAqB,EACrB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kDAAkD,CAAC;AACjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uDAAuD,CAAC;AAExF,MAAM,MAAM,qBAAqB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC;IAC7C,qBAAqB,EAAE,OAAO,CAAC;IAC/B,sBAAsB,EAAE,qBAAqB,EAAE,CAAC;IAChD,0BAA0B,EAAE,eAAe,EAAE,CAAC;IAC9C,OAAO,EAAE,UAAU,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACpB,GAAG,IAAI,CACP,oBAAoB,EAClB,SAAS,GACT,kBAAkB,GAClB,OAAO,GACP,WAAW,GACX,UAAU,GACV,gBAAgB,CAClB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,0JAU1B,KAAK,qBAAqB,EAAE,OAAO,CAAC;;;;;;EA+CtC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { UserData } from "../capabilities/configuration/src/userData/types";
|
|
1
2
|
import type { CnfContext } from "../capabilities/core/src/system/cnfContext/CnfContext";
|
|
2
3
|
/**
|
|
3
4
|
* Retrieves offers by product types.
|
|
@@ -6,13 +7,15 @@ import type { CnfContext } from "../capabilities/core/src/system/cnfContext/CnfC
|
|
|
6
7
|
* @param {boolean} params.isCachedOffersRequest - Indicates if the offers should be retrieved from the cache.
|
|
7
8
|
* @param {string[]} params.productTypes - The product types to retrieve offers for.
|
|
8
9
|
* @param {string} params.tags - The tags to use for retrieving offers.
|
|
10
|
+
* @param {UserData} params.userData - Optional user data.
|
|
9
11
|
* @returns {Promise<OffersData>} A promise that resolves to an array of offers or undefined if no offers are found.
|
|
10
12
|
*/
|
|
11
|
-
export declare const getOffersByProductTypes: ({ isCachedOffersRequest, productTypes, tags, context, }: {
|
|
13
|
+
export declare const getOffersByProductTypes: ({ isCachedOffersRequest, productTypes, tags, context, userData, }: {
|
|
12
14
|
isCachedOffersRequest: boolean;
|
|
13
15
|
productTypes: string[];
|
|
14
16
|
tags: string;
|
|
15
17
|
context: CnfContext;
|
|
18
|
+
userData?: UserData | undefined;
|
|
16
19
|
}) => Promise<{
|
|
17
20
|
offers: never[] | import("../capabilities/offer-catalog/src").BaseOffer[];
|
|
18
21
|
rateTableUuid: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getOffersByProductTypes.d.ts","sourceRoot":"","sources":["../../../../src/utils/getOffersByProductTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uDAAuD,CAAC;AAOxF
|
|
1
|
+
{"version":3,"file":"getOffersByProductTypes.d.ts","sourceRoot":"","sources":["../../../../src/utils/getOffersByProductTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kDAAkD,CAAC;AACjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uDAAuD,CAAC;AAOxF;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB;2BAOZ,OAAO;kBAChB,MAAM,EAAE;UAChB,MAAM;aACH,UAAU;;;;;;;;EAkBnB,CAAC"}
|
package/package.json
CHANGED
|
@@ -11,6 +11,7 @@ import errorUtil from "../utils/errorUtil";
|
|
|
11
11
|
import type { State } from "../../../offers/pipeline/src/sources/ratetables/types";
|
|
12
12
|
import { withDeviceSignals } from "../../../offers/pipeline/src/sources/ratetables/withDeviceSignals";
|
|
13
13
|
import { getOfferCatalogApiBaseUrl } from "../../../../apiEnvironment";
|
|
14
|
+
import type { UserData } from "../../../configuration/src/userData/types";
|
|
14
15
|
import type { CnfContext } from "../../../core/src/system/cnfContext/CnfContext";
|
|
15
16
|
|
|
16
17
|
interface ApiError extends Error {
|
|
@@ -94,7 +95,8 @@ export const getOffersForProductTypes =
|
|
|
94
95
|
(context: CnfContext) =>
|
|
95
96
|
async (
|
|
96
97
|
productTypes: string[],
|
|
97
|
-
customClientTags?: Record<string, string[]
|
|
98
|
+
customClientTags?: Record<string, string[]>,
|
|
99
|
+
userData?: UserData
|
|
98
100
|
): Promise<OffersData> => {
|
|
99
101
|
// const offersFromProductTypesLogger = pinoRootLogger.child({
|
|
100
102
|
// name: "offersFromProductTypesLogger",
|
|
@@ -105,9 +107,18 @@ export const getOffersForProductTypes =
|
|
|
105
107
|
const leadUuid = getLeadUUID(context);
|
|
106
108
|
const isDev = getIsDevEnvironment(context);
|
|
107
109
|
|
|
110
|
+
const userEmail = userData?.email;
|
|
111
|
+
const userInformation = {
|
|
112
|
+
// If no email passed, do not include in the payload
|
|
113
|
+
...(Boolean(userEmail) && { email: userEmail }),
|
|
114
|
+
};
|
|
115
|
+
|
|
108
116
|
let fields = {
|
|
109
117
|
productTypes,
|
|
110
118
|
clientTags: customClientTags,
|
|
119
|
+
personalInformation: {
|
|
120
|
+
...userInformation,
|
|
121
|
+
},
|
|
111
122
|
};
|
|
112
123
|
|
|
113
124
|
try {
|
|
@@ -116,7 +127,10 @@ export const getOffersForProductTypes =
|
|
|
116
127
|
fields = withDeviceSignals(context, {
|
|
117
128
|
productTypes,
|
|
118
129
|
clientTags: customClientTags,
|
|
119
|
-
personalInformation: {
|
|
130
|
+
personalInformation: {
|
|
131
|
+
state: stateCode as State,
|
|
132
|
+
...userInformation,
|
|
133
|
+
},
|
|
120
134
|
});
|
|
121
135
|
} catch (error) {
|
|
122
136
|
// handle error if context is not available. This scenario should not occur in production
|
|
@@ -16,6 +16,7 @@ import { getConfigApiBaseUrl } from "../apiEnvironment";
|
|
|
16
16
|
import { ConfigurationProvider } from "../context/ConfigurationProvider";
|
|
17
17
|
import type { CnfContext } from "../capabilities/core/src/system/cnfContext/CnfContext";
|
|
18
18
|
import { getThemeColors } from "../utils/getThemeColors";
|
|
19
|
+
import type { UserData } from "../capabilities/configuration/src/userData/types";
|
|
19
20
|
import type { ReshapedThemeColors } from "../capabilities/core/src";
|
|
20
21
|
import ErrorBoundary from "./ErrorBoundary";
|
|
21
22
|
|
|
@@ -45,6 +46,7 @@ export type MoneyLionOfferCarouselProps = {
|
|
|
45
46
|
fallbackUI?: React.ReactNode;
|
|
46
47
|
onError?: (error: CustomError) => void;
|
|
47
48
|
onLoad?: (numOffers: number) => void;
|
|
49
|
+
userData?: UserData;
|
|
48
50
|
};
|
|
49
51
|
|
|
50
52
|
const getConfiguration = async ({
|
package/src/index.tsx
CHANGED
package/src/pageData.ts
CHANGED
|
@@ -30,6 +30,7 @@ export async function getPageData({
|
|
|
30
30
|
searchAPIToken,
|
|
31
31
|
showProductTypeLabel,
|
|
32
32
|
showCardBorder,
|
|
33
|
+
userData,
|
|
33
34
|
} = params;
|
|
34
35
|
|
|
35
36
|
// Resolve Tags
|
|
@@ -78,6 +79,7 @@ export async function getPageData({
|
|
|
78
79
|
partnersOverrideDefinition: [...partnersOverrideDefinition],
|
|
79
80
|
context,
|
|
80
81
|
defaultProductType,
|
|
82
|
+
userData,
|
|
81
83
|
});
|
|
82
84
|
|
|
83
85
|
return {
|
|
@@ -15,6 +15,7 @@ import type {
|
|
|
15
15
|
PartnerOverride,
|
|
16
16
|
ProductTypeDefinition,
|
|
17
17
|
} from "../capabilities/offer-catalog/src";
|
|
18
|
+
import type { UserData } from "../capabilities/configuration/src/userData/types";
|
|
18
19
|
import type { CnfContext } from "../capabilities/core/src/system/cnfContext/CnfContext";
|
|
19
20
|
|
|
20
21
|
export type GetDynamicOffersProps = {
|
|
@@ -25,6 +26,7 @@ export type GetDynamicOffersProps = {
|
|
|
25
26
|
productTypesDefinition: ProductTypeDefinition[];
|
|
26
27
|
partnersOverrideDefinition: PartnerOverride[];
|
|
27
28
|
context: CnfContext;
|
|
29
|
+
userData?: UserData;
|
|
28
30
|
} & Omit<
|
|
29
31
|
GetProductTypesProps,
|
|
30
32
|
| "context"
|
|
@@ -50,6 +52,7 @@ export const getDynamicOffers = async ({
|
|
|
50
52
|
productTypesDefinition,
|
|
51
53
|
partnersOverrideDefinition,
|
|
52
54
|
context,
|
|
55
|
+
userData,
|
|
53
56
|
}: Omit<GetDynamicOffersProps, "isDev">) => {
|
|
54
57
|
// Get the initial offers
|
|
55
58
|
let { offers, rateTableUuid, isError, leadUuid, errorCode } =
|
|
@@ -58,6 +61,7 @@ export const getDynamicOffers = async ({
|
|
|
58
61
|
productTypes,
|
|
59
62
|
tags,
|
|
60
63
|
context,
|
|
64
|
+
userData,
|
|
61
65
|
});
|
|
62
66
|
|
|
63
67
|
// If no offers found, fall back to the default product type
|
|
@@ -67,6 +71,7 @@ export const getDynamicOffers = async ({
|
|
|
67
71
|
productTypes: [defaultProductType],
|
|
68
72
|
tags,
|
|
69
73
|
context,
|
|
74
|
+
userData,
|
|
70
75
|
});
|
|
71
76
|
|
|
72
77
|
// Update the offers, rateTableUuid, isError, leafUuid and productTypes
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { UserData } from "../capabilities/configuration/src/userData/types";
|
|
1
2
|
import type { CnfContext } from "../capabilities/core/src/system/cnfContext/CnfContext";
|
|
2
3
|
import {
|
|
3
4
|
getCachedOffersByProductTypes,
|
|
@@ -12,6 +13,7 @@ import { parseClientTags } from "../capabilities/offer-catalog/src/utils/context
|
|
|
12
13
|
* @param {boolean} params.isCachedOffersRequest - Indicates if the offers should be retrieved from the cache.
|
|
13
14
|
* @param {string[]} params.productTypes - The product types to retrieve offers for.
|
|
14
15
|
* @param {string} params.tags - The tags to use for retrieving offers.
|
|
16
|
+
* @param {UserData} params.userData - Optional user data.
|
|
15
17
|
* @returns {Promise<OffersData>} A promise that resolves to an array of offers or undefined if no offers are found.
|
|
16
18
|
*/
|
|
17
19
|
export const getOffersByProductTypes = async ({
|
|
@@ -19,11 +21,13 @@ export const getOffersByProductTypes = async ({
|
|
|
19
21
|
productTypes,
|
|
20
22
|
tags,
|
|
21
23
|
context,
|
|
24
|
+
userData,
|
|
22
25
|
}: {
|
|
23
26
|
isCachedOffersRequest: boolean;
|
|
24
27
|
productTypes: string[];
|
|
25
28
|
tags: string;
|
|
26
29
|
context: CnfContext;
|
|
30
|
+
userData?: UserData;
|
|
27
31
|
}) => {
|
|
28
32
|
if (isCachedOffersRequest) {
|
|
29
33
|
const { offers, uuid, isError, leadUuid, errorCode } =
|
|
@@ -35,7 +39,8 @@ export const getOffersByProductTypes = async ({
|
|
|
35
39
|
const { offers, uuid, isError, leadUuid, errorCode } =
|
|
36
40
|
await getOffersForProductTypes(context)(
|
|
37
41
|
productTypes,
|
|
38
|
-
parseClientTags(tags)
|
|
42
|
+
parseClientTags(tags),
|
|
43
|
+
userData
|
|
39
44
|
);
|
|
40
45
|
|
|
41
46
|
return { offers, rateTableUuid: uuid, isError, leadUuid, errorCode };
|