@fiado/type-kit 3.600.0 → 3.602.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.
@@ -1,5 +1,6 @@
1
1
  import { CollectionResultStatus } from '../enums/CollectionResultStatus';
2
2
  import { MechanismType } from '../enums/MechanismType';
3
+ import { CurrencyId } from '../../currency/enums/CurrencyId';
3
4
  /**
4
5
  * Resultado de un intento de cobro, tal como el motor se lo entrega al dominio dueño de la deuda.
5
6
  *
@@ -19,4 +20,11 @@ export declare class ApplyCollectionResultRequest {
19
20
  amountReserved: number;
20
21
  mechanism: MechanismType;
21
22
  holdTxId?: string;
23
+ /**
24
+ * Monto que salió de la wallet, en `walletCurrency`. Sólo viene cuando se retuvo o debitó dinero
25
+ * (ausente en NONE); en USD_PREAUTH son los USD retenidos, que el dominio usa como `amountBlocked`.
26
+ */
27
+ walletAmount?: number;
28
+ /** Moneda de `walletAmount`. Viene junto con él, sólo cuando se retuvo o debitó dinero. */
29
+ walletCurrency?: CurrencyId;
22
30
  }
@@ -13,6 +13,7 @@ exports.ApplyCollectionResultRequest = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
14
  const CollectionResultStatus_1 = require("../enums/CollectionResultStatus");
15
15
  const MechanismType_1 = require("../enums/MechanismType");
16
+ const CurrencyId_1 = require("../../currency/enums/CurrencyId");
16
17
  /**
17
18
  * Resultado de un intento de cobro, tal como el motor se lo entrega al dominio dueño de la deuda.
18
19
  *
@@ -65,3 +66,13 @@ __decorate([
65
66
  (0, class_validator_1.IsString)(),
66
67
  __metadata("design:type", String)
67
68
  ], ApplyCollectionResultRequest.prototype, "holdTxId", void 0);
69
+ __decorate([
70
+ (0, class_validator_1.IsOptional)(),
71
+ (0, class_validator_1.IsNumber)(),
72
+ __metadata("design:type", Number)
73
+ ], ApplyCollectionResultRequest.prototype, "walletAmount", void 0);
74
+ __decorate([
75
+ (0, class_validator_1.IsOptional)(),
76
+ (0, class_validator_1.IsEnum)(CurrencyId_1.CurrencyId),
77
+ __metadata("design:type", String)
78
+ ], ApplyCollectionResultRequest.prototype, "walletCurrency", void 0);
@@ -18,4 +18,11 @@ export declare class AuthorizeCollectionMovementRequest {
18
18
  * no romper a quien todavía no manda tarifa.
19
19
  */
20
20
  pricing?: CollectionPricingDto;
21
+ /**
22
+ * La config del producto en el motor permite un reserve/débito PARCIAL cuando la wallet no cubre
23
+ * el monto completo. Presente en `true`, el procesador reserva/debita lo disponible por encima de
24
+ * su mínimo por moneda y responde `PARTIAL`. Ausente o `false` conserva el comportamiento de todo
25
+ * o nada: si el saldo no cubre el monto, responde `NONE`.
26
+ */
27
+ allowPartial?: boolean;
21
28
  }
@@ -63,3 +63,8 @@ __decorate([
63
63
  (0, class_transformer_1.Type)(() => CollectionPricingDto_1.CollectionPricingDto),
64
64
  __metadata("design:type", CollectionPricingDto_1.CollectionPricingDto)
65
65
  ], AuthorizeCollectionMovementRequest.prototype, "pricing", void 0);
66
+ __decorate([
67
+ (0, class_validator_1.IsOptional)(),
68
+ (0, class_validator_1.IsBoolean)(),
69
+ __metadata("design:type", Boolean)
70
+ ], AuthorizeCollectionMovementRequest.prototype, "allowPartial", void 0);
@@ -10,4 +10,9 @@ export declare class AuthorizeCollectionMovementResponse {
10
10
  amount: number;
11
11
  holdTxId?: string;
12
12
  transactionId?: string;
13
+ /**
14
+ * Lo que realmente salió de la cuenta, en la moneda de la wallet y con comisiones incluidas.
15
+ * Sólo viene cuando se retuvo o debitó dinero (ausente en NONE); en USD_PREAUTH son los USD retenidos.
16
+ */
17
+ amountDebited?: number;
13
18
  }
@@ -39,3 +39,8 @@ __decorate([
39
39
  (0, class_validator_1.IsString)(),
40
40
  __metadata("design:type", String)
41
41
  ], AuthorizeCollectionMovementResponse.prototype, "transactionId", void 0);
42
+ __decorate([
43
+ (0, class_validator_1.IsOptional)(),
44
+ (0, class_validator_1.IsNumber)(),
45
+ __metadata("design:type", Number)
46
+ ], AuthorizeCollectionMovementResponse.prototype, "amountDebited", void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/type-kit",
3
- "version": "3.600.0",
3
+ "version": "3.602.0",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -1,6 +1,7 @@
1
1
  import { IsString, IsEnum, IsOptional, IsNumber } from 'class-validator';
2
2
  import { CollectionResultStatus } from '../enums/CollectionResultStatus';
3
3
  import { MechanismType } from '../enums/MechanismType';
4
+ import { CurrencyId } from '../../currency/enums/CurrencyId';
4
5
 
5
6
  /**
6
7
  * Resultado de un intento de cobro, tal como el motor se lo entrega al dominio dueño de la deuda.
@@ -21,4 +22,11 @@ export class ApplyCollectionResultRequest {
21
22
  @IsNumber() amountReserved!: number;
22
23
  @IsEnum(MechanismType) mechanism!: MechanismType;
23
24
  @IsOptional() @IsString() holdTxId?: string;
25
+ /**
26
+ * Monto que salió de la wallet, en `walletCurrency`. Sólo viene cuando se retuvo o debitó dinero
27
+ * (ausente en NONE); en USD_PREAUTH son los USD retenidos, que el dominio usa como `amountBlocked`.
28
+ */
29
+ @IsOptional() @IsNumber() walletAmount?: number;
30
+ /** Moneda de `walletAmount`. Viene junto con él, sólo cuando se retuvo o debitó dinero. */
31
+ @IsOptional() @IsEnum(CurrencyId) walletCurrency?: CurrencyId;
24
32
  }
@@ -1,4 +1,4 @@
1
- import { IsString, IsEnum, IsOptional, ValidateNested, IsNumber } from 'class-validator';
1
+ import { IsString, IsEnum, IsOptional, ValidateNested, IsNumber, IsBoolean } from 'class-validator';
2
2
  import { Type } from 'class-transformer';
3
3
  import { MechanismType } from '../enums/MechanismType';
4
4
  import { CurrencyId } from '../../currency/enums/CurrencyId';
@@ -22,4 +22,12 @@ export class AuthorizeCollectionMovementRequest {
22
22
  * no romper a quien todavía no manda tarifa.
23
23
  */
24
24
  @IsOptional() @ValidateNested() @Type(() => CollectionPricingDto) pricing?: CollectionPricingDto;
25
+
26
+ /**
27
+ * La config del producto en el motor permite un reserve/débito PARCIAL cuando la wallet no cubre
28
+ * el monto completo. Presente en `true`, el procesador reserva/debita lo disponible por encima de
29
+ * su mínimo por moneda y responde `PARTIAL`. Ausente o `false` conserva el comportamiento de todo
30
+ * o nada: si el saldo no cubre el monto, responde `NONE`.
31
+ */
32
+ @IsOptional() @IsBoolean() allowPartial?: boolean;
25
33
  }
@@ -12,4 +12,9 @@ export class AuthorizeCollectionMovementResponse {
12
12
  @IsNumber() amount!: number; // reservado o cobrado
13
13
  @IsOptional() @IsString() holdTxId?: string;
14
14
  @IsOptional() @IsString() transactionId?: string;
15
+ /**
16
+ * Lo que realmente salió de la cuenta, en la moneda de la wallet y con comisiones incluidas.
17
+ * Sólo viene cuando se retuvo o debitó dinero (ausente en NONE); en USD_PREAUTH son los USD retenidos.
18
+ */
19
+ @IsOptional() @IsNumber() amountDebited?: number;
15
20
  }