@fiado/type-kit 3.371.0 → 3.372.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,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Aviso de que a un titular le entró dinero.
|
|
3
|
+
*
|
|
4
|
+
* Lo publica el procesador de transacciones al registrar cualquier ingreso, y lo consume el motor de
|
|
5
|
+
* cobro para reintentar en el acto los cobros que habían quedado esperando fondos. Sin este aviso el
|
|
6
|
+
* motor sólo se entera cuando su barrido programado vuelve a pasar.
|
|
7
|
+
*
|
|
8
|
+
* Es una notificación, no una orden de cobro: dice que hay saldo nuevo, y es el motor quien decide
|
|
9
|
+
* si eso alcanza para algo y a qué cargos aplicarlo.
|
|
10
|
+
*/
|
|
11
|
+
export declare class MoneyInEvent {
|
|
12
|
+
/** Titular que recibió el dinero. */
|
|
13
|
+
ownerRef: string;
|
|
14
|
+
tenantId: string;
|
|
15
|
+
/** Proveedor de la wallet donde entró — el motor lo usa para saber qué fuentes reintentar. */
|
|
16
|
+
provider: string;
|
|
17
|
+
currencyId: string;
|
|
18
|
+
/** Importe del ingreso, en la moneda de la wallet. */
|
|
19
|
+
amount: number;
|
|
20
|
+
/** Referencia del movimiento que lo originó, para poder seguirle el rastro. */
|
|
21
|
+
transactionId?: string;
|
|
22
|
+
/** Momento del ingreso, epoch en milisegundos. */
|
|
23
|
+
occurredAt?: number;
|
|
24
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.MoneyInEvent = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
/**
|
|
15
|
+
* Aviso de que a un titular le entró dinero.
|
|
16
|
+
*
|
|
17
|
+
* Lo publica el procesador de transacciones al registrar cualquier ingreso, y lo consume el motor de
|
|
18
|
+
* cobro para reintentar en el acto los cobros que habían quedado esperando fondos. Sin este aviso el
|
|
19
|
+
* motor sólo se entera cuando su barrido programado vuelve a pasar.
|
|
20
|
+
*
|
|
21
|
+
* Es una notificación, no una orden de cobro: dice que hay saldo nuevo, y es el motor quien decide
|
|
22
|
+
* si eso alcanza para algo y a qué cargos aplicarlo.
|
|
23
|
+
*/
|
|
24
|
+
class MoneyInEvent {
|
|
25
|
+
}
|
|
26
|
+
exports.MoneyInEvent = MoneyInEvent;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], MoneyInEvent.prototype, "ownerRef", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsString)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], MoneyInEvent.prototype, "tenantId", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsString)(),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], MoneyInEvent.prototype, "provider", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.IsString)(),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], MoneyInEvent.prototype, "currencyId", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_validator_1.IsNumber)(),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], MoneyInEvent.prototype, "amount", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_validator_1.IsOptional)(),
|
|
49
|
+
(0, class_validator_1.IsString)(),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], MoneyInEvent.prototype, "transactionId", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_validator_1.IsOptional)(),
|
|
54
|
+
(0, class_validator_1.IsNumber)(),
|
|
55
|
+
__metadata("design:type", Number)
|
|
56
|
+
], MoneyInEvent.prototype, "occurredAt", void 0);
|
|
@@ -17,6 +17,7 @@ export * from './dtos/UpsertProductConfigRequest';
|
|
|
17
17
|
export * from './dtos/ApplyCollectionResultRequest';
|
|
18
18
|
export * from './dtos/DeregisterChargeResponse';
|
|
19
19
|
export * from './dtos/ResolvePendingChargesRequest';
|
|
20
|
+
export * from './dtos/MoneyInEvent';
|
|
20
21
|
export * from './dtos/CollectionIntentSummaryDto';
|
|
21
22
|
export * from './dtos/CollectionAttemptDto';
|
|
22
23
|
export * from './dtos/CollectionOutboxEventDto';
|
package/bin/collection/index.js
CHANGED
|
@@ -35,6 +35,7 @@ __exportStar(require("./dtos/UpsertProductConfigRequest"), exports);
|
|
|
35
35
|
__exportStar(require("./dtos/ApplyCollectionResultRequest"), exports);
|
|
36
36
|
__exportStar(require("./dtos/DeregisterChargeResponse"), exports);
|
|
37
37
|
__exportStar(require("./dtos/ResolvePendingChargesRequest"), exports);
|
|
38
|
+
__exportStar(require("./dtos/MoneyInEvent"), exports);
|
|
38
39
|
// DTOs — backoffice de monitoreo
|
|
39
40
|
__exportStar(require("./dtos/CollectionIntentSummaryDto"), exports);
|
|
40
41
|
__exportStar(require("./dtos/CollectionAttemptDto"), exports);
|
package/package.json
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IsNumber, IsOptional, IsString } from 'class-validator';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Aviso de que a un titular le entró dinero.
|
|
5
|
+
*
|
|
6
|
+
* Lo publica el procesador de transacciones al registrar cualquier ingreso, y lo consume el motor de
|
|
7
|
+
* cobro para reintentar en el acto los cobros que habían quedado esperando fondos. Sin este aviso el
|
|
8
|
+
* motor sólo se entera cuando su barrido programado vuelve a pasar.
|
|
9
|
+
*
|
|
10
|
+
* Es una notificación, no una orden de cobro: dice que hay saldo nuevo, y es el motor quien decide
|
|
11
|
+
* si eso alcanza para algo y a qué cargos aplicarlo.
|
|
12
|
+
*/
|
|
13
|
+
export class MoneyInEvent {
|
|
14
|
+
/** Titular que recibió el dinero. */
|
|
15
|
+
@IsString() ownerRef!: string;
|
|
16
|
+
|
|
17
|
+
@IsString() tenantId!: string;
|
|
18
|
+
|
|
19
|
+
/** Proveedor de la wallet donde entró — el motor lo usa para saber qué fuentes reintentar. */
|
|
20
|
+
@IsString() provider!: string;
|
|
21
|
+
|
|
22
|
+
@IsString() currencyId!: string;
|
|
23
|
+
|
|
24
|
+
/** Importe del ingreso, en la moneda de la wallet. */
|
|
25
|
+
@IsNumber() amount!: number;
|
|
26
|
+
|
|
27
|
+
/** Referencia del movimiento que lo originó, para poder seguirle el rastro. */
|
|
28
|
+
@IsOptional() @IsString() transactionId?: string;
|
|
29
|
+
|
|
30
|
+
/** Momento del ingreso, epoch en milisegundos. */
|
|
31
|
+
@IsOptional() @IsNumber() occurredAt?: number;
|
|
32
|
+
}
|
package/src/collection/index.ts
CHANGED
|
@@ -20,6 +20,7 @@ export * from './dtos/UpsertProductConfigRequest';
|
|
|
20
20
|
export * from './dtos/ApplyCollectionResultRequest';
|
|
21
21
|
export * from './dtos/DeregisterChargeResponse';
|
|
22
22
|
export * from './dtos/ResolvePendingChargesRequest';
|
|
23
|
+
export * from './dtos/MoneyInEvent';
|
|
23
24
|
|
|
24
25
|
// DTOs — backoffice de monitoreo
|
|
25
26
|
export * from './dtos/CollectionIntentSummaryDto';
|