@fiado/type-kit 3.615.0 → 3.617.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/_test_/unit/loanOfferings/segmentCohorts.test.ts +11 -2
- package/_test_/unit/loanRetailAudit/m8AuditCatalog.test.ts +58 -0
- package/_test_/unit/reconciliation/reconciliationCatalogs.test.ts +126 -0
- package/_test_/unit/reconciliation/reconciliationRequests.test.ts +208 -0
- package/_test_/unit/reconciliation/reconciliationShapes.test.ts +74 -0
- package/_test_/unit/retailWizard/privateGetSale.test.ts +59 -0
- package/_test_/unit/transaction/transactionCreateRequestM8.test.ts +27 -0
- package/_test_/unit/transactionProcessor/reconciliationAdjustment.test.ts +63 -0
- package/_test_/unit/transferNote/transferNoteConfigAndPrivate.test.ts +202 -0
- package/_test_/unit/transferNote/transferNoteEventsAndFeeds.test.ts +112 -0
- package/_test_/unit/transferNote/transferNoteRequests.test.ts +138 -0
- package/bin/index.d.ts +2 -0
- package/bin/index.js +7 -1
- package/bin/loanOfferings/dtos/requests/CreateSegmentRequest.d.ts +2 -0
- package/bin/loanOfferings/dtos/requests/CreateSegmentRequest.js +7 -0
- package/bin/loanOfferings/dtos/requests/UpdateSegmentRequest.d.ts +2 -0
- package/bin/loanOfferings/dtos/requests/UpdateSegmentRequest.js +7 -0
- package/bin/loanOfferings/dtos/responses/SegmentResponse.d.ts +2 -0
- package/bin/loanRetailAudit/enums/AuditTrailActionEnum.d.ts +12 -1
- package/bin/loanRetailAudit/enums/AuditTrailActionEnum.js +12 -0
- package/bin/loanRetailAudit/enums/LoanAuditEntityTypeEnum.d.ts +5 -1
- package/bin/loanRetailAudit/enums/LoanAuditEntityTypeEnum.js +4 -0
- package/bin/reconciliation/constants/reconciliationErrorHttpStatus.d.ts +6 -0
- package/bin/reconciliation/constants/reconciliationErrorHttpStatus.js +23 -0
- package/bin/reconciliation/constants/reconciliationValidation.d.ts +8 -0
- package/bin/reconciliation/constants/reconciliationValidation.js +11 -0
- package/bin/reconciliation/dtos/ReconciliationDefinition.d.ts +42 -0
- package/bin/reconciliation/dtos/ReconciliationDefinition.js +2 -0
- package/bin/reconciliation/dtos/ReconciliationFeedRecord.d.ts +42 -0
- package/bin/reconciliation/dtos/ReconciliationFeedRecord.js +2 -0
- package/bin/reconciliation/dtos/ReconciliationItem.d.ts +77 -0
- package/bin/reconciliation/dtos/ReconciliationItem.js +2 -0
- package/bin/reconciliation/dtos/ReconciliationRun.d.ts +28 -0
- package/bin/reconciliation/dtos/ReconciliationRun.js +2 -0
- package/bin/reconciliation/dtos/requests/PrivateReconciliationRequests.d.ts +80 -0
- package/bin/reconciliation/dtos/requests/PrivateReconciliationRequests.js +215 -0
- package/bin/reconciliation/dtos/requests/ReconciliationActionRequests.d.ts +30 -0
- package/bin/reconciliation/dtos/requests/ReconciliationActionRequests.js +105 -0
- package/bin/reconciliation/dtos/requests/ReconciliationFeedRequests.d.ts +23 -0
- package/bin/reconciliation/dtos/requests/ReconciliationFeedRequests.js +71 -0
- package/bin/reconciliation/dtos/requests/ReconciliationQueries.d.ts +54 -0
- package/bin/reconciliation/dtos/requests/ReconciliationQueries.js +192 -0
- package/bin/reconciliation/dtos/requests/reconciliationRequestDecorators.d.ts +7 -0
- package/bin/reconciliation/dtos/requests/reconciliationRequestDecorators.js +39 -0
- package/bin/reconciliation/dtos/responses/PrivateReconciliationResponses.d.ts +13 -0
- package/bin/reconciliation/dtos/responses/PrivateReconciliationResponses.js +2 -0
- package/bin/reconciliation/dtos/responses/ReconciliationFeedResponses.d.ts +7 -0
- package/bin/reconciliation/dtos/responses/ReconciliationFeedResponses.js +2 -0
- package/bin/reconciliation/dtos/responses/ReconciliationResponses.d.ts +81 -0
- package/bin/reconciliation/dtos/responses/ReconciliationResponses.js +2 -0
- package/bin/reconciliation/enums/ReconciliationDefinitionStatusEnum.d.ts +6 -0
- package/bin/reconciliation/enums/ReconciliationDefinitionStatusEnum.js +10 -0
- package/bin/reconciliation/enums/ReconciliationErrorCodeEnum.d.ts +24 -0
- package/bin/reconciliation/enums/ReconciliationErrorCodeEnum.js +28 -0
- package/bin/reconciliation/enums/ReconciliationExportFormatEnum.d.ts +5 -0
- package/bin/reconciliation/enums/ReconciliationExportFormatEnum.js +9 -0
- package/bin/reconciliation/enums/ReconciliationFeedConceptEnum.d.ts +16 -0
- package/bin/reconciliation/enums/ReconciliationFeedConceptEnum.js +20 -0
- package/bin/reconciliation/enums/ReconciliationFeedErrorCodeEnum.d.ts +4 -0
- package/bin/reconciliation/enums/ReconciliationFeedErrorCodeEnum.js +8 -0
- package/bin/reconciliation/enums/ReconciliationFeedOwnerEnum.d.ts +9 -0
- package/bin/reconciliation/enums/ReconciliationFeedOwnerEnum.js +13 -0
- package/bin/reconciliation/enums/ReconciliationItemStateEnum.d.ts +23 -0
- package/bin/reconciliation/enums/ReconciliationItemStateEnum.js +27 -0
- package/bin/reconciliation/enums/ReconciliationLayerEnum.d.ts +8 -0
- package/bin/reconciliation/enums/ReconciliationLayerEnum.js +12 -0
- package/bin/reconciliation/enums/ReconciliationPeriodEnum.d.ts +6 -0
- package/bin/reconciliation/enums/ReconciliationPeriodEnum.js +10 -0
- package/bin/reconciliation/enums/ReconciliationResolutionArchiveReasonEnum.d.ts +6 -0
- package/bin/reconciliation/enums/ReconciliationResolutionArchiveReasonEnum.js +10 -0
- package/bin/reconciliation/enums/ReconciliationResolutionStatusEnum.d.ts +9 -0
- package/bin/reconciliation/enums/ReconciliationResolutionStatusEnum.js +13 -0
- package/bin/reconciliation/enums/ReconciliationResolutionTypeEnum.d.ts +7 -0
- package/bin/reconciliation/enums/ReconciliationResolutionTypeEnum.js +11 -0
- package/bin/reconciliation/enums/ReconciliationRuleTypeEnum.d.ts +7 -0
- package/bin/reconciliation/enums/ReconciliationRuleTypeEnum.js +11 -0
- package/bin/reconciliation/enums/ReconciliationRunStatusEnum.d.ts +6 -0
- package/bin/reconciliation/enums/ReconciliationRunStatusEnum.js +10 -0
- package/bin/reconciliation/enums/ReconciliationSourceRoleEnum.d.ts +6 -0
- package/bin/reconciliation/enums/ReconciliationSourceRoleEnum.js +10 -0
- package/bin/reconciliation/events/ReconciliationItemMatchedEventDetail.d.ts +22 -0
- package/bin/reconciliation/events/ReconciliationItemMatchedEventDetail.js +14 -0
- package/bin/reconciliation/index.d.ts +29 -0
- package/bin/reconciliation/index.js +51 -0
- package/bin/retailWizard/catalog/privateSaleDetailFields.d.ts +3 -0
- package/bin/retailWizard/catalog/privateSaleDetailFields.js +16 -0
- package/bin/retailWizard/constants/retailWizardValidation.d.ts +2 -0
- package/bin/retailWizard/constants/retailWizardValidation.js +5 -0
- package/bin/retailWizard/dtos/requests/PrivateGetSaleRequest.d.ts +8 -0
- package/bin/retailWizard/dtos/requests/PrivateGetSaleRequest.js +42 -0
- package/bin/retailWizard/dtos/responses/PrivateGetSaleResponse.d.ts +16 -0
- package/bin/retailWizard/dtos/responses/PrivateGetSaleResponse.js +2 -0
- package/bin/retailWizard/index.d.ts +4 -0
- package/bin/retailWizard/index.js +5 -0
- package/bin/transaction/dtos/TransactionCreateRequest.d.ts +4 -0
- package/bin/transaction/dtos/TransactionCreateRequest.js +12 -0
- package/bin/transactionProcessor/dtos/PrivateAuthorizeReconciliationAdjustmentRequest.d.ts +30 -0
- package/bin/transactionProcessor/dtos/PrivateAuthorizeReconciliationAdjustmentRequest.js +107 -0
- package/bin/transactionProcessor/dtos/PrivateAuthorizeReconciliationAdjustmentResponse.d.ts +7 -0
- package/bin/transactionProcessor/dtos/PrivateAuthorizeReconciliationAdjustmentResponse.js +2 -0
- package/bin/transactionProcessor/dtos/ReconciliationAdjustmentReference.d.ts +5 -0
- package/bin/transactionProcessor/dtos/ReconciliationAdjustmentReference.js +30 -0
- package/bin/transactionProcessor/index.d.ts +3 -0
- package/bin/transactionProcessor/index.js +3 -0
- package/bin/transferNote/constants/transferNoteDefaultFees.d.ts +5 -0
- package/bin/transferNote/constants/transferNoteDefaultFees.js +9 -0
- package/bin/transferNote/constants/transferNoteErrorHttpStatus.d.ts +3 -0
- package/bin/transferNote/constants/transferNoteErrorHttpStatus.js +30 -0
- package/bin/transferNote/constants/transferNoteValidation.d.ts +7 -0
- package/bin/transferNote/constants/transferNoteValidation.js +10 -0
- package/bin/transferNote/dtos/TransferNote.d.ts +81 -0
- package/bin/transferNote/dtos/TransferNote.js +2 -0
- package/bin/transferNote/dtos/TransferNoteConfigRecords.d.ts +50 -0
- package/bin/transferNote/dtos/TransferNoteConfigRecords.js +2 -0
- package/bin/transferNote/dtos/TransferNoteFeedRecords.d.ts +38 -0
- package/bin/transferNote/dtos/TransferNoteFeedRecords.js +2 -0
- package/bin/transferNote/dtos/TransferNoteHistoryEntry.d.ts +16 -0
- package/bin/transferNote/dtos/TransferNoteHistoryEntry.js +2 -0
- package/bin/transferNote/dtos/TransferNoteItem.d.ts +36 -0
- package/bin/transferNote/dtos/TransferNoteItem.js +2 -0
- package/bin/transferNote/dtos/TransferNoteSignedUrl.d.ts +5 -0
- package/bin/transferNote/dtos/TransferNoteSignedUrl.js +2 -0
- package/bin/transferNote/dtos/requests/PrivateTransferNoteRequests.d.ts +105 -0
- package/bin/transferNote/dtos/requests/PrivateTransferNoteRequests.js +256 -0
- package/bin/transferNote/dtos/requests/RetailerTransferNoteRequests.d.ts +20 -0
- package/bin/transferNote/dtos/requests/RetailerTransferNoteRequests.js +47 -0
- package/bin/transferNote/dtos/requests/TransferNoteActionRequests.d.ts +33 -0
- package/bin/transferNote/dtos/requests/TransferNoteActionRequests.js +104 -0
- package/bin/transferNote/dtos/requests/TransferNoteConfigRequests.d.ts +38 -0
- package/bin/transferNote/dtos/requests/TransferNoteConfigRequests.js +152 -0
- package/bin/transferNote/dtos/requests/TransferNoteQueries.d.ts +29 -0
- package/bin/transferNote/dtos/requests/TransferNoteQueries.js +107 -0
- package/bin/transferNote/dtos/requests/transferNoteRequestDecorators.d.ts +14 -0
- package/bin/transferNote/dtos/requests/transferNoteRequestDecorators.js +73 -0
- package/bin/transferNote/dtos/responses/PrivateTransferNoteResponses.d.ts +26 -0
- package/bin/transferNote/dtos/responses/PrivateTransferNoteResponses.js +2 -0
- package/bin/transferNote/dtos/responses/RetailerTransferNoteResponses.d.ts +13 -0
- package/bin/transferNote/dtos/responses/RetailerTransferNoteResponses.js +2 -0
- package/bin/transferNote/dtos/responses/TransferNoteConfigResponses.d.ts +6 -0
- package/bin/transferNote/dtos/responses/TransferNoteConfigResponses.js +2 -0
- package/bin/transferNote/dtos/responses/TransferNoteResponses.d.ts +44 -0
- package/bin/transferNote/dtos/responses/TransferNoteResponses.js +2 -0
- package/bin/transferNote/enums/TransferNoteConceptEnum.d.ts +16 -0
- package/bin/transferNote/enums/TransferNoteConceptEnum.js +20 -0
- package/bin/transferNote/enums/TransferNoteConceptSignEnum.d.ts +5 -0
- package/bin/transferNote/enums/TransferNoteConceptSignEnum.js +9 -0
- package/bin/transferNote/enums/TransferNoteConfigRecordTypeEnum.d.ts +7 -0
- package/bin/transferNote/enums/TransferNoteConfigRecordTypeEnum.js +11 -0
- package/bin/transferNote/enums/TransferNoteConfirmationSourceEnum.d.ts +5 -0
- package/bin/transferNote/enums/TransferNoteConfirmationSourceEnum.js +9 -0
- package/bin/transferNote/enums/TransferNoteConfirmationTypeEnum.d.ts +5 -0
- package/bin/transferNote/enums/TransferNoteConfirmationTypeEnum.js +9 -0
- package/bin/transferNote/enums/TransferNoteDisputeCategoryEnum.d.ts +7 -0
- package/bin/transferNote/enums/TransferNoteDisputeCategoryEnum.js +11 -0
- package/bin/transferNote/enums/TransferNoteDisputeDecisionEnum.d.ts +5 -0
- package/bin/transferNote/enums/TransferNoteDisputeDecisionEnum.js +9 -0
- package/bin/transferNote/enums/TransferNoteErrorCodeEnum.d.ts +32 -0
- package/bin/transferNote/enums/TransferNoteErrorCodeEnum.js +36 -0
- package/bin/transferNote/enums/TransferNoteFeedConceptEnum.d.ts +5 -0
- package/bin/transferNote/enums/TransferNoteFeedConceptEnum.js +9 -0
- package/bin/transferNote/enums/TransferNoteHistoryActionEnum.d.ts +13 -0
- package/bin/transferNote/enums/TransferNoteHistoryActionEnum.js +17 -0
- package/bin/transferNote/enums/TransferNoteIssueOriginEnum.d.ts +6 -0
- package/bin/transferNote/enums/TransferNoteIssueOriginEnum.js +10 -0
- package/bin/transferNote/enums/TransferNoteItemStatusEnum.d.ts +5 -0
- package/bin/transferNote/enums/TransferNoteItemStatusEnum.js +9 -0
- package/bin/transferNote/enums/TransferNotePartyTypeEnum.d.ts +6 -0
- package/bin/transferNote/enums/TransferNotePartyTypeEnum.js +10 -0
- package/bin/transferNote/enums/TransferNoteStatusEnum.d.ts +9 -0
- package/bin/transferNote/enums/TransferNoteStatusEnum.js +13 -0
- package/bin/transferNote/events/TransferNoteReconciledEventDetail.d.ts +17 -0
- package/bin/transferNote/events/TransferNoteReconciledEventDetail.js +13 -0
- package/bin/transferNote/index.d.ts +34 -0
- package/bin/transferNote/index.js +56 -0
- package/bin/transferNote/validators/IsTransferNoteSelectionConstraint.d.ts +6 -0
- package/bin/transferNote/validators/IsTransferNoteSelectionConstraint.js +28 -0
- package/package.json +1 -1
- package/src/index.ts +8 -0
- package/src/loanOfferings/dtos/requests/CreateSegmentRequest.ts +7 -0
- package/src/loanOfferings/dtos/requests/UpdateSegmentRequest.ts +7 -0
- package/src/loanOfferings/dtos/responses/SegmentResponse.ts +2 -0
- package/src/loanRetailAudit/enums/AuditTrailActionEnum.ts +12 -0
- package/src/loanRetailAudit/enums/LoanAuditEntityTypeEnum.ts +4 -0
- package/src/reconciliation/constants/reconciliationErrorHttpStatus.ts +22 -0
- package/src/reconciliation/constants/reconciliationValidation.ts +11 -0
- package/src/reconciliation/dtos/ReconciliationDefinition.ts +44 -0
- package/src/reconciliation/dtos/ReconciliationFeedRecord.ts +44 -0
- package/src/reconciliation/dtos/ReconciliationItem.ts +84 -0
- package/src/reconciliation/dtos/ReconciliationRun.ts +31 -0
- package/src/reconciliation/dtos/requests/PrivateReconciliationRequests.ts +166 -0
- package/src/reconciliation/dtos/requests/ReconciliationActionRequests.ts +77 -0
- package/src/reconciliation/dtos/requests/ReconciliationFeedRequests.ts +47 -0
- package/src/reconciliation/dtos/requests/ReconciliationQueries.ts +148 -0
- package/src/reconciliation/dtos/requests/reconciliationRequestDecorators.ts +32 -0
- package/src/reconciliation/dtos/responses/PrivateReconciliationResponses.ts +27 -0
- package/src/reconciliation/dtos/responses/ReconciliationFeedResponses.ts +9 -0
- package/src/reconciliation/dtos/responses/ReconciliationResponses.ts +101 -0
- package/src/reconciliation/enums/ReconciliationDefinitionStatusEnum.ts +6 -0
- package/src/reconciliation/enums/ReconciliationErrorCodeEnum.ts +24 -0
- package/src/reconciliation/enums/ReconciliationExportFormatEnum.ts +5 -0
- package/src/reconciliation/enums/ReconciliationFeedConceptEnum.ts +19 -0
- package/src/reconciliation/enums/ReconciliationFeedErrorCodeEnum.ts +4 -0
- package/src/reconciliation/enums/ReconciliationFeedOwnerEnum.ts +9 -0
- package/src/reconciliation/enums/ReconciliationItemStateEnum.ts +23 -0
- package/src/reconciliation/enums/ReconciliationLayerEnum.ts +8 -0
- package/src/reconciliation/enums/ReconciliationPeriodEnum.ts +6 -0
- package/src/reconciliation/enums/ReconciliationResolutionArchiveReasonEnum.ts +6 -0
- package/src/reconciliation/enums/ReconciliationResolutionStatusEnum.ts +9 -0
- package/src/reconciliation/enums/ReconciliationResolutionTypeEnum.ts +7 -0
- package/src/reconciliation/enums/ReconciliationRuleTypeEnum.ts +7 -0
- package/src/reconciliation/enums/ReconciliationRunStatusEnum.ts +6 -0
- package/src/reconciliation/enums/ReconciliationSourceRoleEnum.ts +6 -0
- package/src/reconciliation/events/ReconciliationItemMatchedEventDetail.ts +25 -0
- package/src/reconciliation/index.ts +40 -0
- package/src/retailWizard/catalog/privateSaleDetailFields.ts +15 -0
- package/src/retailWizard/constants/retailWizardValidation.ts +2 -0
- package/src/retailWizard/dtos/requests/PrivateGetSaleRequest.ts +26 -0
- package/src/retailWizard/dtos/responses/PrivateGetSaleResponse.ts +16 -0
- package/src/retailWizard/index.ts +6 -0
- package/src/transaction/dtos/TransactionCreateRequest.ts +12 -0
- package/src/transactionProcessor/dtos/PrivateAuthorizeReconciliationAdjustmentRequest.ts +101 -0
- package/src/transactionProcessor/dtos/PrivateAuthorizeReconciliationAdjustmentResponse.ts +7 -0
- package/src/transactionProcessor/dtos/ReconciliationAdjustmentReference.ts +15 -0
- package/src/transactionProcessor/index.ts +3 -0
- package/src/transferNote/constants/transferNoteDefaultFees.ts +7 -0
- package/src/transferNote/constants/transferNoteErrorHttpStatus.ts +28 -0
- package/src/transferNote/constants/transferNoteValidation.ts +10 -0
- package/src/transferNote/dtos/TransferNote.ts +89 -0
- package/src/transferNote/dtos/TransferNoteConfigRecords.ts +55 -0
- package/src/transferNote/dtos/TransferNoteFeedRecords.ts +35 -0
- package/src/transferNote/dtos/TransferNoteHistoryEntry.ts +17 -0
- package/src/transferNote/dtos/TransferNoteItem.ts +38 -0
- package/src/transferNote/dtos/TransferNoteSignedUrl.ts +5 -0
- package/src/transferNote/dtos/requests/PrivateTransferNoteRequests.ts +195 -0
- package/src/transferNote/dtos/requests/RetailerTransferNoteRequests.ts +28 -0
- package/src/transferNote/dtos/requests/TransferNoteActionRequests.ts +72 -0
- package/src/transferNote/dtos/requests/TransferNoteConfigRequests.ts +115 -0
- package/src/transferNote/dtos/requests/TransferNoteQueries.ts +78 -0
- package/src/transferNote/dtos/requests/transferNoteRequestDecorators.ts +72 -0
- package/src/transferNote/dtos/responses/PrivateTransferNoteResponses.ts +36 -0
- package/src/transferNote/dtos/responses/RetailerTransferNoteResponses.ts +19 -0
- package/src/transferNote/dtos/responses/TransferNoteConfigResponses.ts +8 -0
- package/src/transferNote/dtos/responses/TransferNoteResponses.ts +51 -0
- package/src/transferNote/enums/TransferNoteConceptEnum.ts +16 -0
- package/src/transferNote/enums/TransferNoteConceptSignEnum.ts +5 -0
- package/src/transferNote/enums/TransferNoteConfigRecordTypeEnum.ts +7 -0
- package/src/transferNote/enums/TransferNoteConfirmationSourceEnum.ts +5 -0
- package/src/transferNote/enums/TransferNoteConfirmationTypeEnum.ts +5 -0
- package/src/transferNote/enums/TransferNoteDisputeCategoryEnum.ts +7 -0
- package/src/transferNote/enums/TransferNoteDisputeDecisionEnum.ts +5 -0
- package/src/transferNote/enums/TransferNoteErrorCodeEnum.ts +34 -0
- package/src/transferNote/enums/TransferNoteFeedConceptEnum.ts +5 -0
- package/src/transferNote/enums/TransferNoteHistoryActionEnum.ts +13 -0
- package/src/transferNote/enums/TransferNoteIssueOriginEnum.ts +6 -0
- package/src/transferNote/enums/TransferNoteItemStatusEnum.ts +5 -0
- package/src/transferNote/enums/TransferNotePartyTypeEnum.ts +6 -0
- package/src/transferNote/enums/TransferNoteStatusEnum.ts +9 -0
- package/src/transferNote/events/TransferNoteReconciledEventDetail.ts +22 -0
- package/src/transferNote/index.ts +45 -0
- package/src/transferNote/validators/IsTransferNoteSelectionConstraint.ts +16 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Estado calculado de una partida; la resolución vive aparte y la corrida nunca la pisa. */
|
|
2
|
+
export enum ReconciliationItemStateEnum {
|
|
3
|
+
/** OK: ambos lados cuadran al centavo. */
|
|
4
|
+
MATCHED = 'MATCHED',
|
|
5
|
+
/** Espera: sin contraparte dentro de los días hábiles de la definición. */
|
|
6
|
+
PENDING = 'PENDING',
|
|
7
|
+
/** Falta en el lado esperado; el nombre del lado sale de la definición. */
|
|
8
|
+
MISSING_IN_EXPECTED = 'MISSING_IN_EXPECTED',
|
|
9
|
+
/** Falta en el lado ejecutado; el nombre del lado sale de la definición. */
|
|
10
|
+
MISSING_IN_EXECUTED = 'MISSING_IN_EXECUTED',
|
|
11
|
+
/** Diff en PAIRWISE; monto distinto del SPEI en SETTLEMENT. */
|
|
12
|
+
AMOUNT_MISMATCH = 'AMOUNT_MISMATCH',
|
|
13
|
+
/** Falta en EdC: movimiento de FSA o SPEI de nota sin línea en el estado de cuenta. */
|
|
14
|
+
MISSING_IN_BANK_STATEMENT = 'MISSING_IN_BANK_STATEMENT',
|
|
15
|
+
/** Lo que las partidas de la semana no explican del agregado. */
|
|
16
|
+
UNEXPLAINED_DIFFERENCE = 'UNEXPLAINED_DIFFERENCE',
|
|
17
|
+
OUT_OF_WINDOW = 'OUT_OF_WINDOW',
|
|
18
|
+
ACCOUNT_MISMATCH = 'ACCOUNT_MISMATCH',
|
|
19
|
+
COMPLETE = 'COMPLETE',
|
|
20
|
+
INCOMPLETE = 'INCOMPLETE',
|
|
21
|
+
/** Registro de sandbox: fuera de la matriz, solo en su lista. */
|
|
22
|
+
TEST = 'TEST',
|
|
23
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Capa de una partida: 1 ITEM, 2 AGGREGATE, 3 SETTLEMENT, 4 BANK_STATEMENT, y la completitud del ciclo. */
|
|
2
|
+
export enum ReconciliationLayerEnum {
|
|
3
|
+
ITEM = 'ITEM',
|
|
4
|
+
AGGREGATE = 'AGGREGATE',
|
|
5
|
+
SETTLEMENT = 'SETTLEMENT',
|
|
6
|
+
BANK_STATEMENT = 'BANK_STATEMENT',
|
|
7
|
+
COMPLETENESS = 'COMPLETENESS',
|
|
8
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** En qué va la resolución: ADJUSTING se reserva antes de llamar al processor y ADJUSTED se cierra al final. */
|
|
2
|
+
export enum ReconciliationResolutionStatusEnum {
|
|
3
|
+
/** Solo marca; la partida sigue abierta. */
|
|
4
|
+
INVESTIGATING = 'INVESTIGATING',
|
|
5
|
+
/** Cerrada sin mover dinero. */
|
|
6
|
+
CLOSED = 'CLOSED',
|
|
7
|
+
ADJUSTING = 'ADJUSTING',
|
|
8
|
+
ADJUSTED = 'ADJUSTED',
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Regla de una definición; el agregado semanal o mensual es la capa AGGREGATE de una PAIRWISE, no una regla. */
|
|
2
|
+
export enum ReconciliationRuleTypeEnum {
|
|
3
|
+
PAIRWISE = 'PAIRWISE',
|
|
4
|
+
COMPLETENESS = 'COMPLETENESS',
|
|
5
|
+
SETTLEMENT = 'SETTLEMENT',
|
|
6
|
+
BANK_STATEMENT = 'BANK_STATEMENT',
|
|
7
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReconciliationFeedRefs } from '../dtos/ReconciliationFeedRecord';
|
|
2
|
+
import { ReconciliationRuleTypeEnum } from '../enums/ReconciliationRuleTypeEnum';
|
|
3
|
+
|
|
4
|
+
// Origen de los eventos de EventBridge que publica reconciliation-engine-business.
|
|
5
|
+
export const RECONCILIATION_EVENTS_SOURCE = 'fiado.reconciliation';
|
|
6
|
+
|
|
7
|
+
export enum ReconciliationEventDetailTypeEnum {
|
|
8
|
+
/** Una partida BANK_STATEMENT con `refs.noteId` quedó en OK; sale una vez por partida. */
|
|
9
|
+
RECONCILIATION_ITEM_MATCHED = 'reconciliation.ReconciliationItemMatched',
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// `detail` de ReconciliationItemMatched; transfer-note llena con él la confirmación de FSA.
|
|
13
|
+
export class ReconciliationItemMatchedEventDetail {
|
|
14
|
+
/** Fijo por partida: un reenvío llega con el mismo id y el consumidor lo descarta. */
|
|
15
|
+
eventId!: string;
|
|
16
|
+
tenantId!: string;
|
|
17
|
+
definitionId!: string;
|
|
18
|
+
itemKey!: string;
|
|
19
|
+
ruleType!: ReconciliationRuleTypeEnum;
|
|
20
|
+
periodKey!: string;
|
|
21
|
+
amountCents!: number;
|
|
22
|
+
/** ISO 8601 del momento en que la partida quedó en OK. */
|
|
23
|
+
matchedAt!: string;
|
|
24
|
+
refs!: ReconciliationFeedRefs & { noteId: string };
|
|
25
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Enums
|
|
2
|
+
export * from './enums/ReconciliationRuleTypeEnum';
|
|
3
|
+
export * from './enums/ReconciliationDefinitionStatusEnum';
|
|
4
|
+
export * from './enums/ReconciliationItemStateEnum';
|
|
5
|
+
export * from './enums/ReconciliationResolutionTypeEnum';
|
|
6
|
+
export * from './enums/ReconciliationResolutionStatusEnum';
|
|
7
|
+
export * from './enums/ReconciliationResolutionArchiveReasonEnum';
|
|
8
|
+
export * from './enums/ReconciliationRunStatusEnum';
|
|
9
|
+
export * from './enums/ReconciliationLayerEnum';
|
|
10
|
+
export * from './enums/ReconciliationPeriodEnum';
|
|
11
|
+
export * from './enums/ReconciliationSourceRoleEnum';
|
|
12
|
+
export * from './enums/ReconciliationExportFormatEnum';
|
|
13
|
+
export * from './enums/ReconciliationFeedConceptEnum';
|
|
14
|
+
export * from './enums/ReconciliationErrorCodeEnum';
|
|
15
|
+
export * from './enums/ReconciliationFeedErrorCodeEnum';
|
|
16
|
+
export * from './enums/ReconciliationFeedOwnerEnum';
|
|
17
|
+
|
|
18
|
+
// Constantes
|
|
19
|
+
export * from './constants/reconciliationErrorHttpStatus';
|
|
20
|
+
export * from './constants/reconciliationValidation';
|
|
21
|
+
|
|
22
|
+
// Entidades del dominio
|
|
23
|
+
export * from './dtos/ReconciliationFeedRecord';
|
|
24
|
+
export * from './dtos/ReconciliationDefinition';
|
|
25
|
+
export * from './dtos/ReconciliationRun';
|
|
26
|
+
export * from './dtos/ReconciliationItem';
|
|
27
|
+
|
|
28
|
+
// Request DTOs
|
|
29
|
+
export * from './dtos/requests/ReconciliationActionRequests';
|
|
30
|
+
export * from './dtos/requests/ReconciliationQueries';
|
|
31
|
+
export * from './dtos/requests/PrivateReconciliationRequests';
|
|
32
|
+
export * from './dtos/requests/ReconciliationFeedRequests';
|
|
33
|
+
|
|
34
|
+
// Response DTOs
|
|
35
|
+
export * from './dtos/responses/ReconciliationResponses';
|
|
36
|
+
export * from './dtos/responses/PrivateReconciliationResponses';
|
|
37
|
+
export * from './dtos/responses/ReconciliationFeedResponses';
|
|
38
|
+
|
|
39
|
+
// Eventos
|
|
40
|
+
export * from './events/ReconciliationItemMatchedEventDetail';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PrivateGetSaleResponse } from '../dtos/responses/PrivateGetSaleResponse';
|
|
2
|
+
|
|
3
|
+
/** Lista cerrada de campos que privateGetSale puede devolver; nada fuera de ella sale del lambda. */
|
|
4
|
+
export const PRIVATE_SALE_DETAIL_FIELDS: readonly (keyof PrivateGetSaleResponse)[] = [
|
|
5
|
+
'saleId',
|
|
6
|
+
'retailerId',
|
|
7
|
+
'sellerRetailUserId',
|
|
8
|
+
'retailCustomerId',
|
|
9
|
+
'creditId',
|
|
10
|
+
'customerName',
|
|
11
|
+
'customerPhone',
|
|
12
|
+
'amountCents',
|
|
13
|
+
'productModel',
|
|
14
|
+
'sellerName',
|
|
15
|
+
] as const;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { IsNotEmpty, IsString, Matches } from 'class-validator';
|
|
3
|
+
import { RETAIL_WIZARD_CALLER_SERVICE_PATTERN } from '../../constants/retailWizardValidation';
|
|
4
|
+
|
|
5
|
+
/** Path y query de GET /private/sales/{saleId} (privateGetSale); actor y callerService van al registro de acceso PII. */
|
|
6
|
+
export class PrivateGetSaleRequest {
|
|
7
|
+
@Expose()
|
|
8
|
+
@IsString()
|
|
9
|
+
@IsNotEmpty()
|
|
10
|
+
saleId!: string;
|
|
11
|
+
|
|
12
|
+
@Expose()
|
|
13
|
+
@IsString()
|
|
14
|
+
@IsNotEmpty()
|
|
15
|
+
tenantId!: string;
|
|
16
|
+
|
|
17
|
+
/** Operador que abrió el detalle, reenviado por quien llama. */
|
|
18
|
+
@Expose()
|
|
19
|
+
@IsString()
|
|
20
|
+
@IsNotEmpty()
|
|
21
|
+
actor!: string;
|
|
22
|
+
|
|
23
|
+
@Expose()
|
|
24
|
+
@Matches(RETAIL_WIZARD_CALLER_SERVICE_PATTERN, { message: 'callerService debe ser el nombre del lambda (kebab-case)' })
|
|
25
|
+
callerService!: string;
|
|
26
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Respuesta de privateGetSale: solo los campos del detalle de una partida más ids; los ausentes se omiten. */
|
|
2
|
+
export interface PrivateGetSaleResponse {
|
|
3
|
+
saleId: string;
|
|
4
|
+
retailerId: string;
|
|
5
|
+
sellerRetailUserId: string;
|
|
6
|
+
retailCustomerId?: string;
|
|
7
|
+
creditId?: string;
|
|
8
|
+
/** PII: nunca loguear. */
|
|
9
|
+
customerName?: string;
|
|
10
|
+
/** PII: nunca loguear. */
|
|
11
|
+
customerPhone?: string;
|
|
12
|
+
/** Lo cobrado al cerrar la venta, en centavos. */
|
|
13
|
+
amountCents?: number;
|
|
14
|
+
productModel?: string;
|
|
15
|
+
sellerName?: string;
|
|
16
|
+
}
|
|
@@ -227,3 +227,9 @@ export * from './dtos/responses/SetAnchorGiftsResponse';
|
|
|
227
227
|
export * from './catalog/backofficeSessionSummaries';
|
|
228
228
|
export * from './dtos/requests/BackofficeSessionSummariesRequest';
|
|
229
229
|
export * from './dtos/responses/BackofficeSessionSummariesResponse';
|
|
230
|
+
|
|
231
|
+
// Lectura privada de la venta para el detalle de una partida del motor (GET /private/sales/{saleId})
|
|
232
|
+
export * from './catalog/privateSaleDetailFields';
|
|
233
|
+
export * from './constants/retailWizardValidation';
|
|
234
|
+
export * from './dtos/requests/PrivateGetSaleRequest';
|
|
235
|
+
export * from './dtos/responses/PrivateGetSaleResponse';
|
|
@@ -166,4 +166,16 @@ export class TransactionCreateRequest {
|
|
|
166
166
|
@IsString()
|
|
167
167
|
@IsOptional()
|
|
168
168
|
domFolio?: string;
|
|
169
|
+
|
|
170
|
+
/** Intento del motor de cobro que originó el cargo; en cobranza es igual al `attemptId`. */
|
|
171
|
+
@IsString()
|
|
172
|
+
@IsNotEmpty()
|
|
173
|
+
@IsOptional()
|
|
174
|
+
executionId?: string;
|
|
175
|
+
|
|
176
|
+
/** Tenant SOFOM dueño del cobro; `tenantId` del ledger sigue siendo `FIADO`. */
|
|
177
|
+
@IsString()
|
|
178
|
+
@IsNotEmpty()
|
|
179
|
+
@IsOptional()
|
|
180
|
+
sofomTenantId?: string;
|
|
169
181
|
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { Expose, Transform, Type } from 'class-transformer';
|
|
2
|
+
import {
|
|
3
|
+
IsEmail,
|
|
4
|
+
IsEnum,
|
|
5
|
+
IsInt,
|
|
6
|
+
IsNotEmpty,
|
|
7
|
+
IsOptional,
|
|
8
|
+
IsString,
|
|
9
|
+
Matches,
|
|
10
|
+
Min,
|
|
11
|
+
ValidateNested,
|
|
12
|
+
ValidationArguments,
|
|
13
|
+
Validate,
|
|
14
|
+
ValidatorConstraint,
|
|
15
|
+
ValidatorConstraintInterface,
|
|
16
|
+
} from 'class-validator';
|
|
17
|
+
import { regexUuidV4 } from '../../helpers/constans/regex';
|
|
18
|
+
import { CurrencyId } from '../../currency/enums/CurrencyId';
|
|
19
|
+
import { OperationEnum } from '../../transaction/enums/OperationEnum';
|
|
20
|
+
import { ReconciliationAdjustmentReference } from './ReconciliationAdjustmentReference';
|
|
21
|
+
|
|
22
|
+
/** La llave `{tenantId}#{definitionId}#{itemKey}#{resolutionVersion}` debe empezar con el tenant del body. */
|
|
23
|
+
@ValidatorConstraint({ name: 'adjustmentKeyOfTenant' })
|
|
24
|
+
export class AdjustmentKeyOfTenantConstraint implements ValidatorConstraintInterface {
|
|
25
|
+
validate(value: unknown, args: ValidationArguments): boolean {
|
|
26
|
+
const { tenantId } = args.object as { tenantId?: unknown };
|
|
27
|
+
return typeof value === 'string' && typeof tenantId === 'string' && tenantId.length > 0
|
|
28
|
+
&& value.startsWith(`${tenantId}#`) && value.split('#').length >= 4;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
defaultMessage(): string {
|
|
32
|
+
return 'adjustmentKey debe ser {tenantId}#{definitionId}#{itemKey}#{resolutionVersion}';
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Body de privateAuthorizeReconciliationAdjustment: ajuste al cliente idempotente por `adjustmentKey`. */
|
|
37
|
+
export class PrivateAuthorizeReconciliationAdjustmentRequest {
|
|
38
|
+
@Expose()
|
|
39
|
+
@IsString()
|
|
40
|
+
@IsNotEmpty()
|
|
41
|
+
tenantId!: string;
|
|
42
|
+
|
|
43
|
+
@Expose()
|
|
44
|
+
@Validate(AdjustmentKeyOfTenantConstraint)
|
|
45
|
+
adjustmentKey!: string;
|
|
46
|
+
|
|
47
|
+
/** El processor resuelve `peopleId` desde aquí. */
|
|
48
|
+
@Expose()
|
|
49
|
+
@Matches(regexUuidV4, { message: 'directoryId must be a valid UUID v4' })
|
|
50
|
+
directoryId!: string;
|
|
51
|
+
|
|
52
|
+
/** ADD abona al cliente; SUBSTRACT le carga. */
|
|
53
|
+
@Expose()
|
|
54
|
+
@IsEnum(OperationEnum)
|
|
55
|
+
operation!: OperationEnum;
|
|
56
|
+
|
|
57
|
+
@Expose()
|
|
58
|
+
@Type(() => Number)
|
|
59
|
+
@IsInt()
|
|
60
|
+
@Min(1)
|
|
61
|
+
amountCents!: number;
|
|
62
|
+
|
|
63
|
+
@Expose()
|
|
64
|
+
@IsEnum(CurrencyId)
|
|
65
|
+
currencyId!: CurrencyId;
|
|
66
|
+
|
|
67
|
+
/** Transacción del ledger que se corrige. */
|
|
68
|
+
@Expose()
|
|
69
|
+
@IsString()
|
|
70
|
+
@IsNotEmpty()
|
|
71
|
+
originalTransactionId!: string;
|
|
72
|
+
|
|
73
|
+
/** Intento del cobro original, si lo hubo. */
|
|
74
|
+
@Expose()
|
|
75
|
+
@IsOptional()
|
|
76
|
+
@IsString()
|
|
77
|
+
@IsNotEmpty()
|
|
78
|
+
executionId?: string;
|
|
79
|
+
|
|
80
|
+
@Expose()
|
|
81
|
+
@ValidateNested()
|
|
82
|
+
@Type(() => ReconciliationAdjustmentReference)
|
|
83
|
+
reference!: ReconciliationAdjustmentReference;
|
|
84
|
+
|
|
85
|
+
@Expose()
|
|
86
|
+
@Transform(({ value }) => (typeof value === 'string' ? value.trim() : value))
|
|
87
|
+
@IsString()
|
|
88
|
+
@IsNotEmpty()
|
|
89
|
+
reason!: string;
|
|
90
|
+
|
|
91
|
+
/** Email del operador que resolvió la partida. */
|
|
92
|
+
@Expose()
|
|
93
|
+
@IsEmail()
|
|
94
|
+
actor!: string;
|
|
95
|
+
|
|
96
|
+
/** Servicio que llama, validado contra la lista permitida del processor. */
|
|
97
|
+
@Expose()
|
|
98
|
+
@IsString()
|
|
99
|
+
@IsNotEmpty()
|
|
100
|
+
author!: string;
|
|
101
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Respuesta de privateAuthorizeReconciliationAdjustment; un `adjustmentKey` repetido devuelve el primer movimiento. */
|
|
2
|
+
export interface PrivateAuthorizeReconciliationAdjustmentResponse {
|
|
3
|
+
adjustmentKey: string;
|
|
4
|
+
transactionId: string;
|
|
5
|
+
/** `true` si la llave ya existía y no se movió dinero otra vez. */
|
|
6
|
+
replayed: boolean;
|
|
7
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { IsNotEmpty, IsString } from 'class-validator';
|
|
3
|
+
|
|
4
|
+
/** Partida del motor que pidió el ajuste. */
|
|
5
|
+
export class ReconciliationAdjustmentReference {
|
|
6
|
+
@Expose()
|
|
7
|
+
@IsString()
|
|
8
|
+
@IsNotEmpty()
|
|
9
|
+
definitionId!: string;
|
|
10
|
+
|
|
11
|
+
@Expose()
|
|
12
|
+
@IsString()
|
|
13
|
+
@IsNotEmpty()
|
|
14
|
+
itemKey!: string;
|
|
15
|
+
}
|
|
@@ -42,6 +42,9 @@ export * from './dtos/AuthorizeRenewalPreAuthRequest';
|
|
|
42
42
|
export * from './dtos/AuthorizeRenewalPreAuthResponse';
|
|
43
43
|
export * from './dtos/PublishFiadoTxRequest';
|
|
44
44
|
export * from './dtos/PublishFiadoTxResponse';
|
|
45
|
+
export * from './dtos/ReconciliationAdjustmentReference';
|
|
46
|
+
export * from './dtos/PrivateAuthorizeReconciliationAdjustmentRequest';
|
|
47
|
+
export * from './dtos/PrivateAuthorizeReconciliationAdjustmentResponse';
|
|
45
48
|
|
|
46
49
|
export * from './enums/TransactionProcessorCodesEnum';
|
|
47
50
|
export * from './enums/AsyncTxStatusEnum';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TransferNoteConceptEnum } from '../enums/TransferNoteConceptEnum';
|
|
2
|
+
|
|
3
|
+
/** Tarifa por omisión en centavos por crédito firmado (REQ-52), si el tenant no configura otra. */
|
|
4
|
+
export const TRANSFER_NOTE_DEFAULT_FEE_CENTS = {
|
|
5
|
+
[TransferNoteConceptEnum.ORIGINATION_BONUS]: 5000,
|
|
6
|
+
[TransferNoteConceptEnum.ACCOUNT_OPENING]: 2500,
|
|
7
|
+
} as const satisfies Readonly<Partial<Record<TransferNoteConceptEnum, number>>>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { RECONCILIATION_FEED_ERROR_HTTP_STATUS } from '../../reconciliation/constants/reconciliationErrorHttpStatus';
|
|
2
|
+
import { ReconciliationFeedErrorCodeEnum } from '../../reconciliation/enums/ReconciliationFeedErrorCodeEnum';
|
|
3
|
+
import { TransferNoteErrorCodeEnum as C } from '../enums/TransferNoteErrorCodeEnum';
|
|
4
|
+
|
|
5
|
+
/** Status HTTP de cada code: 400 request inválido · 404 no existe · 409 conflicto de estado · 422 regla de negocio. */
|
|
6
|
+
export const TRANSFER_NOTE_ERROR_HTTP_STATUS: Readonly<Record<C, 400 | 404 | 409 | 422>> = {
|
|
7
|
+
[C.TRANSFER_NOTE_NOT_FOUND]: 404,
|
|
8
|
+
[C.NOTE_NOT_DISPUTABLE]: 409,
|
|
9
|
+
[C.NET_NOT_POSITIVE]: 422,
|
|
10
|
+
[C.NOT_NOTE_CONTROLLER]: 422,
|
|
11
|
+
[C.PAYEE_ACCOUNT_NOT_REGISTERED]: 422,
|
|
12
|
+
[C.ITEM_ALREADY_INCLUDED]: 409,
|
|
13
|
+
[C.WEEK_ALREADY_CUT]: 409,
|
|
14
|
+
[C.NOTE_NOT_ISSUED]: 409,
|
|
15
|
+
[C.NOTE_DISPUTED]: 409,
|
|
16
|
+
[C.NOT_NOTE_PAYER]: 422,
|
|
17
|
+
[C.NOTE_NOT_SENT]: 409,
|
|
18
|
+
[C.NOT_NOTE_PAYEE]: 422,
|
|
19
|
+
[C.NOTE_NOT_DISPUTED]: 409,
|
|
20
|
+
[C.CONTACT_EMAIL_MISSING]: 422,
|
|
21
|
+
[C.INVALID_CONFIG_RECORD_TYPE]: 400,
|
|
22
|
+
[C.AUTHOR_NOT_ALLOWED]: 422,
|
|
23
|
+
[C.SETTLEMENT_NOT_REQUIRED]: 422,
|
|
24
|
+
[C.RUN_IN_PROGRESS]: 409,
|
|
25
|
+
[C.SOURCE_ITEM_NOT_FOUND]: 404,
|
|
26
|
+
[C.TRANSFER_NOTE_ITEM_NOT_FOUND]: 404,
|
|
27
|
+
[C.FEED_RECORD_NOT_FOUND]: RECONCILIATION_FEED_ERROR_HTTP_STATUS[ReconciliationFeedErrorCodeEnum.FEED_RECORD_NOT_FOUND],
|
|
28
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Largo mínimo de la razón de una emisión manual y de una objeción. */
|
|
2
|
+
export const TRANSFER_NOTE_MIN_REASON_LENGTH = 20;
|
|
3
|
+
|
|
4
|
+
/** Semana ISO `YYYY-Www`, p. ej. `2026-W43`. */
|
|
5
|
+
export const TRANSFER_NOTE_ISO_WEEK_PATTERN = /^\d{4}-W(0[1-9]|[1-4]\d|5[0-3])$/;
|
|
6
|
+
|
|
7
|
+
/** CLABE interbancaria de 18 dígitos. */
|
|
8
|
+
export const TRANSFER_NOTE_CLABE_PATTERN = /^\d{18}$/;
|
|
9
|
+
|
|
10
|
+
export const TRANSFER_NOTE_MAX_PAGE_SIZE = 100;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { CurrencyId } from '../../currency/enums/CurrencyId';
|
|
2
|
+
import { TransferNoteConceptEnum } from '../enums/TransferNoteConceptEnum';
|
|
3
|
+
import { TransferNoteConfirmationSourceEnum } from '../enums/TransferNoteConfirmationSourceEnum';
|
|
4
|
+
import { TransferNoteConfirmationTypeEnum } from '../enums/TransferNoteConfirmationTypeEnum';
|
|
5
|
+
import { TransferNoteDisputeCategoryEnum } from '../enums/TransferNoteDisputeCategoryEnum';
|
|
6
|
+
import { TransferNoteIssueOriginEnum } from '../enums/TransferNoteIssueOriginEnum';
|
|
7
|
+
import { TransferNotePartyTypeEnum } from '../enums/TransferNotePartyTypeEnum';
|
|
8
|
+
import { TransferNoteStatusEnum } from '../enums/TransferNoteStatusEnum';
|
|
9
|
+
|
|
10
|
+
/** Parte de una nota, sin datos de contacto ni de cuenta. */
|
|
11
|
+
export interface TransferNoteParty {
|
|
12
|
+
partyId: string;
|
|
13
|
+
partyType: TransferNotePartyTypeEnum;
|
|
14
|
+
/** Solo en partes RETAILER. */
|
|
15
|
+
retailerId?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface TransferNoteSubtotal {
|
|
19
|
+
concept: TransferNoteConceptEnum;
|
|
20
|
+
amountCents: number;
|
|
21
|
+
itemCount: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface TransferNoteSpeiPayment {
|
|
25
|
+
trackingKey: string;
|
|
26
|
+
paidAt: string;
|
|
27
|
+
amountCents: number;
|
|
28
|
+
capturedBy: string;
|
|
29
|
+
capturedAt: string;
|
|
30
|
+
receiptUploaded: boolean;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface TransferNoteConfirmation {
|
|
34
|
+
type: TransferNoteConfirmationTypeEnum;
|
|
35
|
+
source: TransferNoteConfirmationSourceEnum;
|
|
36
|
+
confirmedBy: string;
|
|
37
|
+
confirmedAt: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface TransferNoteDispute {
|
|
41
|
+
category: TransferNoteDisputeCategoryEnum;
|
|
42
|
+
reason: string;
|
|
43
|
+
disputedBy: string;
|
|
44
|
+
disputedAt: string;
|
|
45
|
+
/** Estado al que vuelve la nota si se rechaza la objeción. */
|
|
46
|
+
previousStatus: TransferNoteStatusEnum;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** Fila de los listados de notas. */
|
|
50
|
+
export interface TransferNoteSummary {
|
|
51
|
+
noteId: string;
|
|
52
|
+
tenantId: string;
|
|
53
|
+
pairKey: string;
|
|
54
|
+
isoWeek: string;
|
|
55
|
+
payer: TransferNoteParty;
|
|
56
|
+
payee: TransferNoteParty;
|
|
57
|
+
/** Calculado de pagador y receptor; no se guarda. */
|
|
58
|
+
controllerPartyType: TransferNotePartyTypeEnum;
|
|
59
|
+
status: TransferNoteStatusEnum;
|
|
60
|
+
issueOrigin: TransferNoteIssueOriginEnum;
|
|
61
|
+
netAmountCents: number;
|
|
62
|
+
currency: CurrencyId;
|
|
63
|
+
itemCount: number;
|
|
64
|
+
issuedAt?: string;
|
|
65
|
+
dueAt?: string;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** Detalle de una nota. */
|
|
69
|
+
export interface TransferNote extends TransferNoteSummary {
|
|
70
|
+
subtotals: TransferNoteSubtotal[];
|
|
71
|
+
requiredConfirmations: TransferNoteConfirmationTypeEnum[];
|
|
72
|
+
confirmations: TransferNoteConfirmation[];
|
|
73
|
+
/** Razón de la emisión manual. */
|
|
74
|
+
issueReason?: string;
|
|
75
|
+
speiPayment?: TransferNoteSpeiPayment;
|
|
76
|
+
dispute?: TransferNoteDispute;
|
|
77
|
+
/** Nota cancelada de la que nace esta, o la regenerada que la reemplaza. */
|
|
78
|
+
regeneratedFromNoteId?: string;
|
|
79
|
+
regeneratedNoteId?: string;
|
|
80
|
+
createdAt: string;
|
|
81
|
+
createdBy: string;
|
|
82
|
+
updatedAt: string;
|
|
83
|
+
updatedBy?: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface TransferNoteStatusCount {
|
|
87
|
+
status: TransferNoteStatusEnum;
|
|
88
|
+
count: number;
|
|
89
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { CurrencyId } from '../../currency/enums/CurrencyId';
|
|
2
|
+
import { TransferNoteConceptEnum } from '../enums/TransferNoteConceptEnum';
|
|
3
|
+
import { TransferNoteConceptSignEnum } from '../enums/TransferNoteConceptSignEnum';
|
|
4
|
+
import { TransferNoteConfigRecordTypeEnum } from '../enums/TransferNoteConfigRecordTypeEnum';
|
|
5
|
+
import { TransferNotePartyTypeEnum } from '../enums/TransferNotePartyTypeEnum';
|
|
6
|
+
|
|
7
|
+
/** Registro TENANT. */
|
|
8
|
+
export interface TransferNoteTenantSettings {
|
|
9
|
+
activeFrom: string;
|
|
10
|
+
currency: CurrencyId;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** Registro PARTY#partyId: la cuenta destino y el correo de contacto de una parte. */
|
|
14
|
+
export interface TransferNotePartySettings {
|
|
15
|
+
partyId: string;
|
|
16
|
+
partyType: TransferNotePartyTypeEnum;
|
|
17
|
+
displayName: string;
|
|
18
|
+
retailerId?: string;
|
|
19
|
+
clabe?: string;
|
|
20
|
+
contactEmail?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Registro CONCEPT#concept: a qué tipo de par va, con qué signo y desde cuándo. */
|
|
24
|
+
export interface TransferNoteConceptSettings {
|
|
25
|
+
concept: TransferNoteConceptEnum;
|
|
26
|
+
payerPartyType: TransferNotePartyTypeEnum;
|
|
27
|
+
payeePartyType: TransferNotePartyTypeEnum;
|
|
28
|
+
sign: TransferNoteConceptSignEnum;
|
|
29
|
+
activeFrom: string;
|
|
30
|
+
/** Tarifa por crédito firmado, solo en conceptos derivados. */
|
|
31
|
+
rateCents?: number;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** Registro PAIR#pairKey con su contador de cortes sin emitir. */
|
|
35
|
+
export interface TransferNotePairSettings {
|
|
36
|
+
pairKey: string;
|
|
37
|
+
payerPartyId: string;
|
|
38
|
+
payeePartyId: string;
|
|
39
|
+
activeFrom: string;
|
|
40
|
+
consecutiveUnissuedCutoffs: number;
|
|
41
|
+
/** Se llena al 4.º corte seguido sin emitir. */
|
|
42
|
+
discrepancyOpenedAt?: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** Un registro de configuración; trae solo el sub-shape de su `recordType`. */
|
|
46
|
+
export interface TransferNoteConfigRecord {
|
|
47
|
+
recordKey: string;
|
|
48
|
+
recordType: TransferNoteConfigRecordTypeEnum;
|
|
49
|
+
tenant?: TransferNoteTenantSettings;
|
|
50
|
+
party?: TransferNotePartySettings;
|
|
51
|
+
concept?: TransferNoteConceptSettings;
|
|
52
|
+
pair?: TransferNotePairSettings;
|
|
53
|
+
updatedAt: string;
|
|
54
|
+
updatedBy: string;
|
|
55
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ReconciliationFeedRecord, ReconciliationFeedRefs } from '../../reconciliation/dtos/ReconciliationFeedRecord';
|
|
2
|
+
import type { ReconciliationFeedConceptEnum } from '../../reconciliation/enums/ReconciliationFeedConceptEnum';
|
|
3
|
+
import { TransferNoteConceptEnum } from '../enums/TransferNoteConceptEnum';
|
|
4
|
+
import { TransferNotePartyTypeEnum } from '../enums/TransferNotePartyTypeEnum';
|
|
5
|
+
import { TransferNoteStatusEnum } from '../enums/TransferNoteStatusEnum';
|
|
6
|
+
|
|
7
|
+
/** Registro del feed TRANSFER_NOTE_ITEM: un item ya incluido en una nota; `recordId` es su itemId. */
|
|
8
|
+
export interface TransferNoteItemFeedRecord extends ReconciliationFeedRecord {
|
|
9
|
+
concept: ReconciliationFeedConceptEnum.TRANSFER_NOTE_ITEM;
|
|
10
|
+
/** `matchKey` del registro de origen; `feedDay` es el día CDMX de `includedAt`. */
|
|
11
|
+
refs: ReconciliationFeedRefs & { noteId: string; itemId: string };
|
|
12
|
+
itemConcept: TransferNoteConceptEnum;
|
|
13
|
+
pairKey: string;
|
|
14
|
+
/** `recordId` en el feed del dueño del que salió el item. */
|
|
15
|
+
sourceRecordId: string;
|
|
16
|
+
includedAt: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Registro del feed TRANSFER_NOTE_SETTLEMENT: lo que una nota debe pagar y lo capturado; `recordId` y `matchKey` son el noteId. */
|
|
20
|
+
export interface TransferNoteSettlementFeedRecord extends ReconciliationFeedRecord {
|
|
21
|
+
concept: ReconciliationFeedConceptEnum.TRANSFER_NOTE_SETTLEMENT;
|
|
22
|
+
/** `amountCents` es el neto de la nota; `occurredAt` su emisión. */
|
|
23
|
+
refs: ReconciliationFeedRefs & { noteId: string };
|
|
24
|
+
pairKey: string;
|
|
25
|
+
payerPartyType: TransferNotePartyTypeEnum;
|
|
26
|
+
payerPartyId: string;
|
|
27
|
+
payeePartyType: TransferNotePartyTypeEnum;
|
|
28
|
+
payeePartyId: string;
|
|
29
|
+
status: TransferNoteStatusEnum;
|
|
30
|
+
dueAt: string;
|
|
31
|
+
/** Cuenta registrada del receptor al emitir. */
|
|
32
|
+
payeeClabe: string;
|
|
33
|
+
paidAt?: string;
|
|
34
|
+
paidAmountCents?: number;
|
|
35
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TransferNoteHistoryActionEnum } from '../enums/TransferNoteHistoryActionEnum';
|
|
2
|
+
import { TransferNoteStatusEnum } from '../enums/TransferNoteStatusEnum';
|
|
3
|
+
import { TransferNoteConfirmation } from './TransferNote';
|
|
4
|
+
|
|
5
|
+
/** Una acción del historial de la nota. */
|
|
6
|
+
export interface TransferNoteHistoryEntry {
|
|
7
|
+
action: TransferNoteHistoryActionEnum;
|
|
8
|
+
actor: string;
|
|
9
|
+
occurredAt: string;
|
|
10
|
+
reason?: string;
|
|
11
|
+
fromStatus?: TransferNoteStatusEnum;
|
|
12
|
+
toStatus?: TransferNoteStatusEnum;
|
|
13
|
+
/** Items que volvieron al pool al cancelar. */
|
|
14
|
+
itemIds?: string[];
|
|
15
|
+
/** Confirmaciones anuladas al revertir el SPEI. */
|
|
16
|
+
annulledConfirmations?: TransferNoteConfirmation[];
|
|
17
|
+
}
|