@fiado/type-kit 3.1.30 → 3.2.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.
Files changed (238) hide show
  1. package/bin/cognitoConnector/dtos/SignUpBackofficeRequest.d.ts +13 -0
  2. package/bin/cognitoConnector/dtos/SignUpBackofficeRequest.js +71 -0
  3. package/bin/comission-business/dtos/GenerateReportRequest.d.ts +10 -0
  4. package/bin/comission-business/dtos/GenerateReportRequest.js +2 -0
  5. package/bin/comission-business/dtos/GenerateReportResponse.d.ts +6 -0
  6. package/bin/comission-business/dtos/GenerateReportResponse.js +2 -0
  7. package/bin/comission-business/enums/PaymentStatusEnum.d.ts +5 -0
  8. package/bin/comission-business/enums/PaymentStatusEnum.js +9 -0
  9. package/bin/credit/dtos/BannerStateResponse.d.ts +19 -4
  10. package/bin/credit/dtos/BannerStateResponse.js +7 -1
  11. package/bin/credit/dtos/CreditBannerStateResponse.d.ts +10 -0
  12. package/bin/credit/dtos/CreditBannerStateResponse.js +6 -0
  13. package/bin/credit/dtos/CreditDetailResponse.d.ts +23 -0
  14. package/bin/credit/dtos/CreditDetailResponse.js +6 -0
  15. package/bin/credit/dtos/CreditEligibilityResponse.d.ts +9 -0
  16. package/bin/credit/dtos/CreditEligibilityResponse.js +6 -0
  17. package/bin/credit/dtos/CreditMovementResponse.d.ts +20 -0
  18. package/bin/credit/dtos/CreditMovementResponse.js +9 -0
  19. package/bin/credit/dtos/CreditOfferOptionItem.d.ts +6 -0
  20. package/bin/credit/dtos/CreditRequestCreate.d.ts +4 -0
  21. package/bin/credit/dtos/CreditRequestCreate.js +26 -0
  22. package/bin/credit/dtos/CreditRequestResponse.d.ts +7 -0
  23. package/bin/credit/dtos/CreditRequestResponse.js +6 -0
  24. package/bin/credit/dtos/CreditScheduleResponse.d.ts +18 -0
  25. package/bin/credit/dtos/CreditScheduleResponse.js +9 -0
  26. package/bin/credit/dtos/CreditStatementResponse.d.ts +11 -0
  27. package/bin/credit/dtos/CreditStatementResponse.js +9 -0
  28. package/bin/credit/dtos/EarlyPaymentRequest.d.ts +7 -0
  29. package/bin/credit/dtos/EarlyPaymentRequest.js +37 -0
  30. package/bin/credit/dtos/EarlyPaymentResponse.d.ts +11 -0
  31. package/bin/credit/dtos/EarlyPaymentResponse.js +6 -0
  32. package/bin/credit/dtos/EligibilityResponse.d.ts +2 -2
  33. package/bin/credit/dtos/internal/CreditBalanceRequest.d.ts +3 -0
  34. package/bin/credit/dtos/internal/CreditBalanceRequest.js +21 -0
  35. package/bin/credit/dtos/internal/CreditCollectionRequest.d.ts +11 -0
  36. package/bin/credit/dtos/internal/CreditCollectionRequest.js +59 -0
  37. package/bin/credit/dtos/internal/CreditCollectionResponse.d.ts +12 -0
  38. package/bin/credit/dtos/internal/CreditCollectionResponse.js +6 -0
  39. package/bin/credit/dtos/internal/CreditDisbursementRequest.d.ts +7 -0
  40. package/bin/credit/dtos/internal/CreditDisbursementRequest.js +43 -0
  41. package/bin/credit/dtos/internal/CreditDisbursementResponse.d.ts +8 -0
  42. package/bin/credit/dtos/internal/CreditDisbursementResponse.js +6 -0
  43. package/bin/credit/dtos/internal/CreditProfileRequest.d.ts +3 -0
  44. package/bin/credit/dtos/internal/CreditProfileRequest.js +23 -0
  45. package/bin/credit/dtos/internal/CreditReversalRequest.d.ts +5 -0
  46. package/bin/credit/dtos/internal/CreditReversalRequest.js +31 -0
  47. package/bin/credit/dtos/internal/CreditReversalResponse.d.ts +7 -0
  48. package/bin/credit/dtos/internal/CreditReversalResponse.js +6 -0
  49. package/bin/credit/dtos/internal/CreditTransferLoancoRequest.d.ts +8 -0
  50. package/bin/credit/dtos/internal/CreditTransferLoancoRequest.js +46 -0
  51. package/bin/credit/dtos/internal/CreditTransferLoancoResponse.d.ts +8 -0
  52. package/bin/credit/dtos/internal/CreditTransferLoancoResponse.js +6 -0
  53. package/bin/credit/dtos/internal/DocumentSignRequest.d.ts +3 -0
  54. package/bin/credit/dtos/internal/DocumentSignRequest.js +21 -0
  55. package/bin/credit/dtos/internal/LienApplyRequest.d.ts +7 -0
  56. package/bin/credit/dtos/internal/LienApplyRequest.js +45 -0
  57. package/bin/credit/enums/CollectionFrequencyEnum.d.ts +5 -0
  58. package/bin/credit/enums/CollectionFrequencyEnum.js +9 -0
  59. package/bin/credit/enums/CreditOperationEnum.d.ts +11 -0
  60. package/bin/credit/enums/CreditOperationEnum.js +15 -0
  61. package/bin/credit/enums/CreditStatusEnum.d.ts +12 -0
  62. package/bin/credit/enums/CreditStatusEnum.js +16 -0
  63. package/bin/credit/enums/DelinquencyLevelEnum.d.ts +9 -0
  64. package/bin/credit/enums/DelinquencyLevelEnum.js +13 -0
  65. package/bin/credit/enums/DocumentTypeEnum.d.ts +8 -0
  66. package/bin/credit/enums/DocumentTypeEnum.js +12 -0
  67. package/bin/credit/enums/OfferStatusEnum.d.ts +8 -0
  68. package/bin/credit/enums/OfferStatusEnum.js +12 -0
  69. package/bin/credit/enums/PaymentTypeEnum.d.ts +9 -0
  70. package/bin/credit/enums/PaymentTypeEnum.js +13 -0
  71. package/bin/credit/enums/ReconciliationStatusEnum.d.ts +6 -0
  72. package/bin/credit/enums/ReconciliationStatusEnum.js +10 -0
  73. package/bin/credit/enums/TransferStatusEnum.d.ts +8 -0
  74. package/bin/credit/enums/TransferStatusEnum.js +12 -0
  75. package/bin/creditBackoffice/dtos/BackofficeApplicationDetail.d.ts +36 -0
  76. package/bin/creditBackoffice/dtos/BackofficeApplicationDetail.js +14 -0
  77. package/bin/creditBackoffice/dtos/BackofficeApplicationsListItem.d.ts +11 -0
  78. package/bin/creditBackoffice/dtos/BackofficeApplicationsListItem.js +6 -0
  79. package/bin/creditBackoffice/dtos/BackofficeCreditDetail.d.ts +80 -0
  80. package/bin/creditBackoffice/dtos/BackofficeCreditDetail.js +21 -0
  81. package/bin/creditBackoffice/dtos/BackofficeCreditsListItem.d.ts +14 -0
  82. package/bin/creditBackoffice/dtos/BackofficeCreditsListItem.js +6 -0
  83. package/bin/creditBackoffice/dtos/BackofficeIncomeSourceItem.d.ts +13 -0
  84. package/bin/creditBackoffice/dtos/BackofficeIncomeSourceItem.js +6 -0
  85. package/bin/creditBackoffice/dtos/BackofficeOfferDetail.d.ts +35 -0
  86. package/bin/creditBackoffice/dtos/BackofficeOfferDetail.js +14 -0
  87. package/bin/creditBackoffice/dtos/BackofficeOffersListItem.d.ts +16 -0
  88. package/bin/creditBackoffice/dtos/BackofficeOffersListItem.js +6 -0
  89. package/bin/creditBackoffice/dtos/BackofficePagination.d.ts +6 -0
  90. package/bin/creditBackoffice/dtos/BackofficePagination.js +6 -0
  91. package/bin/creditBackoffice/dtos/BackofficePipeline.d.ts +11 -0
  92. package/bin/creditBackoffice/dtos/BackofficePipeline.js +6 -0
  93. package/bin/creditBackoffice/dtos/BackofficePipelineByLevel.d.ts +6 -0
  94. package/bin/creditBackoffice/dtos/BackofficePipelineByLevel.js +6 -0
  95. package/bin/creditBackoffice/dtos/BackofficeProfileDetail.d.ts +68 -0
  96. package/bin/creditBackoffice/dtos/BackofficeProfileDetail.js +13 -0
  97. package/bin/creditBackoffice/dtos/BackofficeProfilesListItem.d.ts +17 -0
  98. package/bin/creditBackoffice/dtos/BackofficeProfilesListItem.js +6 -0
  99. package/bin/creditBackoffice/dtos/BackofficeProfilesListResponse.d.ts +6 -0
  100. package/bin/creditBackoffice/dtos/BackofficeProfilesListResponse.js +6 -0
  101. package/bin/creditBackoffice/dtos/BackofficeProfilesSummary.d.ts +19 -0
  102. package/bin/creditBackoffice/dtos/BackofficeProfilesSummary.js +6 -0
  103. package/bin/creditBackoffice/dtos/ConfigSnapshotListItem.d.ts +10 -0
  104. package/bin/creditBackoffice/dtos/ConfigSnapshotListItem.js +9 -0
  105. package/bin/creditBackoffice/dtos/SimulateImpactRequest.d.ts +9 -0
  106. package/bin/creditBackoffice/dtos/SimulateImpactRequest.js +34 -0
  107. package/bin/creditBackoffice/dtos/SimulateImpactResult.d.ts +46 -0
  108. package/bin/creditBackoffice/dtos/SimulateImpactResult.js +18 -0
  109. package/bin/creditBackoffice/dtos/SimulateInterestRequest.d.ts +8 -0
  110. package/bin/creditBackoffice/dtos/SimulateInterestRequest.js +30 -0
  111. package/bin/creditBackoffice/dtos/SimulateInterestResult.d.ts +10 -0
  112. package/bin/creditBackoffice/dtos/SimulateInterestResult.js +9 -0
  113. package/bin/creditBackoffice/dtos/UpdateConfigRequest.d.ts +10 -0
  114. package/bin/creditBackoffice/dtos/UpdateConfigRequest.js +40 -0
  115. package/bin/creditBackoffice/enums/ConfigType.d.ts +17 -0
  116. package/bin/creditBackoffice/enums/ConfigType.js +21 -0
  117. package/bin/creditBackoffice/index.d.ts +21 -0
  118. package/bin/creditBackoffice/index.js +39 -0
  119. package/bin/creditDashboard/dtos/CohortQualityItem.d.ts +8 -0
  120. package/bin/creditDashboard/dtos/CohortQualityItem.js +6 -0
  121. package/bin/creditDashboard/dtos/DashboardSummary.d.ts +8 -0
  122. package/bin/creditDashboard/dtos/DashboardSummary.js +6 -0
  123. package/bin/creditDashboard/dtos/NurturingFunnelItem.d.ts +5 -0
  124. package/bin/creditDashboard/dtos/NurturingFunnelItem.js +6 -0
  125. package/bin/creditDashboard/dtos/OriginationCompositionResult.d.ts +13 -0
  126. package/bin/creditDashboard/dtos/OriginationCompositionResult.js +6 -0
  127. package/bin/creditDashboard/dtos/OriginationEfficiencyResult.d.ts +8 -0
  128. package/bin/creditDashboard/dtos/OriginationEfficiencyResult.js +6 -0
  129. package/bin/creditDashboard/dtos/OriginationMonthlyItem.d.ts +6 -0
  130. package/bin/creditDashboard/dtos/OriginationMonthlyItem.js +6 -0
  131. package/bin/creditDashboard/dtos/OriginationSummaryResult.d.ts +6 -0
  132. package/bin/creditDashboard/dtos/OriginationSummaryResult.js +6 -0
  133. package/bin/creditDashboard/dtos/OriginationWeeklyItem.d.ts +7 -0
  134. package/bin/creditDashboard/dtos/OriginationWeeklyItem.js +6 -0
  135. package/bin/creditDashboard/dtos/PipelineLevelRow.d.ts +26 -0
  136. package/bin/creditDashboard/dtos/PipelineLevelRow.js +6 -0
  137. package/bin/creditDashboard/dtos/PipelineWeek.d.ts +6 -0
  138. package/bin/creditDashboard/dtos/PipelineWeek.js +6 -0
  139. package/bin/creditDashboard/dtos/PortfolioActiveItem.d.ts +12 -0
  140. package/bin/creditDashboard/dtos/PortfolioActiveItem.js +6 -0
  141. package/bin/creditDashboard/dtos/PortfolioBalance.d.ts +5 -0
  142. package/bin/creditDashboard/dtos/PortfolioBalance.js +6 -0
  143. package/bin/creditDashboard/dtos/PortfolioBalanceMonthlyItem.d.ts +5 -0
  144. package/bin/creditDashboard/dtos/PortfolioBalanceMonthlyItem.js +6 -0
  145. package/bin/creditDashboard/dtos/PortfolioByLevelItem.d.ts +7 -0
  146. package/bin/creditDashboard/dtos/PortfolioByLevelItem.js +6 -0
  147. package/bin/creditDashboard/dtos/PortfolioResolutionItem.d.ts +8 -0
  148. package/bin/creditDashboard/dtos/PortfolioResolutionItem.js +6 -0
  149. package/bin/creditDashboard/dtos/PortfolioUpcomingWeek.d.ts +7 -0
  150. package/bin/creditDashboard/dtos/PortfolioUpcomingWeek.js +6 -0
  151. package/bin/creditDashboard/index.d.ts +16 -0
  152. package/bin/creditDashboard/index.js +32 -0
  153. package/bin/creditEngine/dtos/AdvancedPaymentRequest.d.ts +8 -0
  154. package/bin/creditEngine/dtos/AdvancedPaymentRequest.js +30 -0
  155. package/bin/creditEngine/dtos/AnticipatedPaymentRequest.d.ts +8 -0
  156. package/bin/creditEngine/dtos/AnticipatedPaymentRequest.js +30 -0
  157. package/bin/creditEngine/dtos/CreditDetailResponse.d.ts +25 -11
  158. package/bin/creditEngine/dtos/CreditOriginationRequest.d.ts +4 -1
  159. package/bin/creditEngine/dtos/CreditOriginationRequest.js +11 -0
  160. package/bin/creditEngine/dtos/CreditRequestResult.d.ts +9 -0
  161. package/bin/creditEngine/dtos/CreditRequestResult.js +9 -0
  162. package/bin/creditEngine/dtos/CreditSignatureResult.d.ts +8 -0
  163. package/bin/creditEngine/dtos/CreditSignatureResult.js +9 -0
  164. package/bin/creditEngine/dtos/EarlyPaymentResult.d.ts +9 -0
  165. package/bin/creditEngine/dtos/EarlyPaymentResult.js +9 -0
  166. package/bin/creditEngine/dtos/OfferResult.d.ts +15 -0
  167. package/bin/creditEngine/dtos/OfferResult.js +12 -0
  168. package/bin/creditEngine/dtos/PaymentScheduleItemResponse.d.ts +7 -6
  169. package/bin/creditEngine/dtos/SettlementPaymentRequest.d.ts +7 -0
  170. package/bin/creditEngine/dtos/SettlementPaymentRequest.js +25 -0
  171. package/bin/creditEngine/dtos/SettlementQuote.d.ts +14 -0
  172. package/bin/creditEngine/dtos/SettlementQuote.js +9 -0
  173. package/bin/creditEngine/index.d.ts +8 -0
  174. package/bin/creditEngine/index.js +8 -0
  175. package/bin/customerFile/dtos/CustomerFileSearchRequest.d.ts +5 -0
  176. package/bin/customerFile/dtos/CustomerFileSearchRequest.js +32 -0
  177. package/bin/customerFile/index.d.ts +1 -0
  178. package/bin/customerFile/index.js +17 -0
  179. package/bin/index.d.ts +3 -0
  180. package/bin/index.js +4 -1
  181. package/package.json +1 -1
  182. package/src/credit/dtos/BannerStateResponse.ts +20 -1
  183. package/src/credit/dtos/CreditOfferOptionItem.ts +6 -0
  184. package/src/credit/dtos/EligibilityResponse.ts +2 -2
  185. package/src/creditBackoffice/dtos/BackofficeApplicationDetail.ts +33 -0
  186. package/src/creditBackoffice/dtos/BackofficeApplicationsListItem.ts +11 -0
  187. package/src/creditBackoffice/dtos/BackofficeCreditDetail.ts +78 -0
  188. package/src/creditBackoffice/dtos/BackofficeCreditsListItem.ts +14 -0
  189. package/src/creditBackoffice/dtos/BackofficeIncomeSourceItem.ts +13 -0
  190. package/src/creditBackoffice/dtos/BackofficeOfferDetail.ts +29 -0
  191. package/src/creditBackoffice/dtos/BackofficeOffersListItem.ts +13 -0
  192. package/src/creditBackoffice/dtos/BackofficePagination.ts +6 -0
  193. package/src/creditBackoffice/dtos/BackofficePipeline.ts +9 -0
  194. package/src/creditBackoffice/dtos/BackofficePipelineByLevel.ts +6 -0
  195. package/src/creditBackoffice/dtos/BackofficeProfileDetail.ts +79 -0
  196. package/src/creditBackoffice/dtos/BackofficeProfilesListItem.ts +17 -0
  197. package/src/creditBackoffice/dtos/BackofficeProfilesListResponse.ts +7 -0
  198. package/src/creditBackoffice/dtos/BackofficeProfilesSummary.ts +12 -0
  199. package/src/creditBackoffice/dtos/ConfigSnapshotListItem.ts +10 -0
  200. package/src/creditBackoffice/dtos/SimulateImpactRequest.ts +18 -0
  201. package/src/creditBackoffice/dtos/SimulateImpactResult.ts +41 -0
  202. package/src/creditBackoffice/dtos/SimulateInterestRequest.ts +15 -0
  203. package/src/creditBackoffice/dtos/SimulateInterestResult.ts +11 -0
  204. package/src/creditBackoffice/dtos/UpdateConfigRequest.ts +23 -0
  205. package/src/creditBackoffice/enums/ConfigType.ts +17 -0
  206. package/src/creditBackoffice/index.ts +24 -0
  207. package/src/creditDashboard/dtos/CohortQualityItem.ts +8 -0
  208. package/src/creditDashboard/dtos/DashboardSummary.ts +8 -0
  209. package/src/creditDashboard/dtos/NurturingFunnelItem.ts +5 -0
  210. package/src/creditDashboard/dtos/OriginationCompositionResult.ts +5 -0
  211. package/src/creditDashboard/dtos/OriginationEfficiencyResult.ts +8 -0
  212. package/src/creditDashboard/dtos/OriginationMonthlyItem.ts +6 -0
  213. package/src/creditDashboard/dtos/OriginationSummaryResult.ts +6 -0
  214. package/src/creditDashboard/dtos/OriginationWeeklyItem.ts +7 -0
  215. package/src/creditDashboard/dtos/PipelineLevelRow.ts +10 -0
  216. package/src/creditDashboard/dtos/PipelineWeek.ts +7 -0
  217. package/src/creditDashboard/dtos/PortfolioActiveItem.ts +12 -0
  218. package/src/creditDashboard/dtos/PortfolioBalance.ts +5 -0
  219. package/src/creditDashboard/dtos/PortfolioBalanceMonthlyItem.ts +5 -0
  220. package/src/creditDashboard/dtos/PortfolioByLevelItem.ts +7 -0
  221. package/src/creditDashboard/dtos/PortfolioResolutionItem.ts +8 -0
  222. package/src/creditDashboard/dtos/PortfolioUpcomingWeek.ts +7 -0
  223. package/src/creditDashboard/index.ts +16 -0
  224. package/src/creditEngine/dtos/AdvancedPaymentRequest.ts +15 -0
  225. package/src/creditEngine/dtos/AnticipatedPaymentRequest.ts +15 -0
  226. package/src/creditEngine/dtos/CreditDetailResponse.ts +25 -11
  227. package/src/creditEngine/dtos/CreditOriginationRequest.ts +12 -2
  228. package/src/creditEngine/dtos/CreditRequestResult.ts +9 -0
  229. package/src/creditEngine/dtos/CreditSignatureResult.ts +8 -0
  230. package/src/creditEngine/dtos/EarlyPaymentResult.ts +9 -0
  231. package/src/creditEngine/dtos/OfferResult.ts +16 -0
  232. package/src/creditEngine/dtos/PaymentScheduleItemResponse.ts +7 -6
  233. package/src/creditEngine/dtos/SettlementPaymentRequest.ts +11 -0
  234. package/src/creditEngine/dtos/SettlementQuote.ts +14 -0
  235. package/src/creditEngine/index.ts +8 -0
  236. package/src/customerFile/dtos/CustomerFileSearchRequest.ts +16 -0
  237. package/src/customerFile/index.ts +1 -0
  238. package/src/index.ts +3 -0
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Detalle de perfil enriquecido con información de directorio.
3
+ *
4
+ * Nota: en el lambda este tipo es una intersección de `CreditFinancialProfileRow` con
5
+ * `{ people_id, phone_number }`. Aquí se inlinea todo el shape del profile para no
6
+ * depender de tipos de infra.
7
+ */
8
+ export class BackofficeProfileDetail {
9
+ pk?: string;
10
+ sk?: string;
11
+ directory_id?: string;
12
+ partner_id?: string;
13
+ calculation_date?: string;
14
+ // Income
15
+ total_income_sources?: number;
16
+ primary_sources?: number;
17
+ secondary_sources?: number;
18
+ has_regular_income?: string;
19
+ total_income_90d_usd?: number;
20
+ monthly_income_usd?: number;
21
+ primary_income_usd?: number;
22
+ secondary_income_usd?: number;
23
+ dominant_frequency?: string;
24
+ days_since_last_deposit?: number;
25
+ primary_amount_variation_pct?: number;
26
+ // Expenses
27
+ total_expenses_90d_usd?: number;
28
+ monthly_expenses_usd?: number;
29
+ expense_income_ratio?: number;
30
+ // Wallet loads
31
+ sends_to_mexico_wallet?: string;
32
+ total_wallet_loads_90d_usd?: number;
33
+ monthly_wallet_loads_usd?: number;
34
+ wallet_load_count_90d?: number;
35
+ avg_wallet_load_usd?: number;
36
+ wallet_load_income_ratio?: number;
37
+ days_since_last_wallet_load?: number;
38
+ wallet_load_frequency?: string;
39
+ // Balance
40
+ current_balance_usd?: number;
41
+ average_balance_90d_usd?: number;
42
+ balance_income_ratio?: number;
43
+ // Seniority
44
+ registration_date?: string;
45
+ months_in_platform?: number;
46
+ // Exchange rate
47
+ exchange_rate_usd_mxn?: number;
48
+ monthly_income_mxn?: number;
49
+ // Scores
50
+ score_income_stability?: number;
51
+ score_payment_capacity?: number;
52
+ score_mexico_transfers?: number;
53
+ score_seniority?: number;
54
+ score_income_level?: number;
55
+ score_total?: number;
56
+ // Level & Credit
57
+ credit_level?: string;
58
+ max_credit_amount_mxn?: number;
59
+ has_active_credit?: string;
60
+ is_eligible?: string;
61
+ ineligibility_reason?: string;
62
+ // Gamification
63
+ score_to_next_level?: number;
64
+ next_level?: string;
65
+ next_level_max_credit_mxn?: number;
66
+ progress_pct?: number;
67
+ recommendation_1?: string;
68
+ recommendation_1_points?: number;
69
+ recommendation_2?: string;
70
+ recommendation_2_points?: number;
71
+ last_level_change_date?: string;
72
+ level_change_direction?: string;
73
+ // Audit
74
+ created_at?: string;
75
+ updated_at?: string;
76
+ // Directory enrichment
77
+ people_id!: string | null;
78
+ phone_number!: string | null;
79
+ }
@@ -0,0 +1,17 @@
1
+ export class BackofficeProfilesListItem {
2
+ directory_id!: string;
3
+ partner_id!: string;
4
+ phone_number!: string;
5
+ credit_level!: string;
6
+ score_total!: number;
7
+ is_eligible!: string;
8
+ ineligibility_reason!: string | null;
9
+ max_credit_amount_mxn!: number;
10
+ monthly_income_mxn!: number;
11
+ has_regular_income!: string;
12
+ dominant_frequency!: string;
13
+ total_income_sources!: number;
14
+ days_since_last_deposit!: number;
15
+ calculation_date!: string;
16
+ banner_state!: string;
17
+ }
@@ -0,0 +1,7 @@
1
+ import { BackofficeProfilesListItem } from "./BackofficeProfilesListItem";
2
+ import { BackofficePagination } from "./BackofficePagination";
3
+
4
+ export class BackofficeProfilesListResponse {
5
+ items!: BackofficeProfilesListItem[];
6
+ pagination!: BackofficePagination;
7
+ }
@@ -0,0 +1,12 @@
1
+ import { BackofficePipeline } from "./BackofficePipeline";
2
+
3
+ export class BackofficeProfilesSummary {
4
+ total_profiles!: number;
5
+ eligible_count!: number;
6
+ ineligible_count!: number;
7
+ by_level!: { level: string; count: number; eligible: number; ineligible: number }[];
8
+ score_distribution!: { range: string; count: number }[];
9
+ avg_score!: number;
10
+ avg_max_credit_mxn!: number;
11
+ pipeline!: BackofficePipeline;
12
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Item de lista de snapshots de configuración.
3
+ */
4
+ export class ConfigSnapshotListItem {
5
+ version?: number;
6
+ created_at?: string;
7
+ created_by?: string;
8
+ description?: string;
9
+ config_type_changed?: string;
10
+ }
@@ -0,0 +1,18 @@
1
+ import { IsArray, IsNotEmpty, IsString } from "class-validator";
2
+
3
+ /**
4
+ * Request para simular el impacto de un cambio de configuración contra el universo de clientes.
5
+ * Endpoint: POST /backoffice/config/simulate-impact
6
+ */
7
+ export class SimulateImpactRequest {
8
+ @IsString()
9
+ @IsNotEmpty()
10
+ partnerId!: string;
11
+
12
+ @IsString()
13
+ @IsNotEmpty()
14
+ configType!: string;
15
+
16
+ @IsArray()
17
+ proposedConfig!: Array<Record<string, unknown>>;
18
+ }
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Resultado de simulación de impacto de un cambio de configuración.
3
+ */
4
+ export class SimulateImpactStateSnapshot {
5
+ total_profiles!: number;
6
+ eligible_count!: number;
7
+ eligible_pct!: number;
8
+ by_level!: Record<string, number>;
9
+ potential_portfolio_mxn!: number;
10
+ avg_score!: number;
11
+ avg_ticket_mxn!: number;
12
+ }
13
+
14
+ export class SimulateImpactMigration {
15
+ directory_id?: string;
16
+ score_before!: number;
17
+ score_after!: number;
18
+ level_before!: string;
19
+ level_after!: string;
20
+ eligible_before!: boolean;
21
+ eligible_after!: boolean;
22
+ }
23
+
24
+ export class SimulateImpactResult {
25
+ before!: SimulateImpactStateSnapshot;
26
+ after!: SimulateImpactStateSnapshot;
27
+ delta!: {
28
+ eligible_count: number;
29
+ eligible_pct: number;
30
+ potential_portfolio_mxn: number;
31
+ avg_score: number;
32
+ level_migrations: { upgrades: number; downgrades: number; unchanged: number };
33
+ eligibility_changes: { became_eligible: number; lost_eligibility: number; unchanged: number };
34
+ };
35
+ migrations!: SimulateImpactMigration[];
36
+ }
37
+
38
+ export class SimulateImpactError {
39
+ error!: string;
40
+ total_profiles!: number;
41
+ }
@@ -0,0 +1,15 @@
1
+ import { IsNotEmpty, IsNumber, IsString, Min } from "class-validator";
2
+
3
+ /**
4
+ * Request para simular el cálculo de intereses con la configuración actual.
5
+ * Endpoint: POST /backoffice/config/simulate
6
+ */
7
+ export class SimulateInterestRequest {
8
+ @IsString()
9
+ @IsNotEmpty()
10
+ partnerId!: string;
11
+
12
+ @IsNumber()
13
+ @Min(1)
14
+ amount_mxn!: number;
15
+ }
@@ -0,0 +1,11 @@
1
+ import { CreditOfferOptionItem } from "../../credit/dtos/CreditOfferOptionItem";
2
+
3
+ /**
4
+ * Resultado de simulación de interés para un monto dado.
5
+ */
6
+ export class SimulateInterestResult {
7
+ amount_mxn!: number;
8
+ partner_id!: string;
9
+ simulated_at!: string;
10
+ options!: CreditOfferOptionItem[];
11
+ }
@@ -0,0 +1,23 @@
1
+ import { ArrayNotEmpty, IsArray, IsNotEmpty, IsOptional, IsString } from "class-validator";
2
+
3
+ /**
4
+ * Request para actualizar una configuración de política de crédito.
5
+ * Endpoint: PUT /backoffice/config/{configType}
6
+ */
7
+ export class UpdateConfigRequest {
8
+ @IsString()
9
+ @IsNotEmpty()
10
+ partnerId!: string;
11
+
12
+ @IsArray()
13
+ @ArrayNotEmpty()
14
+ items!: Array<Record<string, unknown>>;
15
+
16
+ @IsOptional()
17
+ @IsString()
18
+ updatedBy?: string;
19
+
20
+ @IsOptional()
21
+ @IsString()
22
+ description?: string;
23
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Tipos de configuración de política de crédito que expone el backoffice.
3
+ * Los valores son los `sk` (sin el prefijo) de las tablas de config en DynamoDB.
4
+ *
5
+ * Se ubica en domain porque es contrato del API (path parameter público) y concepto
6
+ * de negocio — no un detalle de persistencia.
7
+ */
8
+ export enum ConfigType {
9
+ ELIGIBILITY_RULES = "eligibility-rules",
10
+ CREDIT_LEVELS = "credit-levels",
11
+ INTEREST_RATES = "interest-rates",
12
+ SPLIT = "split",
13
+ EXPOSURE_LIMITS = "exposure-limits",
14
+ SCORES = "scores",
15
+ BANK_ACCOUNTS = "bank-accounts",
16
+ OPERATIONAL_PARAMS = "operational-params",
17
+ }
@@ -0,0 +1,24 @@
1
+ // Enums
2
+ export * from './enums/ConfigType';
3
+
4
+ // DTOs
5
+ export * from './dtos/BackofficeApplicationDetail';
6
+ export * from './dtos/BackofficeApplicationsListItem';
7
+ export * from './dtos/BackofficeCreditDetail';
8
+ export * from './dtos/BackofficeCreditsListItem';
9
+ export * from './dtos/BackofficeIncomeSourceItem';
10
+ export * from './dtos/BackofficeOfferDetail';
11
+ export * from './dtos/BackofficeOffersListItem';
12
+ export * from './dtos/BackofficePagination';
13
+ export * from './dtos/BackofficePipeline';
14
+ export * from './dtos/BackofficePipelineByLevel';
15
+ export * from './dtos/BackofficeProfileDetail';
16
+ export * from './dtos/BackofficeProfilesListItem';
17
+ export * from './dtos/BackofficeProfilesListResponse';
18
+ export * from './dtos/BackofficeProfilesSummary';
19
+ export * from './dtos/ConfigSnapshotListItem';
20
+ export * from './dtos/SimulateImpactRequest';
21
+ export * from './dtos/SimulateImpactResult';
22
+ export * from './dtos/SimulateInterestRequest';
23
+ export * from './dtos/SimulateInterestResult';
24
+ export * from './dtos/UpdateConfigRequest';
@@ -0,0 +1,8 @@
1
+ export class CohortQualityItem {
2
+ cohort_month!: string;
3
+ total_credits!: number;
4
+ active_pct!: number;
5
+ delinquent_pct!: number;
6
+ paid_off_pct!: number;
7
+ default_pct!: number;
8
+ }
@@ -0,0 +1,8 @@
1
+ export class DashboardSummary {
2
+ total_active_credits!: number;
3
+ total_disbursed_mxn!: number;
4
+ total_applications_pending!: number;
5
+ total_active_offers!: number;
6
+ avg_credit_amount_mxn!: number;
7
+ avg_term_weeks!: number;
8
+ }
@@ -0,0 +1,5 @@
1
+ export class NurturingFunnelItem {
2
+ stage!: string;
3
+ count!: number;
4
+ conversion_rate_pct!: number;
5
+ }
@@ -0,0 +1,5 @@
1
+ export class OriginationCompositionResult {
2
+ by_level!: { level: string; count: number; pct: number }[];
3
+ by_term!: { term_weeks: number; count: number; pct: number }[];
4
+ avg_annual_rate!: number;
5
+ }
@@ -0,0 +1,8 @@
1
+ export class OriginationEfficiencyResult {
2
+ avg_days_to_disburse!: number;
3
+ offers_expired_pct!: number;
4
+ offers_abandoned_pct!: number;
5
+ total_offers!: number;
6
+ total_expired!: number;
7
+ total_abandoned!: number;
8
+ }
@@ -0,0 +1,6 @@
1
+ export class OriginationMonthlyItem {
2
+ month!: string;
3
+ credits_originated!: number;
4
+ total_amount_mxn!: number;
5
+ avg_amount_mxn!: number;
6
+ }
@@ -0,0 +1,6 @@
1
+ export class OriginationSummaryResult {
2
+ credits_originated!: number;
3
+ total_amount_mxn!: number;
4
+ avg_amount_mxn!: number;
5
+ month!: string;
6
+ }
@@ -0,0 +1,7 @@
1
+ export class OriginationWeeklyItem {
2
+ week!: string;
3
+ credits_originated!: number;
4
+ total_amount_mxn!: number;
5
+ avg_amount_mxn!: number;
6
+ avg_term_weeks!: number;
7
+ }
@@ -0,0 +1,10 @@
1
+ export class PipelineLevelRow {
2
+ level!: string;
3
+ offers!: { count: number; amount_mxn: number; avg_mxn: number };
4
+ applications!: { count: number; amount_mxn: number; avg_mxn: number };
5
+ credits!: { count: number; amount_mxn: number; avg_mxn: number };
6
+ conversion_pct!: number;
7
+ credit_status!: { active_pct: number; paid_off_pct: number; delinquent_pct: number };
8
+ avg_term_weeks!: number;
9
+ avg_annual_rate!: number;
10
+ }
@@ -0,0 +1,7 @@
1
+ import { PipelineLevelRow } from "./PipelineLevelRow";
2
+
3
+ export class PipelineWeek {
4
+ week!: string;
5
+ total!: PipelineLevelRow;
6
+ levels!: PipelineLevelRow[];
7
+ }
@@ -0,0 +1,12 @@
1
+ export class PortfolioActiveItem {
2
+ credit_id!: string;
3
+ directory_id!: string;
4
+ partner_id!: string;
5
+ amount_mxn!: number;
6
+ term_weeks!: number;
7
+ annual_rate!: number;
8
+ weekly_payment_mxn!: number;
9
+ status!: string;
10
+ disbursed_at!: string;
11
+ credit_level!: string;
12
+ }
@@ -0,0 +1,5 @@
1
+ export class PortfolioBalance {
2
+ alive_credits!: number;
3
+ total_outstanding_mxn!: number;
4
+ delinquency_rate_pct!: number;
5
+ }
@@ -0,0 +1,5 @@
1
+ export class PortfolioBalanceMonthlyItem {
2
+ month!: string;
3
+ alive_credits!: number;
4
+ total_outstanding_mxn!: number;
5
+ }
@@ -0,0 +1,7 @@
1
+ export class PortfolioByLevelItem {
2
+ level!: string;
3
+ credits!: number;
4
+ balance_mxn!: number;
5
+ pct_of_portfolio!: number;
6
+ delinquency_rate_pct!: number;
7
+ }
@@ -0,0 +1,8 @@
1
+ export class PortfolioResolutionItem {
2
+ month!: string;
3
+ paid_off!: number;
4
+ defaulted!: number;
5
+ cancelled!: number;
6
+ total_resolved!: number;
7
+ recovery_rate_pct!: number;
8
+ }
@@ -0,0 +1,7 @@
1
+ export class PortfolioUpcomingWeek {
2
+ week!: string;
3
+ current_amount_mxn!: number;
4
+ current_count!: number;
5
+ delinquent_amount_mxn!: number;
6
+ delinquent_count!: number;
7
+ }
@@ -0,0 +1,16 @@
1
+ export * from './dtos/CohortQualityItem';
2
+ export * from './dtos/DashboardSummary';
3
+ export * from './dtos/NurturingFunnelItem';
4
+ export * from './dtos/OriginationCompositionResult';
5
+ export * from './dtos/OriginationEfficiencyResult';
6
+ export * from './dtos/OriginationMonthlyItem';
7
+ export * from './dtos/OriginationSummaryResult';
8
+ export * from './dtos/OriginationWeeklyItem';
9
+ export * from './dtos/PipelineLevelRow';
10
+ export * from './dtos/PipelineWeek';
11
+ export * from './dtos/PortfolioActiveItem';
12
+ export * from './dtos/PortfolioBalance';
13
+ export * from './dtos/PortfolioBalanceMonthlyItem';
14
+ export * from './dtos/PortfolioByLevelItem';
15
+ export * from './dtos/PortfolioResolutionItem';
16
+ export * from './dtos/PortfolioUpcomingWeek';
@@ -0,0 +1,15 @@
1
+ import { IsNotEmpty, IsNumber, IsString, Min } from "class-validator";
2
+
3
+ /**
4
+ * Request para pago adelantado: paga cupones futuros por adelantado en cascada.
5
+ * Endpoint: POST /{partnerId}/early-payment/advanced
6
+ */
7
+ export class AdvancedPaymentRequest {
8
+ @IsString()
9
+ @IsNotEmpty()
10
+ credit_id!: string;
11
+
12
+ @IsNumber()
13
+ @Min(1)
14
+ amount_mxn!: number;
15
+ }
@@ -0,0 +1,15 @@
1
+ import { IsNotEmpty, IsNumber, IsString, Min } from "class-validator";
2
+
3
+ /**
4
+ * Request para pago anticipado: abono a capital en cascada sobre cupones pendientes.
5
+ * Endpoint: POST /{partnerId}/early-payment/anticipated
6
+ */
7
+ export class AnticipatedPaymentRequest {
8
+ @IsString()
9
+ @IsNotEmpty()
10
+ credit_id!: string;
11
+
12
+ @IsNumber()
13
+ @Min(1)
14
+ amount_mxn!: number;
15
+ }
@@ -4,15 +4,29 @@
4
4
  */
5
5
  export class CreditDetailResponse {
6
6
  creditId!: string;
7
- applicationId!: string;
8
- directoryId!: string;
9
- amountMxn!: number;
10
- termWeeks!: number;
11
- annualRate!: number;
12
- weeklyPaymentMxn!: number;
13
- status!: string;
14
- nextPaymentDate!: string;
15
- paidCoupons!: number;
16
- totalCoupons!: number;
17
- remainingBalanceMxn!: number;
7
+ applicationId?: string;
8
+ directoryId?: string;
9
+ amountMxn?: number;
10
+ termWeeks?: number;
11
+ annualRate?: number;
12
+ weeklyPaymentMxn?: number;
13
+ status?: string;
14
+ nextPaymentDate?: string;
15
+ paidCoupons?: number;
16
+ totalCoupons?: number;
17
+ remainingBalanceMxn?: number;
18
+ cat?: number | null;
19
+ totalInterestMxn?: number;
20
+ totalIvaMxn?: number;
21
+ totalPayableMxn?: number;
22
+ creditLevel?: string | null;
23
+ partnerId?: string;
24
+ disbursedAt?: string | null;
25
+ firstPaymentDate?: string | null;
26
+ lastPaymentDate?: string | null;
27
+ nextPaymentAmountMxn?: number | null;
28
+ nextCouponNumber?: number | null;
29
+ totalPaidMxn?: number;
30
+ overdueCount?: number;
31
+ overdueAmountMxn?: number;
18
32
  }
@@ -1,4 +1,4 @@
1
- import { IsNotEmpty, IsNumber, IsString, Min } from "class-validator";
1
+ import { IsInt, IsNotEmpty, IsNumber, IsOptional, IsString, Min } from "class-validator";
2
2
 
3
3
  /**
4
4
  * Request para solicitar la originacion de un credito LOAN.
@@ -15,5 +15,15 @@ export class CreditOriginationRequest {
15
15
 
16
16
  @IsNumber()
17
17
  @Min(1)
18
- selectedTermWeeks!: number;
18
+ amountMxn!: number;
19
+
20
+ @IsInt()
21
+ @Min(1)
22
+ termWeeks!: number;
23
+
24
+ /** @deprecated Use `termWeeks` instead. Kept for backward compatibility. */
25
+ @IsOptional()
26
+ @IsNumber()
27
+ @Min(1)
28
+ selectedTermWeeks?: number;
19
29
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Resultado de requestCredit: solicitud de crédito creada con contrato pendiente de firma.
3
+ */
4
+ export class CreditRequestResult {
5
+ applicationId!: string;
6
+ status!: string;
7
+ contractViewUrl!: string;
8
+ expiresAt?: string;
9
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Resultado de signContract: contrato firmado (DISBURSED) o rechazado (CANCELLED).
3
+ */
4
+ export class CreditSignatureResult {
5
+ applicationId!: string;
6
+ status!: string;
7
+ creditId?: string;
8
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Resultado de una operación de pago anticipado / adelantado / liquidación.
3
+ */
4
+ export class EarlyPaymentResult {
5
+ success!: boolean;
6
+ amount_applied_mxn!: number;
7
+ new_balance_mxn!: number;
8
+ message!: string;
9
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Respuesta del endpoint de generación de oferta: lista de tasas disponibles para el usuario.
3
+ */
4
+ export class OfferRate {
5
+ term_weeks!: number;
6
+ annual_rate!: number;
7
+ }
8
+
9
+ export class OfferResult {
10
+ offer_id!: string;
11
+ credit_level!: string;
12
+ max_amount_mxn!: number;
13
+ min_amount_mxn!: number;
14
+ available_rates!: OfferRate[];
15
+ expires_at!: string;
16
+ }
@@ -4,11 +4,12 @@
4
4
  */
5
5
  export class PaymentScheduleItemResponse {
6
6
  couponNumber!: number;
7
- dueDate!: string;
8
- principalMxn!: number;
9
- interestMxn!: number;
10
- totalMxn!: number;
11
- status!: string;
7
+ dueDate?: string;
8
+ principalMxn?: number;
9
+ interestMxn?: number;
10
+ ivaMxn?: number;
11
+ totalMxn?: number;
12
+ status?: string;
12
13
  paidAmountMxn!: number;
13
- remainingBalanceMxn!: number;
14
+ remainingBalanceMxn?: number;
14
15
  }
@@ -0,0 +1,11 @@
1
+ import { IsNotEmpty, IsString } from "class-validator";
2
+
3
+ /**
4
+ * Request para liquidación total del crédito.
5
+ * Endpoint: POST /{partnerId}/early-payment/settlement
6
+ */
7
+ export class SettlementPaymentRequest {
8
+ @IsString()
9
+ @IsNotEmpty()
10
+ credit_id!: string;
11
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Cotización para liquidación anticipada de un crédito.
3
+ */
4
+ export class SettlementQuote {
5
+ credit_id!: string;
6
+ outstanding_principal_mxn!: number;
7
+ accrued_interest_mxn!: number;
8
+ accrued_iva_mxn!: number;
9
+ total_settlement_mxn!: number;
10
+ interest_saved_mxn!: number;
11
+ available_balance_mxn!: number;
12
+ has_sufficient_funds!: boolean;
13
+ quote_date!: string;
14
+ }
@@ -10,3 +10,11 @@ export * from './dtos/CreditSignatureRequest';
10
10
  export * from './dtos/CreditDetailResponse';
11
11
  export * from './dtos/PaymentScheduleItemResponse';
12
12
  export * from './dtos/DisbursementRequest';
13
+ export * from './dtos/AdvancedPaymentRequest';
14
+ export * from './dtos/AnticipatedPaymentRequest';
15
+ export * from './dtos/SettlementPaymentRequest';
16
+ export * from './dtos/CreditRequestResult';
17
+ export * from './dtos/CreditSignatureResult';
18
+ export * from './dtos/EarlyPaymentResult';
19
+ export * from './dtos/OfferResult';
20
+ export * from './dtos/SettlementQuote';