@fiado/type-kit 3.617.0 → 3.618.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.
@@ -0,0 +1,43 @@
1
+ import 'reflect-metadata';
2
+ import { BankAccountMCSendTransferRequest, BankAccountMCSendTransferResponse } from '../../../src/account/index';
3
+ import { TransactionStatusEnum } from '../../../src/transaction';
4
+
5
+ /**
6
+ * MC Send directo a una tarjeta del programa (CARD_PUSH_FUNDS): el request admite el cd_ del
7
+ * beneficiario y entonces email y teléfono dejan de ser obligatorios; la respuesta expone el id
8
+ * de la network transfer de CP (mt_) además de los tx_.
9
+ */
10
+ describe('BankAccountMCSendTransferRequest', () => {
11
+ it('acepta un push directo a tarjeta sin email ni teléfono del beneficiario', () => {
12
+ const request: BankAccountMCSendTransferRequest = {
13
+ transactionNumber: 'T1',
14
+ amount: 1,
15
+ externalAccountId: 'cd_origen',
16
+ beneficiaryExternalAccountId: 'cd_destino',
17
+ };
18
+ expect(request.beneficiaryExternalAccountId).toBe('cd_destino');
19
+ expect(request.beneficiaryEmail).toBeUndefined();
20
+ });
21
+
22
+ it('sigue aceptando la intención por email y teléfono', () => {
23
+ const request: BankAccountMCSendTransferRequest = {
24
+ transactionNumber: 'T2',
25
+ amount: 1,
26
+ beneficiaryEmail: 'a@b.com',
27
+ beneficiaryPhoneNumber: '3055550100',
28
+ };
29
+ expect(request.beneficiaryExternalAccountId).toBeUndefined();
30
+ });
31
+ });
32
+
33
+ describe('BankAccountMCSendTransferResponse', () => {
34
+ it('expone externalTransferId (mt_) junto a externalTransactionId (tx_)', () => {
35
+ const response: BankAccountMCSendTransferResponse = {
36
+ externalTransactionId: 'tx_1|tx_2',
37
+ externalTransferId: 'mt_1',
38
+ transactionStatus: TransactionStatusEnum.COMPLETED,
39
+ transactionNumber: 'T1',
40
+ };
41
+ expect(response.externalTransferId).toBe('mt_1');
42
+ });
43
+ });
@@ -1,10 +1,16 @@
1
1
  export declare class BankAccountMCSendTransferRequest {
2
2
  transactionNumber: string;
3
3
  amount: number;
4
- beneficiaryEmail: string;
5
- beneficiaryPhoneNumber: string;
4
+ /** Intención por email/teléfono: obligatorios salvo que venga beneficiaryExternalAccountId. */
5
+ beneficiaryEmail?: string;
6
+ beneficiaryPhoneNumber?: string;
6
7
  beneficiaryName?: string;
7
8
  beneficiaryLastName?: string;
8
9
  concept?: string;
9
10
  externalAccountId?: string;
11
+ /**
12
+ * Push directo a una tarjeta del mismo programa (CARD_PUSH_FUNDS): cd_ de la tarjeta del
13
+ * beneficiario, usuario de Fiado. Si viene, CP acredita en la misma llamada sin intención.
14
+ */
15
+ beneficiaryExternalAccountId?: string;
10
16
  }
@@ -1,6 +1,9 @@
1
1
  import { TransactionStatusEnum } from "../../transaction";
2
2
  export declare class BankAccountMCSendTransferResponse {
3
+ /** Ids tx_ de los movimientos contables en CP, unidos por "|". */
3
4
  externalTransactionId: string;
5
+ /** Id mt_ de la network transfer en CP: sirve para consultar, cancelar o auditar el envío. */
6
+ externalTransferId?: string;
4
7
  transactionStatus: TransactionStatusEnum;
5
8
  transactionNumber: string;
6
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/type-kit",
3
- "version": "3.617.0",
3
+ "version": "3.618.0",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -1,10 +1,16 @@
1
1
  export class BankAccountMCSendTransferRequest {
2
2
  transactionNumber!: string;
3
3
  amount!: number;
4
- beneficiaryEmail!: string;
5
- beneficiaryPhoneNumber!: string;
4
+ /** Intención por email/teléfono: obligatorios salvo que venga beneficiaryExternalAccountId. */
5
+ beneficiaryEmail?: string;
6
+ beneficiaryPhoneNumber?: string;
6
7
  beneficiaryName?: string;
7
8
  beneficiaryLastName?: string;
8
9
  concept?: string;
9
10
  externalAccountId?: string;
11
+ /**
12
+ * Push directo a una tarjeta del mismo programa (CARD_PUSH_FUNDS): cd_ de la tarjeta del
13
+ * beneficiario, usuario de Fiado. Si viene, CP acredita en la misma llamada sin intención.
14
+ */
15
+ beneficiaryExternalAccountId?: string;
10
16
  }
@@ -1,7 +1,10 @@
1
1
  import { TransactionStatusEnum } from "../../transaction";
2
2
 
3
3
  export class BankAccountMCSendTransferResponse {
4
+ /** Ids tx_ de los movimientos contables en CP, unidos por "|". */
4
5
  externalTransactionId!: string;
6
+ /** Id mt_ de la network transfer en CP: sirve para consultar, cancelar o auditar el envío. */
7
+ externalTransferId?: string;
5
8
  transactionStatus!: TransactionStatusEnum;
6
9
  transactionNumber!: string;
7
10
  }