@fiado/credit-data 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/index.d.ts +8 -0
- package/bin/index.js +28 -0
- package/bin/models/CreditConfigModels.d.ts +7 -0
- package/bin/models/CreditConfigModels.js +25 -0
- package/bin/models/CreditFinancialProfileHistoryModel.d.ts +1 -0
- package/bin/models/CreditFinancialProfileHistoryModel.js +26 -0
- package/bin/models/CreditFinancialProfileModel.d.ts +1 -0
- package/bin/models/CreditFinancialProfileModel.js +87 -0
- package/bin/models/CreditIncomeSourceModel.d.ts +1 -0
- package/bin/models/CreditIncomeSourceModel.js +38 -0
- package/bin/models/CreditNurturingBannerModel.d.ts +1 -0
- package/bin/models/CreditNurturingBannerModel.js +32 -0
- package/bin/models/CreditOffersModel.d.ts +1 -0
- package/bin/models/CreditOffersModel.js +33 -0
- package/bin/models/CreditProcessControlModel.d.ts +1 -0
- package/bin/models/CreditProcessControlModel.js +31 -0
- package/bin/models/FiadoIncCentralPaymentTxModel.d.ts +1 -0
- package/bin/models/FiadoIncCentralPaymentTxModel.js +27 -0
- package/jest.config.js +7 -0
- package/package.json +23 -0
- package/src/index.ts +21 -0
- package/src/models/CreditConfigModels.ts +48 -0
- package/src/models/CreditFinancialProfileHistoryModel.ts +25 -0
- package/src/models/CreditFinancialProfileModel.ts +86 -0
- package/src/models/CreditIncomeSourceModel.ts +37 -0
- package/src/models/CreditNurturingBannerModel.ts +31 -0
- package/src/models/CreditOffersModel.ts +32 -0
- package/src/models/CreditProcessControlModel.ts +30 -0
- package/src/models/FiadoIncCentralPaymentTxModel.ts +26 -0
package/bin/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { CreditFinancialProfileModel } from './models/CreditFinancialProfileModel';
|
|
2
|
+
export { CreditFinancialProfileHistoryModel } from './models/CreditFinancialProfileHistoryModel';
|
|
3
|
+
export { CreditNurturingBannerModel } from './models/CreditNurturingBannerModel';
|
|
4
|
+
export { CreditIncomeSourceModel } from './models/CreditIncomeSourceModel';
|
|
5
|
+
export { CreditOffersModel } from './models/CreditOffersModel';
|
|
6
|
+
export { CreditProcessControlModel } from './models/CreditProcessControlModel';
|
|
7
|
+
export { FiadoIncCentralPaymentTxModel } from './models/FiadoIncCentralPaymentTxModel';
|
|
8
|
+
export { CreditPartnerConfigModel, CreditEligibilityRulesModel, CreditLevelConfigModel, CreditScoreConfigModel, CreditInterestRateConfigModel, CreditSplitConfigModel, CreditExposureLimitsModel, } from './models/CreditConfigModels';
|
package/bin/index.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreditExposureLimitsModel = exports.CreditSplitConfigModel = exports.CreditInterestRateConfigModel = exports.CreditScoreConfigModel = exports.CreditLevelConfigModel = exports.CreditEligibilityRulesModel = exports.CreditPartnerConfigModel = exports.FiadoIncCentralPaymentTxModel = exports.CreditProcessControlModel = exports.CreditOffersModel = exports.CreditIncomeSourceModel = exports.CreditNurturingBannerModel = exports.CreditFinancialProfileHistoryModel = exports.CreditFinancialProfileModel = void 0;
|
|
4
|
+
// Modelos operativos
|
|
5
|
+
var CreditFinancialProfileModel_1 = require("./models/CreditFinancialProfileModel");
|
|
6
|
+
Object.defineProperty(exports, "CreditFinancialProfileModel", { enumerable: true, get: function () { return CreditFinancialProfileModel_1.CreditFinancialProfileModel; } });
|
|
7
|
+
var CreditFinancialProfileHistoryModel_1 = require("./models/CreditFinancialProfileHistoryModel");
|
|
8
|
+
Object.defineProperty(exports, "CreditFinancialProfileHistoryModel", { enumerable: true, get: function () { return CreditFinancialProfileHistoryModel_1.CreditFinancialProfileHistoryModel; } });
|
|
9
|
+
var CreditNurturingBannerModel_1 = require("./models/CreditNurturingBannerModel");
|
|
10
|
+
Object.defineProperty(exports, "CreditNurturingBannerModel", { enumerable: true, get: function () { return CreditNurturingBannerModel_1.CreditNurturingBannerModel; } });
|
|
11
|
+
var CreditIncomeSourceModel_1 = require("./models/CreditIncomeSourceModel");
|
|
12
|
+
Object.defineProperty(exports, "CreditIncomeSourceModel", { enumerable: true, get: function () { return CreditIncomeSourceModel_1.CreditIncomeSourceModel; } });
|
|
13
|
+
var CreditOffersModel_1 = require("./models/CreditOffersModel");
|
|
14
|
+
Object.defineProperty(exports, "CreditOffersModel", { enumerable: true, get: function () { return CreditOffersModel_1.CreditOffersModel; } });
|
|
15
|
+
var CreditProcessControlModel_1 = require("./models/CreditProcessControlModel");
|
|
16
|
+
Object.defineProperty(exports, "CreditProcessControlModel", { enumerable: true, get: function () { return CreditProcessControlModel_1.CreditProcessControlModel; } });
|
|
17
|
+
// Modelo existente (solo lectura)
|
|
18
|
+
var FiadoIncCentralPaymentTxModel_1 = require("./models/FiadoIncCentralPaymentTxModel");
|
|
19
|
+
Object.defineProperty(exports, "FiadoIncCentralPaymentTxModel", { enumerable: true, get: function () { return FiadoIncCentralPaymentTxModel_1.FiadoIncCentralPaymentTxModel; } });
|
|
20
|
+
// Modelos de configuracion
|
|
21
|
+
var CreditConfigModels_1 = require("./models/CreditConfigModels");
|
|
22
|
+
Object.defineProperty(exports, "CreditPartnerConfigModel", { enumerable: true, get: function () { return CreditConfigModels_1.CreditPartnerConfigModel; } });
|
|
23
|
+
Object.defineProperty(exports, "CreditEligibilityRulesModel", { enumerable: true, get: function () { return CreditConfigModels_1.CreditEligibilityRulesModel; } });
|
|
24
|
+
Object.defineProperty(exports, "CreditLevelConfigModel", { enumerable: true, get: function () { return CreditConfigModels_1.CreditLevelConfigModel; } });
|
|
25
|
+
Object.defineProperty(exports, "CreditScoreConfigModel", { enumerable: true, get: function () { return CreditConfigModels_1.CreditScoreConfigModel; } });
|
|
26
|
+
Object.defineProperty(exports, "CreditInterestRateConfigModel", { enumerable: true, get: function () { return CreditConfigModels_1.CreditInterestRateConfigModel; } });
|
|
27
|
+
Object.defineProperty(exports, "CreditSplitConfigModel", { enumerable: true, get: function () { return CreditConfigModels_1.CreditSplitConfigModel; } });
|
|
28
|
+
Object.defineProperty(exports, "CreditExposureLimitsModel", { enumerable: true, get: function () { return CreditConfigModels_1.CreditExposureLimitsModel; } });
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const CreditPartnerConfigModel: import("dynamoose/dist/General").ModelType<import("dynamoose/dist/Item").AnyItem>;
|
|
2
|
+
export declare const CreditEligibilityRulesModel: import("dynamoose/dist/General").ModelType<import("dynamoose/dist/Item").AnyItem>;
|
|
3
|
+
export declare const CreditLevelConfigModel: import("dynamoose/dist/General").ModelType<import("dynamoose/dist/Item").AnyItem>;
|
|
4
|
+
export declare const CreditScoreConfigModel: import("dynamoose/dist/General").ModelType<import("dynamoose/dist/Item").AnyItem>;
|
|
5
|
+
export declare const CreditInterestRateConfigModel: import("dynamoose/dist/General").ModelType<import("dynamoose/dist/Item").AnyItem>;
|
|
6
|
+
export declare const CreditSplitConfigModel: import("dynamoose/dist/General").ModelType<import("dynamoose/dist/Item").AnyItem>;
|
|
7
|
+
export declare const CreditExposureLimitsModel: import("dynamoose/dist/General").ModelType<import("dynamoose/dist/Item").AnyItem>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CreditExposureLimitsModel = exports.CreditSplitConfigModel = exports.CreditInterestRateConfigModel = exports.CreditScoreConfigModel = exports.CreditLevelConfigModel = exports.CreditEligibilityRulesModel = exports.CreditPartnerConfigModel = void 0;
|
|
7
|
+
const dynamoose_1 = __importDefault(require("dynamoose"));
|
|
8
|
+
/**
|
|
9
|
+
* Schema generico para tablas de configuracion de credito.
|
|
10
|
+
* Todas usan pk/sk como composite key y saveUnknown para flexibilidad.
|
|
11
|
+
*/
|
|
12
|
+
const configSchema = new dynamoose_1.default.Schema({
|
|
13
|
+
pk: { type: String, hashKey: true },
|
|
14
|
+
sk: { type: String, rangeKey: true },
|
|
15
|
+
}, {
|
|
16
|
+
saveUnknown: true,
|
|
17
|
+
timestamps: false,
|
|
18
|
+
});
|
|
19
|
+
exports.CreditPartnerConfigModel = dynamoose_1.default.model(process.env.CREDIT_PARTNER_CONFIG_TABLE || 'CreditPartnerConfig_GT', configSchema);
|
|
20
|
+
exports.CreditEligibilityRulesModel = dynamoose_1.default.model(process.env.CREDIT_ELIGIBILITY_RULES_TABLE || 'CreditEligibilityRules_GT', configSchema);
|
|
21
|
+
exports.CreditLevelConfigModel = dynamoose_1.default.model(process.env.CREDIT_LEVEL_CONFIG_TABLE || 'CreditLevelConfig_GT', configSchema);
|
|
22
|
+
exports.CreditScoreConfigModel = dynamoose_1.default.model(process.env.CREDIT_SCORE_CONFIG_TABLE || 'CreditScoreConfig_GT', configSchema);
|
|
23
|
+
exports.CreditInterestRateConfigModel = dynamoose_1.default.model(process.env.CREDIT_INTEREST_RATE_TABLE || 'CreditInterestRateConfig_GT', configSchema);
|
|
24
|
+
exports.CreditSplitConfigModel = dynamoose_1.default.model(process.env.CREDIT_SPLIT_CONFIG_TABLE || 'CreditSplitConfig_GT', configSchema);
|
|
25
|
+
exports.CreditExposureLimitsModel = dynamoose_1.default.model(process.env.CREDIT_EXPOSURE_LIMITS_TABLE || 'CreditExposureLimits_GT', configSchema);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CreditFinancialProfileHistoryModel: import("dynamoose/dist/General").ModelType<import("dynamoose/dist/Item").AnyItem>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CreditFinancialProfileHistoryModel = void 0;
|
|
7
|
+
const dynamoose_1 = __importDefault(require("dynamoose"));
|
|
8
|
+
const schema = new dynamoose_1.default.Schema({
|
|
9
|
+
pk: { type: String, hashKey: true },
|
|
10
|
+
sk: { type: String, rangeKey: true },
|
|
11
|
+
directory_id: { type: String },
|
|
12
|
+
partner_id: { type: String },
|
|
13
|
+
snapshot_date: { type: String },
|
|
14
|
+
monthly_income_usd: { type: Number },
|
|
15
|
+
monthly_expenses_usd: { type: Number },
|
|
16
|
+
monthly_wallet_loads_usd: { type: Number },
|
|
17
|
+
average_balance_90d_usd: { type: Number },
|
|
18
|
+
score_total: { type: Number },
|
|
19
|
+
credit_level: { type: String },
|
|
20
|
+
max_credit_amount_mxn: { type: Number },
|
|
21
|
+
is_eligible: { type: String },
|
|
22
|
+
}, {
|
|
23
|
+
saveUnknown: false,
|
|
24
|
+
timestamps: false,
|
|
25
|
+
});
|
|
26
|
+
exports.CreditFinancialProfileHistoryModel = dynamoose_1.default.model(process.env.CREDIT_FINANCIAL_PROFILE_HISTORY_TABLE || 'CreditFinancialProfileHistory_GT', schema);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CreditFinancialProfileModel: import("dynamoose/dist/General").ModelType<import("dynamoose/dist/Item").AnyItem>;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CreditFinancialProfileModel = void 0;
|
|
7
|
+
const dynamoose_1 = __importDefault(require("dynamoose"));
|
|
8
|
+
const schema = new dynamoose_1.default.Schema({
|
|
9
|
+
pk: { type: String, hashKey: true },
|
|
10
|
+
sk: { type: String, rangeKey: true },
|
|
11
|
+
directory_id: { type: String },
|
|
12
|
+
partner_id: { type: String },
|
|
13
|
+
calculation_date: { type: String },
|
|
14
|
+
// Income
|
|
15
|
+
total_income_sources: { type: Number },
|
|
16
|
+
primary_sources: { type: Number },
|
|
17
|
+
secondary_sources: { type: Number },
|
|
18
|
+
has_regular_income: { type: String },
|
|
19
|
+
total_income_90d_usd: { type: Number },
|
|
20
|
+
monthly_income_usd: { type: Number },
|
|
21
|
+
primary_income_usd: { type: Number },
|
|
22
|
+
secondary_income_usd: { type: Number },
|
|
23
|
+
dominant_frequency: { type: String },
|
|
24
|
+
days_since_last_deposit: { type: Number },
|
|
25
|
+
primary_amount_variation_pct: { type: Number },
|
|
26
|
+
// Expenses
|
|
27
|
+
total_expenses_90d_usd: { type: Number },
|
|
28
|
+
monthly_expenses_usd: { type: Number },
|
|
29
|
+
expense_income_ratio: { type: Number },
|
|
30
|
+
// Wallet loads
|
|
31
|
+
sends_to_mexico_wallet: { type: String },
|
|
32
|
+
total_wallet_loads_90d_usd: { type: Number },
|
|
33
|
+
monthly_wallet_loads_usd: { type: Number },
|
|
34
|
+
wallet_load_count_90d: { type: Number },
|
|
35
|
+
avg_wallet_load_usd: { type: Number },
|
|
36
|
+
wallet_load_income_ratio: { type: Number },
|
|
37
|
+
days_since_last_wallet_load: { type: Number },
|
|
38
|
+
wallet_load_frequency: { type: String },
|
|
39
|
+
// Balance
|
|
40
|
+
current_balance_usd: { type: Number },
|
|
41
|
+
average_balance_90d_usd: { type: Number },
|
|
42
|
+
balance_income_ratio: { type: Number },
|
|
43
|
+
// Seniority
|
|
44
|
+
registration_date: { type: String },
|
|
45
|
+
months_in_platform: { type: Number },
|
|
46
|
+
// Exchange rate
|
|
47
|
+
exchange_rate_usd_mxn: { type: Number },
|
|
48
|
+
monthly_income_mxn: { type: Number },
|
|
49
|
+
// Scores
|
|
50
|
+
score_income_stability: { type: Number },
|
|
51
|
+
score_payment_capacity: { type: Number },
|
|
52
|
+
score_mexico_transfers: { type: Number },
|
|
53
|
+
score_seniority: { type: Number },
|
|
54
|
+
score_income_level: { type: Number },
|
|
55
|
+
score_total: { type: Number },
|
|
56
|
+
// Level & Credit
|
|
57
|
+
credit_level: {
|
|
58
|
+
type: String,
|
|
59
|
+
index: {
|
|
60
|
+
type: 'global',
|
|
61
|
+
name: 'credit_level-is_eligible-index',
|
|
62
|
+
rangeKey: 'is_eligible',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
max_credit_amount_mxn: { type: Number },
|
|
66
|
+
has_active_credit: { type: String },
|
|
67
|
+
is_eligible: { type: String },
|
|
68
|
+
ineligibility_reason: { type: String },
|
|
69
|
+
// Gamification
|
|
70
|
+
score_to_next_level: { type: Number },
|
|
71
|
+
next_level: { type: String },
|
|
72
|
+
next_level_max_credit_mxn: { type: Number },
|
|
73
|
+
progress_pct: { type: Number },
|
|
74
|
+
recommendation_1: { type: String },
|
|
75
|
+
recommendation_1_points: { type: Number },
|
|
76
|
+
recommendation_2: { type: String },
|
|
77
|
+
recommendation_2_points: { type: Number },
|
|
78
|
+
last_level_change_date: { type: String },
|
|
79
|
+
level_change_direction: { type: String },
|
|
80
|
+
// Audit
|
|
81
|
+
created_at: { type: String },
|
|
82
|
+
updated_at: { type: String },
|
|
83
|
+
}, {
|
|
84
|
+
saveUnknown: false,
|
|
85
|
+
timestamps: false,
|
|
86
|
+
});
|
|
87
|
+
exports.CreditFinancialProfileModel = dynamoose_1.default.model(process.env.CREDIT_FINANCIAL_PROFILE_TABLE || 'CreditFinancialProfile_GT', schema);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CreditIncomeSourceModel: import("dynamoose/dist/General").ModelType<import("dynamoose/dist/Item").AnyItem>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CreditIncomeSourceModel = void 0;
|
|
7
|
+
const dynamoose_1 = __importDefault(require("dynamoose"));
|
|
8
|
+
const schema = new dynamoose_1.default.Schema({
|
|
9
|
+
pk: { type: String, hashKey: true },
|
|
10
|
+
sk: { type: String, rangeKey: true },
|
|
11
|
+
directory_id: { type: String },
|
|
12
|
+
normalized_memo: { type: String },
|
|
13
|
+
first_detection: { type: String },
|
|
14
|
+
last_detection: { type: String },
|
|
15
|
+
total_deposits_90d: { type: Number },
|
|
16
|
+
total_amount_90d_usd: { type: Number },
|
|
17
|
+
average_amount_usd: { type: Number },
|
|
18
|
+
min_amount_usd: { type: Number },
|
|
19
|
+
max_amount_usd: { type: Number },
|
|
20
|
+
amount_variation_pct: { type: Number },
|
|
21
|
+
avg_days_between_deposits: { type: Number },
|
|
22
|
+
detected_frequency: { type: String },
|
|
23
|
+
income_share_pct: { type: Number },
|
|
24
|
+
classification: {
|
|
25
|
+
type: String,
|
|
26
|
+
index: {
|
|
27
|
+
type: 'global',
|
|
28
|
+
name: 'classification-index',
|
|
29
|
+
rangeKey: 'directory_id',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
created_at: { type: String },
|
|
33
|
+
updated_at: { type: String },
|
|
34
|
+
}, {
|
|
35
|
+
saveUnknown: false,
|
|
36
|
+
timestamps: false,
|
|
37
|
+
});
|
|
38
|
+
exports.CreditIncomeSourceModel = dynamoose_1.default.model(process.env.CREDIT_INCOME_SOURCE_TABLE || 'CreditIncomeSource_GT', schema);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CreditNurturingBannerModel: import("dynamoose/dist/General").ModelType<import("dynamoose/dist/Item").AnyItem>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CreditNurturingBannerModel = void 0;
|
|
7
|
+
const dynamoose_1 = __importDefault(require("dynamoose"));
|
|
8
|
+
const schema = new dynamoose_1.default.Schema({
|
|
9
|
+
pk: { type: String, hashKey: true },
|
|
10
|
+
sk: { type: String, rangeKey: true },
|
|
11
|
+
directory_id: { type: String },
|
|
12
|
+
partner_id: { type: String },
|
|
13
|
+
banner_state: {
|
|
14
|
+
type: String,
|
|
15
|
+
index: {
|
|
16
|
+
type: 'global',
|
|
17
|
+
name: 'banner_state-index',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
payroll_deposits_count: { type: Number },
|
|
21
|
+
payroll_deposits_required: { type: Number, default: 4 },
|
|
22
|
+
potential_credit_mxn: { type: Number },
|
|
23
|
+
actual_credit_mxn: { type: Number },
|
|
24
|
+
active_credit_id: { type: String },
|
|
25
|
+
next_payment_date: { type: String },
|
|
26
|
+
next_payment_amount_mxn: { type: Number },
|
|
27
|
+
last_calculated_at: { type: String },
|
|
28
|
+
}, {
|
|
29
|
+
saveUnknown: false,
|
|
30
|
+
timestamps: false,
|
|
31
|
+
});
|
|
32
|
+
exports.CreditNurturingBannerModel = dynamoose_1.default.model(process.env.CREDIT_NURTURING_BANNER_TABLE || 'CreditNurturingBanner_GT', schema);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CreditOffersModel: import("dynamoose/dist/General").ModelType<import("dynamoose/dist/Item").AnyItem>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CreditOffersModel = void 0;
|
|
7
|
+
const dynamoose_1 = __importDefault(require("dynamoose"));
|
|
8
|
+
const schema = new dynamoose_1.default.Schema({
|
|
9
|
+
pk: { type: String, hashKey: true },
|
|
10
|
+
sk: { type: String, rangeKey: true },
|
|
11
|
+
offer_id: { type: String },
|
|
12
|
+
directory_id: { type: String },
|
|
13
|
+
partner_id: { type: String },
|
|
14
|
+
status: {
|
|
15
|
+
type: String,
|
|
16
|
+
index: {
|
|
17
|
+
type: 'global',
|
|
18
|
+
name: 'status-offer_expires_at-index',
|
|
19
|
+
rangeKey: 'offer_expires_at',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
credit_level: { type: String },
|
|
23
|
+
max_amount_mxn: { type: Number },
|
|
24
|
+
selected_amount_mxn: { type: Number },
|
|
25
|
+
offer_expires_at: { type: String },
|
|
26
|
+
options: { type: Array, schema: [{ type: Object }] },
|
|
27
|
+
created_at: { type: String },
|
|
28
|
+
updated_at: { type: String },
|
|
29
|
+
}, {
|
|
30
|
+
saveUnknown: true,
|
|
31
|
+
timestamps: false,
|
|
32
|
+
});
|
|
33
|
+
exports.CreditOffersModel = dynamoose_1.default.model(process.env.CREDIT_OFFERS_TABLE || 'CreditOffers_GT', schema);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CreditProcessControlModel: import("dynamoose/dist/General").ModelType<import("dynamoose/dist/Item").AnyItem>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CreditProcessControlModel = void 0;
|
|
7
|
+
const dynamoose_1 = __importDefault(require("dynamoose"));
|
|
8
|
+
const schema = new dynamoose_1.default.Schema({
|
|
9
|
+
pk: { type: String, hashKey: true },
|
|
10
|
+
sk: { type: String, rangeKey: true },
|
|
11
|
+
process_name: { type: String },
|
|
12
|
+
execution_date: {
|
|
13
|
+
type: String,
|
|
14
|
+
index: {
|
|
15
|
+
type: 'global',
|
|
16
|
+
name: 'status-execution_date-index',
|
|
17
|
+
rangeKey: 'execution_date',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
status: { type: String },
|
|
21
|
+
total_clients: { type: Number, default: 0 },
|
|
22
|
+
processed: { type: Number, default: 0 },
|
|
23
|
+
errors: { type: Number, default: 0 },
|
|
24
|
+
started_at: { type: String },
|
|
25
|
+
completed_at: { type: String },
|
|
26
|
+
error_details: { type: String },
|
|
27
|
+
}, {
|
|
28
|
+
saveUnknown: false,
|
|
29
|
+
timestamps: false,
|
|
30
|
+
});
|
|
31
|
+
exports.CreditProcessControlModel = dynamoose_1.default.model(process.env.CREDIT_PROCESS_CONTROL_TABLE || 'CreditProcessControl_GT', schema);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FiadoIncCentralPaymentTxModel: import("dynamoose/dist/General").ModelType<import("dynamoose/dist/Item").AnyItem>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.FiadoIncCentralPaymentTxModel = void 0;
|
|
7
|
+
const dynamoose_1 = __importDefault(require("dynamoose"));
|
|
8
|
+
const schema = new dynamoose_1.default.Schema({
|
|
9
|
+
id: { type: String, hashKey: true },
|
|
10
|
+
directory_id: { type: String },
|
|
11
|
+
account_id: { type: String },
|
|
12
|
+
people_id: { type: String },
|
|
13
|
+
tenant_id: { type: String },
|
|
14
|
+
transaction_type: { type: String },
|
|
15
|
+
amount: { type: Number },
|
|
16
|
+
status: { type: String },
|
|
17
|
+
program_id: { type: String },
|
|
18
|
+
operation: { type: String },
|
|
19
|
+
transaction_datetime: { type: String },
|
|
20
|
+
additional_data: { type: String },
|
|
21
|
+
transaction_impact: { type: String },
|
|
22
|
+
createdAt: { type: Number },
|
|
23
|
+
}, {
|
|
24
|
+
saveUnknown: true,
|
|
25
|
+
timestamps: false,
|
|
26
|
+
});
|
|
27
|
+
exports.FiadoIncCentralPaymentTxModel = dynamoose_1.default.model(process.env.CENTRAL_PAYMENT_TX_TABLE || 'FiadoIncCentralPaymentTx_GT', schema);
|
package/jest.config.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fiado/credit-data",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Modelos Dynamoose compartidos para el dominio Credit (worker, engine, admin, collector)",
|
|
5
|
+
"main": "bin/index.js",
|
|
6
|
+
"types": "bin/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "jest",
|
|
9
|
+
"build": "tsc"
|
|
10
|
+
},
|
|
11
|
+
"author": "Fiado Inc",
|
|
12
|
+
"license": "ISC",
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@fiado/logger": "^1.0.3",
|
|
15
|
+
"dynamoose": "^4.0.2"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@types/node": "^22.9.3",
|
|
19
|
+
"jest": "^29.7.0",
|
|
20
|
+
"ts-jest": "^29.2.5",
|
|
21
|
+
"@types/jest": "^29.5.14"
|
|
22
|
+
}
|
|
23
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Modelos operativos
|
|
2
|
+
export { CreditFinancialProfileModel } from './models/CreditFinancialProfileModel';
|
|
3
|
+
export { CreditFinancialProfileHistoryModel } from './models/CreditFinancialProfileHistoryModel';
|
|
4
|
+
export { CreditNurturingBannerModel } from './models/CreditNurturingBannerModel';
|
|
5
|
+
export { CreditIncomeSourceModel } from './models/CreditIncomeSourceModel';
|
|
6
|
+
export { CreditOffersModel } from './models/CreditOffersModel';
|
|
7
|
+
export { CreditProcessControlModel } from './models/CreditProcessControlModel';
|
|
8
|
+
|
|
9
|
+
// Modelo existente (solo lectura)
|
|
10
|
+
export { FiadoIncCentralPaymentTxModel } from './models/FiadoIncCentralPaymentTxModel';
|
|
11
|
+
|
|
12
|
+
// Modelos de configuracion
|
|
13
|
+
export {
|
|
14
|
+
CreditPartnerConfigModel,
|
|
15
|
+
CreditEligibilityRulesModel,
|
|
16
|
+
CreditLevelConfigModel,
|
|
17
|
+
CreditScoreConfigModel,
|
|
18
|
+
CreditInterestRateConfigModel,
|
|
19
|
+
CreditSplitConfigModel,
|
|
20
|
+
CreditExposureLimitsModel,
|
|
21
|
+
} from './models/CreditConfigModels';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import dynamoose from 'dynamoose';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Schema generico para tablas de configuracion de credito.
|
|
5
|
+
* Todas usan pk/sk como composite key y saveUnknown para flexibilidad.
|
|
6
|
+
*/
|
|
7
|
+
const configSchema = new dynamoose.Schema({
|
|
8
|
+
pk: { type: String, hashKey: true },
|
|
9
|
+
sk: { type: String, rangeKey: true },
|
|
10
|
+
}, {
|
|
11
|
+
saveUnknown: true,
|
|
12
|
+
timestamps: false,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export const CreditPartnerConfigModel = dynamoose.model(
|
|
16
|
+
process.env.CREDIT_PARTNER_CONFIG_TABLE || 'CreditPartnerConfig_GT',
|
|
17
|
+
configSchema
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
export const CreditEligibilityRulesModel = dynamoose.model(
|
|
21
|
+
process.env.CREDIT_ELIGIBILITY_RULES_TABLE || 'CreditEligibilityRules_GT',
|
|
22
|
+
configSchema
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
export const CreditLevelConfigModel = dynamoose.model(
|
|
26
|
+
process.env.CREDIT_LEVEL_CONFIG_TABLE || 'CreditLevelConfig_GT',
|
|
27
|
+
configSchema
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
export const CreditScoreConfigModel = dynamoose.model(
|
|
31
|
+
process.env.CREDIT_SCORE_CONFIG_TABLE || 'CreditScoreConfig_GT',
|
|
32
|
+
configSchema
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
export const CreditInterestRateConfigModel = dynamoose.model(
|
|
36
|
+
process.env.CREDIT_INTEREST_RATE_TABLE || 'CreditInterestRateConfig_GT',
|
|
37
|
+
configSchema
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
export const CreditSplitConfigModel = dynamoose.model(
|
|
41
|
+
process.env.CREDIT_SPLIT_CONFIG_TABLE || 'CreditSplitConfig_GT',
|
|
42
|
+
configSchema
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
export const CreditExposureLimitsModel = dynamoose.model(
|
|
46
|
+
process.env.CREDIT_EXPOSURE_LIMITS_TABLE || 'CreditExposureLimits_GT',
|
|
47
|
+
configSchema
|
|
48
|
+
);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import dynamoose from 'dynamoose';
|
|
2
|
+
|
|
3
|
+
const schema = new dynamoose.Schema({
|
|
4
|
+
pk: { type: String, hashKey: true },
|
|
5
|
+
sk: { type: String, rangeKey: true },
|
|
6
|
+
directory_id: { type: String },
|
|
7
|
+
partner_id: { type: String },
|
|
8
|
+
snapshot_date: { type: String },
|
|
9
|
+
monthly_income_usd: { type: Number },
|
|
10
|
+
monthly_expenses_usd: { type: Number },
|
|
11
|
+
monthly_wallet_loads_usd: { type: Number },
|
|
12
|
+
average_balance_90d_usd: { type: Number },
|
|
13
|
+
score_total: { type: Number },
|
|
14
|
+
credit_level: { type: String },
|
|
15
|
+
max_credit_amount_mxn: { type: Number },
|
|
16
|
+
is_eligible: { type: String },
|
|
17
|
+
}, {
|
|
18
|
+
saveUnknown: false,
|
|
19
|
+
timestamps: false,
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export const CreditFinancialProfileHistoryModel = dynamoose.model(
|
|
23
|
+
process.env.CREDIT_FINANCIAL_PROFILE_HISTORY_TABLE || 'CreditFinancialProfileHistory_GT',
|
|
24
|
+
schema
|
|
25
|
+
);
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import dynamoose from 'dynamoose';
|
|
2
|
+
|
|
3
|
+
const schema = new dynamoose.Schema({
|
|
4
|
+
pk: { type: String, hashKey: true },
|
|
5
|
+
sk: { type: String, rangeKey: true },
|
|
6
|
+
directory_id: { type: String },
|
|
7
|
+
partner_id: { type: String },
|
|
8
|
+
calculation_date: { type: String },
|
|
9
|
+
// Income
|
|
10
|
+
total_income_sources: { type: Number },
|
|
11
|
+
primary_sources: { type: Number },
|
|
12
|
+
secondary_sources: { type: Number },
|
|
13
|
+
has_regular_income: { type: String },
|
|
14
|
+
total_income_90d_usd: { type: Number },
|
|
15
|
+
monthly_income_usd: { type: Number },
|
|
16
|
+
primary_income_usd: { type: Number },
|
|
17
|
+
secondary_income_usd: { type: Number },
|
|
18
|
+
dominant_frequency: { type: String },
|
|
19
|
+
days_since_last_deposit: { type: Number },
|
|
20
|
+
primary_amount_variation_pct: { type: Number },
|
|
21
|
+
// Expenses
|
|
22
|
+
total_expenses_90d_usd: { type: Number },
|
|
23
|
+
monthly_expenses_usd: { type: Number },
|
|
24
|
+
expense_income_ratio: { type: Number },
|
|
25
|
+
// Wallet loads
|
|
26
|
+
sends_to_mexico_wallet: { type: String },
|
|
27
|
+
total_wallet_loads_90d_usd: { type: Number },
|
|
28
|
+
monthly_wallet_loads_usd: { type: Number },
|
|
29
|
+
wallet_load_count_90d: { type: Number },
|
|
30
|
+
avg_wallet_load_usd: { type: Number },
|
|
31
|
+
wallet_load_income_ratio: { type: Number },
|
|
32
|
+
days_since_last_wallet_load: { type: Number },
|
|
33
|
+
wallet_load_frequency: { type: String },
|
|
34
|
+
// Balance
|
|
35
|
+
current_balance_usd: { type: Number },
|
|
36
|
+
average_balance_90d_usd: { type: Number },
|
|
37
|
+
balance_income_ratio: { type: Number },
|
|
38
|
+
// Seniority
|
|
39
|
+
registration_date: { type: String },
|
|
40
|
+
months_in_platform: { type: Number },
|
|
41
|
+
// Exchange rate
|
|
42
|
+
exchange_rate_usd_mxn: { type: Number },
|
|
43
|
+
monthly_income_mxn: { type: Number },
|
|
44
|
+
// Scores
|
|
45
|
+
score_income_stability: { type: Number },
|
|
46
|
+
score_payment_capacity: { type: Number },
|
|
47
|
+
score_mexico_transfers: { type: Number },
|
|
48
|
+
score_seniority: { type: Number },
|
|
49
|
+
score_income_level: { type: Number },
|
|
50
|
+
score_total: { type: Number },
|
|
51
|
+
// Level & Credit
|
|
52
|
+
credit_level: {
|
|
53
|
+
type: String,
|
|
54
|
+
index: {
|
|
55
|
+
type: 'global',
|
|
56
|
+
name: 'credit_level-is_eligible-index',
|
|
57
|
+
rangeKey: 'is_eligible',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
max_credit_amount_mxn: { type: Number },
|
|
61
|
+
has_active_credit: { type: String },
|
|
62
|
+
is_eligible: { type: String },
|
|
63
|
+
ineligibility_reason: { type: String },
|
|
64
|
+
// Gamification
|
|
65
|
+
score_to_next_level: { type: Number },
|
|
66
|
+
next_level: { type: String },
|
|
67
|
+
next_level_max_credit_mxn: { type: Number },
|
|
68
|
+
progress_pct: { type: Number },
|
|
69
|
+
recommendation_1: { type: String },
|
|
70
|
+
recommendation_1_points: { type: Number },
|
|
71
|
+
recommendation_2: { type: String },
|
|
72
|
+
recommendation_2_points: { type: Number },
|
|
73
|
+
last_level_change_date: { type: String },
|
|
74
|
+
level_change_direction: { type: String },
|
|
75
|
+
// Audit
|
|
76
|
+
created_at: { type: String },
|
|
77
|
+
updated_at: { type: String },
|
|
78
|
+
}, {
|
|
79
|
+
saveUnknown: false,
|
|
80
|
+
timestamps: false,
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
export const CreditFinancialProfileModel = dynamoose.model(
|
|
84
|
+
process.env.CREDIT_FINANCIAL_PROFILE_TABLE || 'CreditFinancialProfile_GT',
|
|
85
|
+
schema
|
|
86
|
+
);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import dynamoose from 'dynamoose';
|
|
2
|
+
|
|
3
|
+
const schema = new dynamoose.Schema({
|
|
4
|
+
pk: { type: String, hashKey: true },
|
|
5
|
+
sk: { type: String, rangeKey: true },
|
|
6
|
+
directory_id: { type: String },
|
|
7
|
+
normalized_memo: { type: String },
|
|
8
|
+
first_detection: { type: String },
|
|
9
|
+
last_detection: { type: String },
|
|
10
|
+
total_deposits_90d: { type: Number },
|
|
11
|
+
total_amount_90d_usd: { type: Number },
|
|
12
|
+
average_amount_usd: { type: Number },
|
|
13
|
+
min_amount_usd: { type: Number },
|
|
14
|
+
max_amount_usd: { type: Number },
|
|
15
|
+
amount_variation_pct: { type: Number },
|
|
16
|
+
avg_days_between_deposits: { type: Number },
|
|
17
|
+
detected_frequency: { type: String },
|
|
18
|
+
income_share_pct: { type: Number },
|
|
19
|
+
classification: {
|
|
20
|
+
type: String,
|
|
21
|
+
index: {
|
|
22
|
+
type: 'global',
|
|
23
|
+
name: 'classification-index',
|
|
24
|
+
rangeKey: 'directory_id',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
created_at: { type: String },
|
|
28
|
+
updated_at: { type: String },
|
|
29
|
+
}, {
|
|
30
|
+
saveUnknown: false,
|
|
31
|
+
timestamps: false,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export const CreditIncomeSourceModel = dynamoose.model(
|
|
35
|
+
process.env.CREDIT_INCOME_SOURCE_TABLE || 'CreditIncomeSource_GT',
|
|
36
|
+
schema
|
|
37
|
+
);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import dynamoose from 'dynamoose';
|
|
2
|
+
|
|
3
|
+
const schema = new dynamoose.Schema({
|
|
4
|
+
pk: { type: String, hashKey: true },
|
|
5
|
+
sk: { type: String, rangeKey: true },
|
|
6
|
+
directory_id: { type: String },
|
|
7
|
+
partner_id: { type: String },
|
|
8
|
+
banner_state: {
|
|
9
|
+
type: String,
|
|
10
|
+
index: {
|
|
11
|
+
type: 'global',
|
|
12
|
+
name: 'banner_state-index',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
payroll_deposits_count: { type: Number },
|
|
16
|
+
payroll_deposits_required: { type: Number, default: 4 },
|
|
17
|
+
potential_credit_mxn: { type: Number },
|
|
18
|
+
actual_credit_mxn: { type: Number },
|
|
19
|
+
active_credit_id: { type: String },
|
|
20
|
+
next_payment_date: { type: String },
|
|
21
|
+
next_payment_amount_mxn: { type: Number },
|
|
22
|
+
last_calculated_at: { type: String },
|
|
23
|
+
}, {
|
|
24
|
+
saveUnknown: false,
|
|
25
|
+
timestamps: false,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export const CreditNurturingBannerModel = dynamoose.model(
|
|
29
|
+
process.env.CREDIT_NURTURING_BANNER_TABLE || 'CreditNurturingBanner_GT',
|
|
30
|
+
schema
|
|
31
|
+
);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import dynamoose from 'dynamoose';
|
|
2
|
+
|
|
3
|
+
const schema = new dynamoose.Schema({
|
|
4
|
+
pk: { type: String, hashKey: true },
|
|
5
|
+
sk: { type: String, rangeKey: true },
|
|
6
|
+
offer_id: { type: String },
|
|
7
|
+
directory_id: { type: String },
|
|
8
|
+
partner_id: { type: String },
|
|
9
|
+
status: {
|
|
10
|
+
type: String,
|
|
11
|
+
index: {
|
|
12
|
+
type: 'global',
|
|
13
|
+
name: 'status-offer_expires_at-index',
|
|
14
|
+
rangeKey: 'offer_expires_at',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
credit_level: { type: String },
|
|
18
|
+
max_amount_mxn: { type: Number },
|
|
19
|
+
selected_amount_mxn: { type: Number },
|
|
20
|
+
offer_expires_at: { type: String },
|
|
21
|
+
options: { type: Array, schema: [{ type: Object }] },
|
|
22
|
+
created_at: { type: String },
|
|
23
|
+
updated_at: { type: String },
|
|
24
|
+
}, {
|
|
25
|
+
saveUnknown: true,
|
|
26
|
+
timestamps: false,
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export const CreditOffersModel = dynamoose.model(
|
|
30
|
+
process.env.CREDIT_OFFERS_TABLE || 'CreditOffers_GT',
|
|
31
|
+
schema
|
|
32
|
+
);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import dynamoose from 'dynamoose';
|
|
2
|
+
|
|
3
|
+
const schema = new dynamoose.Schema({
|
|
4
|
+
pk: { type: String, hashKey: true },
|
|
5
|
+
sk: { type: String, rangeKey: true },
|
|
6
|
+
process_name: { type: String },
|
|
7
|
+
execution_date: {
|
|
8
|
+
type: String,
|
|
9
|
+
index: {
|
|
10
|
+
type: 'global',
|
|
11
|
+
name: 'status-execution_date-index',
|
|
12
|
+
rangeKey: 'execution_date',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
status: { type: String },
|
|
16
|
+
total_clients: { type: Number, default: 0 },
|
|
17
|
+
processed: { type: Number, default: 0 },
|
|
18
|
+
errors: { type: Number, default: 0 },
|
|
19
|
+
started_at: { type: String },
|
|
20
|
+
completed_at: { type: String },
|
|
21
|
+
error_details: { type: String },
|
|
22
|
+
}, {
|
|
23
|
+
saveUnknown: false,
|
|
24
|
+
timestamps: false,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export const CreditProcessControlModel = dynamoose.model(
|
|
28
|
+
process.env.CREDIT_PROCESS_CONTROL_TABLE || 'CreditProcessControl_GT',
|
|
29
|
+
schema
|
|
30
|
+
);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import dynamoose from 'dynamoose';
|
|
2
|
+
|
|
3
|
+
const schema = new dynamoose.Schema({
|
|
4
|
+
id: { type: String, hashKey: true },
|
|
5
|
+
directory_id: { type: String },
|
|
6
|
+
account_id: { type: String },
|
|
7
|
+
people_id: { type: String },
|
|
8
|
+
tenant_id: { type: String },
|
|
9
|
+
transaction_type: { type: String },
|
|
10
|
+
amount: { type: Number },
|
|
11
|
+
status: { type: String },
|
|
12
|
+
program_id: { type: String },
|
|
13
|
+
operation: { type: String },
|
|
14
|
+
transaction_datetime: { type: String },
|
|
15
|
+
additional_data: { type: String },
|
|
16
|
+
transaction_impact: { type: String },
|
|
17
|
+
createdAt: { type: Number },
|
|
18
|
+
}, {
|
|
19
|
+
saveUnknown: true,
|
|
20
|
+
timestamps: false,
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export const FiadoIncCentralPaymentTxModel = dynamoose.model(
|
|
24
|
+
process.env.CENTRAL_PAYMENT_TX_TABLE || 'FiadoIncCentralPaymentTx_GT',
|
|
25
|
+
schema
|
|
26
|
+
);
|