@moneylion/react-native-offer-carousel 1.9.0 → 1.10.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/CHANGELOG.md +12 -0
- package/lib/commonjs/apiEnvironment.js +1 -7
- package/lib/commonjs/apiEnvironment.js.map +1 -1
- package/lib/commonjs/capabilities/core/src/system/cnfContext/CnfContext.js +0 -12
- package/lib/commonjs/capabilities/core/src/system/cnfContext/CnfContext.js.map +1 -1
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/App.js +0 -16
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/App.js.map +1 -1
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Brand.js +0 -120
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Brand.js.map +1 -1
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Configuration.js +0 -39
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Configuration.js.map +1 -1
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Request.js +0 -19
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Request.js.map +1 -1
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Session.js +0 -10
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Session.js.map +1 -1
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Signals.js +0 -39
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Signals.js.map +1 -1
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Subaccount.js +0 -24
- package/lib/commonjs/capabilities/core/src/system/cnfContext/schemas/Subaccount.js.map +1 -1
- package/lib/commonjs/capabilities/errors/types/index.js +22 -1
- package/lib/commonjs/capabilities/errors/types/index.js.map +1 -1
- package/lib/commonjs/capabilities/offer-catalog/src/api/offerCatalogApi.js +3 -3
- package/lib/commonjs/capabilities/offer-catalog/src/api/offerCatalogApi.js.map +1 -1
- package/lib/commonjs/components/MoneyLionOfferCarousel.js +16 -13
- package/lib/commonjs/components/MoneyLionOfferCarousel.js.map +1 -1
- package/lib/commonjs/components/utils/errorUtils.js +2 -2
- package/lib/commonjs/components/utils/errorUtils.js.map +1 -1
- package/lib/commonjs/index.js +11 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/pageData.js +1 -12
- package/lib/commonjs/pageData.js.map +1 -1
- package/lib/commonjs/services/getDynamicOffers.js +5 -4
- package/lib/commonjs/services/getDynamicOffers.js.map +1 -1
- package/lib/commonjs/services/getProductTypes.js +3 -22
- package/lib/commonjs/services/getProductTypes.js.map +1 -1
- package/lib/commonjs/utils/index.js +0 -11
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/resolveProductTypes.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/apiEnvironment.js +0 -5
- package/lib/module/apiEnvironment.js.map +1 -1
- package/lib/module/capabilities/core/src/system/cnfContext/CnfContext.js +1 -11
- package/lib/module/capabilities/core/src/system/cnfContext/CnfContext.js.map +1 -1
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/App.js +1 -11
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/App.js.map +1 -1
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Brand.js +1 -115
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Brand.js.map +1 -1
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Configuration.js +1 -34
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Configuration.js.map +1 -1
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Request.js +1 -14
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Request.js.map +1 -1
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Session.js +1 -5
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Session.js.map +1 -1
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Signals.js +1 -34
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Signals.js.map +1 -1
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Subaccount.js +1 -19
- package/lib/module/capabilities/core/src/system/cnfContext/schemas/Subaccount.js.map +1 -1
- package/lib/module/capabilities/errors/types/index.js +21 -0
- package/lib/module/capabilities/errors/types/index.js.map +1 -1
- package/lib/module/capabilities/offer-catalog/src/api/offerCatalogApi.js +4 -4
- package/lib/module/capabilities/offer-catalog/src/api/offerCatalogApi.js.map +1 -1
- package/lib/module/components/MoneyLionOfferCarousel.js +17 -14
- package/lib/module/components/MoneyLionOfferCarousel.js.map +1 -1
- package/lib/module/components/utils/errorUtils.js +3 -3
- package/lib/module/components/utils/errorUtils.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/pageData.js +1 -11
- package/lib/module/pageData.js.map +1 -1
- package/lib/module/services/getDynamicOffers.js +6 -5
- package/lib/module/services/getDynamicOffers.js.map +1 -1
- package/lib/module/services/getProductTypes.js +3 -22
- package/lib/module/services/getProductTypes.js.map +1 -1
- package/lib/module/utils/index.js +0 -1
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/resolveProductTypes.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/src/apiEnvironment.d.ts +0 -4
- package/lib/typescript/src/apiEnvironment.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/CnfContext.d.ts +15 -102
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/CnfContext.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/App.d.ts +10 -12
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/App.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Brand.d.ts +101 -472
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Brand.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Configuration.d.ts +24 -58
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Configuration.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Request.d.ts +11 -15
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Request.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Session.d.ts +4 -7
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Session.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Signals.d.ts +30 -63
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Signals.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Subaccount.d.ts +17 -17
- package/lib/typescript/src/capabilities/core/src/system/cnfContext/schemas/Subaccount.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/errors/types/index.d.ts +18 -2
- package/lib/typescript/src/capabilities/errors/types/index.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/contextUtil.d.ts +1 -1
- package/lib/typescript/src/capabilities/offer-catalog/src/utils/contextUtil.d.ts.map +1 -1
- package/lib/typescript/src/capabilities/offers/pipeline/src/sources/ratetables/withDeviceSignals.d.ts +11 -11
- package/lib/typescript/src/components/MoneyLionOfferCarousel.d.ts +0 -2
- 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 +0 -2
- package/lib/typescript/src/pageData.d.ts.map +1 -1
- package/lib/typescript/src/services/getDynamicOffers.d.ts +3 -4
- package/lib/typescript/src/services/getDynamicOffers.d.ts.map +1 -1
- package/lib/typescript/src/services/getProductTypes.d.ts +2 -7
- package/lib/typescript/src/services/getProductTypes.d.ts.map +1 -1
- package/lib/typescript/src/utils/getOffersByProductTypes.d.ts +1 -1
- package/lib/typescript/src/utils/getProductTypesDefinition.d.ts +8 -8
- package/lib/typescript/src/utils/index.d.ts +0 -1
- package/lib/typescript/src/utils/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/resolveProductTypes.d.ts +0 -5
- package/lib/typescript/src/utils/resolveProductTypes.d.ts.map +1 -1
- package/lib/typescript/src/version.d.ts +1 -1
- package/lib/typescript/src/version.d.ts.map +1 -1
- package/package.json +2 -12
- package/src/apiEnvironment.ts +0 -6
- package/src/capabilities/core/src/system/cnfContext/CnfContext.ts +15 -20
- package/src/capabilities/core/src/system/cnfContext/schemas/App.ts +10 -13
- package/src/capabilities/core/src/system/cnfContext/schemas/Brand.ts +108 -148
- package/src/capabilities/core/src/system/cnfContext/schemas/Configuration.ts +21 -46
- package/src/capabilities/core/src/system/cnfContext/schemas/Request.ts +11 -16
- package/src/capabilities/core/src/system/cnfContext/schemas/Session.ts +4 -8
- package/src/capabilities/core/src/system/cnfContext/schemas/Signals.ts +30 -41
- package/src/capabilities/core/src/system/cnfContext/schemas/Subaccount.ts +16 -24
- package/src/capabilities/errors/types/index.ts +30 -1
- package/src/capabilities/offer-catalog/src/api/offerCatalogApi.ts +4 -4
- package/src/components/MoneyLionOfferCarousel.tsx +16 -17
- package/src/components/utils/errorUtils.ts +3 -3
- package/src/index.tsx +4 -0
- package/src/pageData.ts +2 -20
- package/src/services/getDynamicOffers.ts +14 -28
- package/src/services/getProductTypes.ts +5 -28
- package/src/utils/index.ts +0 -1
- package/src/utils/resolveProductTypes.ts +0 -5
- package/src/version.ts +1 -1
- package/lib/commonjs/capabilities/core/src/domain/third-party-search/index.js +0 -17
- package/lib/commonjs/capabilities/core/src/domain/third-party-search/index.js.map +0 -1
- package/lib/commonjs/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js +0 -33
- package/lib/commonjs/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js.map +0 -1
- package/lib/commonjs/services/getProductTypesByQuery.js +0 -72
- package/lib/commonjs/services/getProductTypesByQuery.js.map +0 -1
- package/lib/commonjs/utils/selectDynamicOffers.js +0 -13
- package/lib/commonjs/utils/selectDynamicOffers.js.map +0 -1
- package/lib/module/capabilities/core/src/domain/third-party-search/index.js +0 -2
- package/lib/module/capabilities/core/src/domain/third-party-search/index.js.map +0 -1
- package/lib/module/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js +0 -26
- package/lib/module/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.js.map +0 -1
- package/lib/module/services/getProductTypesByQuery.js +0 -65
- package/lib/module/services/getProductTypesByQuery.js.map +0 -1
- package/lib/module/utils/selectDynamicOffers.js +0 -6
- package/lib/module/utils/selectDynamicOffers.js.map +0 -1
- package/lib/typescript/src/capabilities/core/src/domain/third-party-search/index.d.ts +0 -2
- package/lib/typescript/src/capabilities/core/src/domain/third-party-search/index.d.ts.map +0 -1
- package/lib/typescript/src/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.d.ts +0 -19
- package/lib/typescript/src/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.d.ts.map +0 -1
- package/lib/typescript/src/services/getProductTypesByQuery.d.ts +0 -30
- package/lib/typescript/src/services/getProductTypesByQuery.d.ts.map +0 -1
- package/lib/typescript/src/utils/selectDynamicOffers.d.ts +0 -3
- package/lib/typescript/src/utils/selectDynamicOffers.d.ts.map +0 -1
- package/src/capabilities/core/src/domain/third-party-search/index.ts +0 -1
- package/src/capabilities/core/src/domain/third-party-search/orderProductTypesByRankUtils.ts +0 -33
- package/src/services/getProductTypesByQuery.ts +0 -76
- package/src/utils/selectDynamicOffers.ts +0 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## 1.10.0 (2026-04-14)
|
|
2
|
+
|
|
3
|
+
- Updated behavior to return region-specific error codes for users outside the United States
|
|
4
|
+
- Standardized error handling by introducing a consistent error code mapping and deprecating the existing error enum
|
|
5
|
+
- Removed a deprecated dependency to address security vulnerabilities and improve stability
|
|
6
|
+
|
|
7
|
+
## 1.9.1 (31 Mar 2026)
|
|
8
|
+
|
|
9
|
+
- Removed `query` and `searchApiToken` props
|
|
10
|
+
- Deprecated EWS search endpoint
|
|
11
|
+
- Removed third-party search functionality
|
|
12
|
+
|
|
1
13
|
## 1.9.0 (25 Mar 2026)
|
|
2
14
|
|
|
3
15
|
- Moved `react-native-svg` to peer dependencies (required version: `>=15.11.0 <16`)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getOfferCatalogApiBaseUrl = exports.
|
|
6
|
+
exports.getOfferCatalogApiBaseUrl = exports.getConfigApiBaseUrl = void 0;
|
|
7
7
|
/**
|
|
8
8
|
* Gets the base URL for the Config API.
|
|
9
9
|
*/
|
|
@@ -14,11 +14,5 @@ const getConfigApiBaseUrl = isDev => isDev ? "https://www.moneylion.dev" : "http
|
|
|
14
14
|
*/
|
|
15
15
|
exports.getConfigApiBaseUrl = getConfigApiBaseUrl;
|
|
16
16
|
const getOfferCatalogApiBaseUrl = isDev => isDev ? "https://dev-api.engine.tech" : "https://api.engine.tech";
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Gets the base URL for the EWS Search API.
|
|
20
|
-
*/
|
|
21
17
|
exports.getOfferCatalogApiBaseUrl = getOfferCatalogApiBaseUrl;
|
|
22
|
-
const getEwsSearchApiBaseUrl = isDev => isDev ? "https://api.dev-ews.engine.tech" : "https://api.ews.engine.tech";
|
|
23
|
-
exports.getEwsSearchApiBaseUrl = getEwsSearchApiBaseUrl;
|
|
24
18
|
//# sourceMappingURL=apiEnvironment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getConfigApiBaseUrl","isDev","exports","getOfferCatalogApiBaseUrl"
|
|
1
|
+
{"version":3,"names":["getConfigApiBaseUrl","isDev","exports","getOfferCatalogApiBaseUrl"],"sourceRoot":"../../src","sources":["apiEnvironment.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACO,MAAMA,mBAAmB,GAAIC,KAAc,IACjDA,KAAK,GAAG,2BAA2B,GAAG,2BAA2B;;AAElE;AACA;AACA;AAFAC,OAAA,CAAAF,mBAAA,GAAAA,mBAAA;AAGO,MAAMG,yBAAyB,GAAIF,KAAc,IACvDA,KAAK,GAAG,6BAA6B,GAAG,yBAAyB;AAACC,OAAA,CAAAC,yBAAA,GAAAA,yBAAA","ignoreList":[]}
|
|
@@ -3,16 +3,4 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.CnfContext = void 0;
|
|
7
|
-
var _effect = require("effect");
|
|
8
|
-
var _schemas = require("./schemas");
|
|
9
|
-
const CnfContext = exports.CnfContext = _effect.Schema.Struct({
|
|
10
|
-
app: _schemas.App,
|
|
11
|
-
brand: _schemas.Brand,
|
|
12
|
-
configuration: _schemas.Configuration,
|
|
13
|
-
request: _schemas.CnfRequest,
|
|
14
|
-
signals: _schemas.Signals,
|
|
15
|
-
subaccount: _schemas.Subaccount,
|
|
16
|
-
isDev: _effect.Schema.Boolean
|
|
17
|
-
});
|
|
18
6
|
//# sourceMappingURL=CnfContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../../src","sources":["capabilities/core/src/system/cnfContext/CnfContext.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,18 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.App = void 0;
|
|
7
|
-
var _effect = require("effect");
|
|
8
|
-
const App = exports.App = _effect.Schema.Struct({
|
|
9
|
-
id: _effect.Schema.UUID,
|
|
10
|
-
name: _effect.Schema.String,
|
|
11
|
-
registry: _effect.Schema.String,
|
|
12
|
-
repository: _effect.Schema.String,
|
|
13
|
-
syncStatus: _effect.Schema.String,
|
|
14
|
-
createdAt: _effect.Schema.String,
|
|
15
|
-
updatedAt: _effect.Schema.String,
|
|
16
|
-
syncTimestamp: _effect.Schema.String
|
|
17
|
-
});
|
|
18
2
|
//# sourceMappingURL=App.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../../../src","sources":["capabilities/core/src/system/cnfContext/schemas/App.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,122 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Brand = void 0;
|
|
7
|
-
var _effect = require("effect");
|
|
8
|
-
const ReshapedThemeColorObject = _effect.Schema.Struct({
|
|
9
|
-
hex: _effect.Schema.String,
|
|
10
|
-
hexDark: _effect.Schema.optional(_effect.Schema.String)
|
|
11
|
-
});
|
|
12
|
-
const ReshapedThemeColors = _effect.Schema.Struct({
|
|
13
|
-
backgroundCritical: ReshapedThemeColorObject,
|
|
14
|
-
backgroundCriticalFaded: ReshapedThemeColorObject,
|
|
15
|
-
backgroundDisabled: ReshapedThemeColorObject,
|
|
16
|
-
backgroundDisabledFaded: ReshapedThemeColorObject,
|
|
17
|
-
backgroundElevationBase: ReshapedThemeColorObject,
|
|
18
|
-
backgroundElevationOverlay: ReshapedThemeColorObject,
|
|
19
|
-
backgroundElevationRaised: ReshapedThemeColorObject,
|
|
20
|
-
backgroundNeutral: ReshapedThemeColorObject,
|
|
21
|
-
backgroundNeutralFaded: ReshapedThemeColorObject,
|
|
22
|
-
backgroundPage: ReshapedThemeColorObject,
|
|
23
|
-
backgroundPageFaded: ReshapedThemeColorObject,
|
|
24
|
-
backgroundPositive: ReshapedThemeColorObject,
|
|
25
|
-
backgroundPositiveFaded: ReshapedThemeColorObject,
|
|
26
|
-
backgroundPrimary: ReshapedThemeColorObject,
|
|
27
|
-
backgroundPrimaryFaded: ReshapedThemeColorObject,
|
|
28
|
-
backgroundWarning: ReshapedThemeColorObject,
|
|
29
|
-
backgroundWarningFaded: ReshapedThemeColorObject,
|
|
30
|
-
black: ReshapedThemeColorObject,
|
|
31
|
-
borderCritical: ReshapedThemeColorObject,
|
|
32
|
-
borderCriticalFaded: ReshapedThemeColorObject,
|
|
33
|
-
borderDisabled: ReshapedThemeColorObject,
|
|
34
|
-
borderNeutral: ReshapedThemeColorObject,
|
|
35
|
-
borderNeutralFaded: ReshapedThemeColorObject,
|
|
36
|
-
borderPositive: ReshapedThemeColorObject,
|
|
37
|
-
borderPositiveFaded: ReshapedThemeColorObject,
|
|
38
|
-
borderPrimary: ReshapedThemeColorObject,
|
|
39
|
-
borderPrimaryFaded: ReshapedThemeColorObject,
|
|
40
|
-
borderWarning: ReshapedThemeColorObject,
|
|
41
|
-
borderWarningFaded: ReshapedThemeColorObject,
|
|
42
|
-
brand: ReshapedThemeColorObject,
|
|
43
|
-
foregroundCritical: ReshapedThemeColorObject,
|
|
44
|
-
foregroundDisabled: ReshapedThemeColorObject,
|
|
45
|
-
foregroundNeutral: ReshapedThemeColorObject,
|
|
46
|
-
foregroundNeutralFaded: ReshapedThemeColorObject,
|
|
47
|
-
foregroundPositive: ReshapedThemeColorObject,
|
|
48
|
-
foregroundPrimary: ReshapedThemeColorObject,
|
|
49
|
-
foregroundWarning: ReshapedThemeColorObject,
|
|
50
|
-
white: ReshapedThemeColorObject
|
|
51
|
-
});
|
|
52
|
-
const Links = _effect.Schema.Struct({
|
|
53
|
-
home: _effect.Schema.optional(_effect.Schema.String),
|
|
54
|
-
terms: _effect.Schema.optional(_effect.Schema.String),
|
|
55
|
-
support: _effect.Schema.optional(_effect.Schema.String),
|
|
56
|
-
privacy: _effect.Schema.optional(_effect.Schema.String)
|
|
57
|
-
});
|
|
58
|
-
const AiInference = _effect.Schema.Struct({
|
|
59
|
-
status: _effect.Schema.String,
|
|
60
|
-
error: _effect.Schema.optional(_effect.Schema.String)
|
|
61
|
-
});
|
|
62
|
-
const Media = _effect.Schema.Struct({
|
|
63
|
-
id: _effect.Schema.String,
|
|
64
|
-
autoCrop: _effect.Schema.Boolean,
|
|
65
|
-
prefix: _effect.Schema.optional(_effect.Schema.String),
|
|
66
|
-
alt: _effect.Schema.optional(_effect.Schema.String),
|
|
67
|
-
url: _effect.Schema.optional(_effect.Schema.String),
|
|
68
|
-
filename: _effect.Schema.optional(_effect.Schema.String),
|
|
69
|
-
mimeType: _effect.Schema.optional(_effect.Schema.String),
|
|
70
|
-
filesize: _effect.Schema.optional(_effect.Schema.Number),
|
|
71
|
-
width: _effect.Schema.optional(_effect.Schema.Number),
|
|
72
|
-
height: _effect.Schema.optional(_effect.Schema.Number),
|
|
73
|
-
createdAt: _effect.Schema.optional(_effect.Schema.String),
|
|
74
|
-
updatedAt: _effect.Schema.optional(_effect.Schema.String),
|
|
75
|
-
aiInference: _effect.Schema.optional(AiInference)
|
|
76
|
-
});
|
|
77
|
-
const Logos = _effect.Schema.Struct({
|
|
78
|
-
horizontal: _effect.Schema.optional(Media),
|
|
79
|
-
icon: _effect.Schema.optional(_effect.Schema.NullOr(Media))
|
|
80
|
-
});
|
|
81
|
-
const FontFamily = _effect.Schema.Literal("nunito", "lato", "sourceSans3", "openSans", "roboto", "arimo", "montserrat");
|
|
82
|
-
const Font = _effect.Schema.Struct({
|
|
83
|
-
family: _effect.Schema.optional(FontFamily)
|
|
84
|
-
});
|
|
85
|
-
const AllowedMarks = _effect.Schema.Struct({
|
|
86
|
-
logo: _effect.Schema.Boolean,
|
|
87
|
-
name: _effect.Schema.Boolean
|
|
88
|
-
});
|
|
89
|
-
const CtaRoundness = _effect.Schema.Struct({
|
|
90
|
-
small: _effect.Schema.optional(_effect.Schema.Number),
|
|
91
|
-
medium: _effect.Schema.optional(_effect.Schema.Number),
|
|
92
|
-
large: _effect.Schema.optional(_effect.Schema.Number)
|
|
93
|
-
});
|
|
94
|
-
const BrandFields = _effect.Schema.Struct({
|
|
95
|
-
id: _effect.Schema.String,
|
|
96
|
-
domain: _effect.Schema.String,
|
|
97
|
-
displayName: _effect.Schema.String,
|
|
98
|
-
isLicensed: _effect.Schema.optional(_effect.Schema.Boolean),
|
|
99
|
-
hideLicensedLogo: _effect.Schema.optional(_effect.Schema.Boolean),
|
|
100
|
-
reshapedThemeColors: ReshapedThemeColors,
|
|
101
|
-
links: _effect.Schema.optional(Links),
|
|
102
|
-
logos: _effect.Schema.optional(Logos),
|
|
103
|
-
font: _effect.Schema.optional(Font),
|
|
104
|
-
type: _effect.Schema.optional(_effect.Schema.Literal("business", "product", "individual")),
|
|
105
|
-
allowedMarks: AllowedMarks,
|
|
106
|
-
ctaRoundness: _effect.Schema.optional(CtaRoundness),
|
|
107
|
-
createdAt: _effect.Schema.optional(_effect.Schema.String),
|
|
108
|
-
updatedAt: _effect.Schema.optional(_effect.Schema.String)
|
|
109
|
-
});
|
|
110
|
-
const Brand = exports.Brand = _effect.Schema.suspend(() => {
|
|
111
|
-
const withDepth = depth => {
|
|
112
|
-
if (depth > 2) {
|
|
113
|
-
return BrandFields; // We don't want infinite recursion of licensedBrand field
|
|
114
|
-
}
|
|
115
|
-
return _effect.Schema.Struct({
|
|
116
|
-
...BrandFields.fields,
|
|
117
|
-
licensedBrand: _effect.Schema.optional(_effect.Schema.NullOr(_effect.Schema.suspend(() => withDepth(depth + 1))))
|
|
118
|
-
});
|
|
119
|
-
};
|
|
120
|
-
return withDepth(0); // Start with depth 0
|
|
121
|
-
});
|
|
122
2
|
//# sourceMappingURL=Brand.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../../../src","sources":["capabilities/core/src/system/cnfContext/schemas/Brand.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,41 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.DynamicOffersConfigurationSchema = exports.Configuration = void 0;
|
|
7
|
-
var _effect = require("effect");
|
|
8
|
-
const ProductTypesDefinition = _effect.Schema.Struct({
|
|
9
|
-
id: _effect.Schema.String,
|
|
10
|
-
partnerPageUrl: _effect.Schema.String,
|
|
11
|
-
productTypeSlug: _effect.Schema.String
|
|
12
|
-
});
|
|
13
|
-
const PartnersOverrideDefinition = _effect.Schema.Struct({
|
|
14
|
-
id: _effect.Schema.String,
|
|
15
|
-
overrideUrl: _effect.Schema.String,
|
|
16
|
-
financialInstitutionUuid: _effect.Schema.String
|
|
17
|
-
});
|
|
18
|
-
const DynamicOffersConfigurationSchema = exports.DynamicOffersConfigurationSchema = _effect.Schema.Struct({
|
|
19
|
-
hideFooter: _effect.Schema.optionalWith(_effect.Schema.Boolean, {
|
|
20
|
-
default: () => false
|
|
21
|
-
}),
|
|
22
|
-
enableUseCachedOffers: _effect.Schema.optionalWith(_effect.Schema.Boolean, {
|
|
23
|
-
default: () => false
|
|
24
|
-
}),
|
|
25
|
-
defaultProductTypeSlug: _effect.Schema.optionalWith(_effect.Schema.String, {
|
|
26
|
-
default: () => "EarnedWageAccess"
|
|
27
|
-
}),
|
|
28
|
-
productTypesDefinition: _effect.Schema.optionalWith(_effect.Schema.Array(ProductTypesDefinition), {
|
|
29
|
-
default: () => []
|
|
30
|
-
}),
|
|
31
|
-
partnersOverrideDefinition: _effect.Schema.optionalWith(_effect.Schema.Array(PartnersOverrideDefinition), {
|
|
32
|
-
default: () => []
|
|
33
|
-
})
|
|
34
|
-
});
|
|
35
|
-
const Configuration = exports.Configuration = _effect.Schema.Struct({
|
|
36
|
-
app: _effect.Schema.Union(_effect.Schema.String, _effect.Schema.Struct({
|
|
37
|
-
name: _effect.Schema.String
|
|
38
|
-
})),
|
|
39
|
-
configuration: DynamicOffersConfigurationSchema
|
|
40
|
-
});
|
|
41
2
|
//# sourceMappingURL=Configuration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../../../src","sources":["capabilities/core/src/system/cnfContext/schemas/Configuration.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,21 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.CnfRequest = void 0;
|
|
7
|
-
var _effect = require("effect");
|
|
8
|
-
const CnfRequest = exports.CnfRequest = _effect.Schema.Struct({
|
|
9
|
-
referer: _effect.Schema.optional(_effect.Schema.String),
|
|
10
|
-
channel: _effect.Schema.optional(_effect.Schema.String),
|
|
11
|
-
zone: _effect.Schema.optional(_effect.Schema.String),
|
|
12
|
-
cnfAppBaseUrl: _effect.Schema.optionalWith(_effect.Schema.String, {
|
|
13
|
-
default: () => "http://localhost:3000"
|
|
14
|
-
}),
|
|
15
|
-
path: _effect.Schema.optional(_effect.Schema.String),
|
|
16
|
-
pathname: _effect.Schema.optional(_effect.Schema.String),
|
|
17
|
-
query: _effect.Schema.optional(_effect.Schema.String),
|
|
18
|
-
searchParams: _effect.Schema.Struct({}),
|
|
19
|
-
host: _effect.Schema.optional(_effect.Schema.String)
|
|
20
|
-
});
|
|
21
2
|
//# sourceMappingURL=Request.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../../../src","sources":["capabilities/core/src/system/cnfContext/schemas/Request.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,12 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SessionId = exports.Session = void 0;
|
|
7
|
-
var _effect = require("effect");
|
|
8
|
-
const SessionId = exports.SessionId = _effect.Schema.UUID.pipe(_effect.Schema.brand("SessionId"));
|
|
9
|
-
const Session = exports.Session = _effect.Schema.Struct({
|
|
10
|
-
id: SessionId
|
|
11
|
-
});
|
|
12
2
|
//# sourceMappingURL=Session.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../../../src","sources":["capabilities/core/src/system/cnfContext/schemas/Session.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,41 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Signals = exports.ReferralSignals = exports.PartnerSignals = exports.LeadUuid = exports.LeadSignals = exports.DeviceId = void 0;
|
|
7
|
-
var _effect = require("effect");
|
|
8
|
-
const PartnerSignals = exports.PartnerSignals = _effect.Schema.Struct({
|
|
9
|
-
clientTags: _effect.Schema.Struct({}, {
|
|
10
|
-
key: _effect.Schema.String,
|
|
11
|
-
value: _effect.Schema.String
|
|
12
|
-
})
|
|
13
|
-
});
|
|
14
|
-
const DeviceId = exports.DeviceId = _effect.Schema.UUID;
|
|
15
|
-
const DeviceSignals = _effect.Schema.Struct({
|
|
16
|
-
id: DeviceId,
|
|
17
|
-
ipAddress: _effect.Schema.optional(_effect.Schema.String),
|
|
18
|
-
os: _effect.Schema.optional(_effect.Schema.String),
|
|
19
|
-
isMobile: _effect.Schema.optional(_effect.Schema.Boolean),
|
|
20
|
-
country: _effect.Schema.optional(_effect.Schema.String),
|
|
21
|
-
state: _effect.Schema.optional(_effect.Schema.Struct({
|
|
22
|
-
name: _effect.Schema.optional(_effect.Schema.String),
|
|
23
|
-
code: _effect.Schema.optional(_effect.Schema.String)
|
|
24
|
-
})),
|
|
25
|
-
postalCode: _effect.Schema.String,
|
|
26
|
-
city: _effect.Schema.String,
|
|
27
|
-
fingerprintId: _effect.Schema.optional(_effect.Schema.String),
|
|
28
|
-
userAgent: _effect.Schema.optional(_effect.Schema.String)
|
|
29
|
-
});
|
|
30
|
-
const LeadUuid = exports.LeadUuid = _effect.Schema.UUID;
|
|
31
|
-
const LeadSignals = exports.LeadSignals = _effect.Schema.Struct({
|
|
32
|
-
uuid: LeadUuid
|
|
33
|
-
});
|
|
34
|
-
const ReferralSignals = exports.ReferralSignals = _effect.Schema.Struct({});
|
|
35
|
-
const Signals = exports.Signals = _effect.Schema.Struct({
|
|
36
|
-
partnerSignals: PartnerSignals,
|
|
37
|
-
deviceSignals: DeviceSignals,
|
|
38
|
-
lead: LeadSignals,
|
|
39
|
-
referral: ReferralSignals
|
|
40
|
-
});
|
|
41
2
|
//# sourceMappingURL=Signals.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../../../src","sources":["capabilities/core/src/system/cnfContext/schemas/Signals.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,26 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Subaccount = void 0;
|
|
7
|
-
var _effect = require("effect");
|
|
8
|
-
const EmptyString = _effect.Schema.Literal("");
|
|
9
|
-
const NullOrEmptyString = schema => _effect.Schema.Union(_effect.Schema.Null, EmptyString, schema);
|
|
10
|
-
const Tag = _effect.Schema.Struct({
|
|
11
|
-
id: _effect.Schema.String,
|
|
12
|
-
key: _effect.Schema.String,
|
|
13
|
-
value: _effect.Schema.String
|
|
14
|
-
});
|
|
15
|
-
const Subaccount = exports.Subaccount = _effect.Schema.Struct({
|
|
16
|
-
id: _effect.Schema.UUID,
|
|
17
|
-
publicToken: _effect.Schema.String,
|
|
18
|
-
name: _effect.Schema.String,
|
|
19
|
-
companyUuid: _effect.Schema.String,
|
|
20
|
-
subaccount: _effect.Schema.NullOr(_effect.Schema.Number),
|
|
21
|
-
supplySubaccountUuid: _effect.Schema.UUID.pipe(NullOrEmptyString, _effect.Schema.optional),
|
|
22
|
-
tags: _effect.Schema.Array(Tag),
|
|
23
|
-
createdAt: _effect.Schema.String,
|
|
24
|
-
updatedAt: _effect.Schema.String
|
|
25
|
-
});
|
|
26
2
|
//# sourceMappingURL=Subaccount.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../../../src","sources":["capabilities/core/src/system/cnfContext/schemas/Subaccount.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -3,7 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.ErrorCodes = void 0;
|
|
6
|
+
exports.ErrorCodes = exports.ErrorCodeMap = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated use ErrorCodeMap instead.
|
|
9
|
+
* TypeScript 5.8 introduced the --erasableSyntaxOnly flag, which treats enums as
|
|
10
|
+
* a compile error. this enum will be removed in a future version.
|
|
11
|
+
*/
|
|
7
12
|
let ErrorCodes = exports.ErrorCodes = /*#__PURE__*/function (ErrorCodes) {
|
|
8
13
|
// Configuration
|
|
9
14
|
ErrorCodes["MISSING_CONFIG"] = "MISSING_CONFIG";
|
|
@@ -15,6 +20,22 @@ let ErrorCodes = exports.ErrorCodes = /*#__PURE__*/function (ErrorCodes) {
|
|
|
15
20
|
ErrorCodes["NETWORK_REQUEST_ERROR"] = "NETWORK_REQUEST_ERROR";
|
|
16
21
|
ErrorCodes["NETWORK_SERVER_ERROR"] = "NETWORK_SERVER_ERROR";
|
|
17
22
|
ErrorCodes["NETWORK_OTHER_ERROR"] = "NETWORK_OTHER_ERROR";
|
|
23
|
+
// Geo
|
|
24
|
+
ErrorCodes["NON_US"] = "NON_US";
|
|
18
25
|
return ErrorCodes;
|
|
19
26
|
}({});
|
|
27
|
+
const ErrorCodeMap = exports.ErrorCodeMap = {
|
|
28
|
+
// Configuration
|
|
29
|
+
MISSING_CONFIG: "MISSING_CONFIG",
|
|
30
|
+
// UI
|
|
31
|
+
UI_CRASH: "UI_CRASH",
|
|
32
|
+
// Flow
|
|
33
|
+
FLOW_ERROR: "FLOW_ERROR",
|
|
34
|
+
// Network
|
|
35
|
+
NETWORK_REQUEST_ERROR: "NETWORK_REQUEST_ERROR",
|
|
36
|
+
NETWORK_SERVER_ERROR: "NETWORK_SERVER_ERROR",
|
|
37
|
+
NETWORK_OTHER_ERROR: "NETWORK_OTHER_ERROR",
|
|
38
|
+
// Geo
|
|
39
|
+
NON_US: "NON_US"
|
|
40
|
+
};
|
|
20
41
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ErrorCodes","exports"],"sourceRoot":"../../../../../src","sources":["capabilities/errors/types/index.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"names":["ErrorCodes","exports","ErrorCodeMap","MISSING_CONFIG","UI_CRASH","FLOW_ERROR","NETWORK_REQUEST_ERROR","NETWORK_SERVER_ERROR","NETWORK_OTHER_ERROR","NON_US"],"sourceRoot":"../../../../../src","sources":["capabilities/errors/types/index.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AAJA,IAKYA,UAAU,GAAAC,OAAA,CAAAD,UAAA,0BAAVA,UAAU;EACrB;EADWA,UAAU;EAIrB;EAJWA,UAAU;EAOrB;EAPWA,UAAU;EAUrB;EAVWA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAerB;EAfWA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAmBf,MAAME,YAAY,GAAAD,OAAA,CAAAC,YAAA,GAAG;EAC3B;EACAC,cAAc,EAAE,gBAAgB;EAEhC;EACAC,QAAQ,EAAE,UAAU;EAEpB;EACAC,UAAU,EAAE,YAAY;EAExB;EACAC,qBAAqB,EAAE,uBAAuB;EAC9CC,oBAAoB,EAAE,sBAAsB;EAC5CC,mBAAmB,EAAE,qBAAqB;EAE1C;EACAC,MAAM,EAAE;AACT,CAAU","ignoreList":[]}
|
|
@@ -68,7 +68,7 @@ const getCachedOffersByProductTypes = context => async (productTypes, onError) =
|
|
|
68
68
|
context
|
|
69
69
|
},
|
|
70
70
|
...((0, _errorUtils.getApiErrorLogProperties)(error) || {
|
|
71
|
-
code: _types.
|
|
71
|
+
code: _types.ErrorCodeMap.FLOW_ERROR,
|
|
72
72
|
severity: "error"
|
|
73
73
|
})
|
|
74
74
|
});
|
|
@@ -155,7 +155,7 @@ const getOffersForProductTypes = context => async (productTypes, customClientTag
|
|
|
155
155
|
} catch (error) {
|
|
156
156
|
onError === null || onError === void 0 || onError({
|
|
157
157
|
message: "Failed to add device signals to payload",
|
|
158
|
-
code: _types.
|
|
158
|
+
code: _types.ErrorCodeMap.FLOW_ERROR,
|
|
159
159
|
severity: "error",
|
|
160
160
|
error,
|
|
161
161
|
additionalInfo: {
|
|
@@ -232,7 +232,7 @@ const getOffersForProductTypes = context => async (productTypes, customClientTag
|
|
|
232
232
|
customClientTags
|
|
233
233
|
},
|
|
234
234
|
...((0, _errorUtils.getApiErrorLogProperties)(error) || {
|
|
235
|
-
code: _types.
|
|
235
|
+
code: _types.ErrorCodeMap.FLOW_ERROR,
|
|
236
236
|
severity: "error"
|
|
237
237
|
})
|
|
238
238
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_radash","require","_contextUtil","_errorUtil","_interopRequireDefault","_withDeviceSignals","_apiEnvironment","_types","_errorUtils","e","__esModule","default","getCachedOffersByProductTypes","context","productTypes","onError","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","message","additionalInfo","getApiErrorLogProperties","
|
|
1
|
+
{"version":3,"names":["_radash","require","_contextUtil","_errorUtil","_interopRequireDefault","_withDeviceSignals","_apiEnvironment","_types","_errorUtils","e","__esModule","default","getCachedOffersByProductTypes","context","productTypes","onError","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","message","additionalInfo","getApiErrorLogProperties","ErrorCodeMap","FLOW_ERROR","severity","isError","leadUuid","uuid","exports","getNewOffersApi","token","payload","body","JSON","stringify","pollOfferCatalogApi","rateTableUuid","MAX_POLLING_ATTEMPTS","POLLING_INTERVAL_MS","getOffersForProductTypes","customClientTags","userData","enablePolling","_body","getSubaccountToken","getLeadUUID","userEmail","email","userInformation","Boolean","fields","clientTags","personalInformation","stateCode","getStateCode","withDeviceSignals","state","pollingAttempt","_body2","pendingResponses","length","Promise","resolve","setTimeout"],"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;AAGA,IAAAM,MAAA,GAAAN,OAAA;AAKA,IAAAO,WAAA,GAAAP,OAAA;AAAmF,SAAAG,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE5E,MAAMG,6BAA6B,GACxCC,OAAmB,IACpB,OAAOC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,GAAG,IAAIC,KAAK,CAACL,YAAY,CAAa;MACjDI,KAAK,CAACE,IAAI,GAAGf,QAAQ,CAACM,MAAM;MAC5B,MAAMO,KAAK;IACZ;IAEA,OAAO;MAAE,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;IAElCpB,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAG;MACTiC,OAAO,EAAE,0CAA0C;MACnDT,KAAK;MACLU,cAAc,EAAE;QACfpC,OAAO;QACPC,YAAY;QACZuD;MACD,CAAC;MACD,IAAI,IAAAnB,oCAAwB,EAACX,KAAK,CAAC,IAAI;QACtCE,IAAI,EAAEU,mBAAY,CAACC,UAAU;QAC7BC,QAAQ,EAAE;MACX,CAAC;IACF,CAAC,CAAC;IAEF,OAAO;MACNN,SAAS,EAAGR,KAAK,CAAcE,IAAI;MACnCa,OAAO,EAAE,IAAI;MACbC,QAAQ,EAAE,EAAE;MACZV,MAAM,EAAE,EAAE;MACVW,IAAI,EAAE;IACP,CAAC;EACF;AACD,CAAC;AAACC,OAAA,CAAAW,wBAAA,GAAAA,wBAAA","ignoreList":[]}
|
|
@@ -54,7 +54,7 @@ const getConfiguration = async ({
|
|
|
54
54
|
isDev
|
|
55
55
|
},
|
|
56
56
|
...((0, _errorUtils.getApiErrorLogProperties)(error) || {
|
|
57
|
-
code: _types.
|
|
57
|
+
code: _types.ErrorCodeMap.FLOW_ERROR,
|
|
58
58
|
severity: "error"
|
|
59
59
|
})
|
|
60
60
|
});
|
|
@@ -76,9 +76,7 @@ const InternalMoneyLionOfferCarousel = props => {
|
|
|
76
76
|
subtitle,
|
|
77
77
|
isDarkTheme = false,
|
|
78
78
|
productType,
|
|
79
|
-
query,
|
|
80
79
|
tags,
|
|
81
|
-
searchAPIToken,
|
|
82
80
|
showProductTypeLabel: _showProductTypeLabel,
|
|
83
81
|
showCardBorder: _showCardBorder,
|
|
84
82
|
userData,
|
|
@@ -107,16 +105,14 @@ const InternalMoneyLionOfferCarousel = props => {
|
|
|
107
105
|
};
|
|
108
106
|
const getPageDataParams = (0, _react.useMemo)(() => ({
|
|
109
107
|
productType,
|
|
110
|
-
query,
|
|
111
108
|
tags,
|
|
112
|
-
searchAPIToken,
|
|
113
109
|
userData: {
|
|
114
110
|
email: (userData === null || userData === void 0 ? void 0 : userData.email) || "",
|
|
115
111
|
_mockUserCountry: (userData === null || userData === void 0 ? void 0 : userData._mockUserCountry) || ""
|
|
116
112
|
},
|
|
117
113
|
showProductTypeLabel: _showProductTypeLabel,
|
|
118
114
|
showCardBorder: _showCardBorder
|
|
119
|
-
}), [productType,
|
|
115
|
+
}), [productType, tags, _showProductTypeLabel, _showCardBorder, userData === null || userData === void 0 ? void 0 : userData.email, userData === null || userData === void 0 ? void 0 : userData._mockUserCountry]);
|
|
120
116
|
const [isFetchingData, setIsFetchingData] = (0, _react.useState)(true);
|
|
121
117
|
const [isFetchingConfig, setIsFetchingConfig] = (0, _react.useState)(true);
|
|
122
118
|
const [error, setError] = (0, _react.useState)(null);
|
|
@@ -147,7 +143,7 @@ const InternalMoneyLionOfferCarousel = props => {
|
|
|
147
143
|
isDev
|
|
148
144
|
},
|
|
149
145
|
...((0, _errorUtils.getApiErrorLogProperties)(errorObj) || {
|
|
150
|
-
code: _types.
|
|
146
|
+
code: _types.ErrorCodeMap.FLOW_ERROR,
|
|
151
147
|
severity: "error"
|
|
152
148
|
})
|
|
153
149
|
});
|
|
@@ -171,25 +167,32 @@ const InternalMoneyLionOfferCarousel = props => {
|
|
|
171
167
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
172
168
|
}, [isFetchingConfig]);
|
|
173
169
|
(0, _react.useEffect)(() => {
|
|
174
|
-
if (!channel || !zone || !subAccountToken
|
|
170
|
+
if (!channel || !zone || !subAccountToken) {
|
|
175
171
|
const missingParams = [];
|
|
176
172
|
if (!channel) missingParams.push("channel");
|
|
177
173
|
if (!zone) missingParams.push("zone");
|
|
178
174
|
if (!subAccountToken) missingParams.push("subAccountToken");
|
|
179
|
-
if (!searchAPIToken) missingParams.push("searchAPIToken");
|
|
180
175
|
onError === null || onError === void 0 || onError({
|
|
181
|
-
code: _types.
|
|
176
|
+
code: _types.ErrorCodeMap.MISSING_CONFIG,
|
|
182
177
|
message: `Missing required parameters: ${missingParams.join(", ")}`,
|
|
183
178
|
severity: "error"
|
|
184
179
|
});
|
|
185
180
|
}
|
|
186
181
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
187
|
-
}, [channel, zone, subAccountToken
|
|
182
|
+
}, [channel, zone, subAccountToken]);
|
|
188
183
|
(0, _react.useEffect)(() => {
|
|
189
184
|
const fetchPageData = async () => {
|
|
190
185
|
// Should only fetch data if context is done fetching
|
|
191
186
|
if (context && !isFetchingConfig) {
|
|
192
187
|
if (isNonUSCountry) {
|
|
188
|
+
onError === null || onError === void 0 || onError({
|
|
189
|
+
code: _types.ErrorCodeMap.NON_US,
|
|
190
|
+
severity: "warning",
|
|
191
|
+
message: "This service is not available in your country",
|
|
192
|
+
additionalInfo: {
|
|
193
|
+
country
|
|
194
|
+
}
|
|
195
|
+
});
|
|
193
196
|
setIsFetchingData(false);
|
|
194
197
|
return;
|
|
195
198
|
}
|
|
@@ -223,7 +226,7 @@ const InternalMoneyLionOfferCarousel = props => {
|
|
|
223
226
|
pageDataParams: getPageDataParams
|
|
224
227
|
},
|
|
225
228
|
...((0, _errorUtils.getApiErrorLogProperties)(errorObj) || {
|
|
226
|
-
code: _types.
|
|
229
|
+
code: _types.ErrorCodeMap.FLOW_ERROR,
|
|
227
230
|
severity: "error"
|
|
228
231
|
})
|
|
229
232
|
});
|
|
@@ -312,7 +315,7 @@ const MoneyLionOfferCarousel = props => {
|
|
|
312
315
|
}, [_onError]);
|
|
313
316
|
const logErrorBoundary = (0, _react.useCallback)(error => {
|
|
314
317
|
onError === null || onError === void 0 || onError({
|
|
315
|
-
code: _types.
|
|
318
|
+
code: _types.ErrorCodeMap.UI_CRASH,
|
|
316
319
|
severity: "error",
|
|
317
320
|
message: "Error boundary crash",
|
|
318
321
|
error,
|