@fiado/type-kit 3.277.0 → 3.279.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 (47) hide show
  1. package/_test_/unit/biometrics/CreateBiometricVerificationRequest.test.ts +27 -0
  2. package/bin/collection/dtos/CollectionAttemptDto.d.ts +15 -0
  3. package/bin/collection/dtos/CollectionAttemptDto.js +63 -0
  4. package/bin/collection/dtos/CollectionErrorLogDto.d.ts +12 -0
  5. package/bin/collection/dtos/CollectionErrorLogDto.js +54 -0
  6. package/bin/collection/dtos/CollectionIntentDetailDto.d.ts +10 -0
  7. package/bin/collection/dtos/CollectionIntentDetailDto.js +40 -0
  8. package/bin/collection/dtos/CollectionIntentSummaryDto.d.ts +22 -0
  9. package/bin/collection/dtos/CollectionIntentSummaryDto.js +94 -0
  10. package/bin/collection/dtos/CollectionMetricsDto.d.ts +9 -0
  11. package/bin/collection/dtos/CollectionMetricsDto.js +41 -0
  12. package/bin/collection/dtos/CollectionOutboxEventDto.d.ts +15 -0
  13. package/bin/collection/dtos/CollectionOutboxEventDto.js +56 -0
  14. package/bin/collection/index.d.ts +6 -0
  15. package/bin/collection/index.js +7 -0
  16. package/bin/identity/enums/SelfieSourceEnum.d.ts +10 -0
  17. package/bin/identity/enums/SelfieSourceEnum.js +14 -0
  18. package/bin/loanCredit/dtos/requests/UpdateActivationChecklistRequest.d.ts +11 -0
  19. package/bin/loanCredit/dtos/requests/UpdateActivationChecklistRequest.js +46 -0
  20. package/bin/loanCredit/enums/ClientLevelEnum.d.ts +11 -0
  21. package/bin/loanCredit/enums/ClientLevelEnum.js +15 -0
  22. package/bin/walletFunding/dtos/CancelFundingReferenceRequest.d.ts +6 -0
  23. package/bin/{platformRbac/dtos/ResendSelfRegisterOtpRequest.js → walletFunding/dtos/CancelFundingReferenceRequest.js} +13 -18
  24. package/bin/walletFunding/dtos/CancelFundingReferenceResponse.d.ts +7 -0
  25. package/bin/walletFunding/dtos/CancelFundingReferenceResponse.js +6 -0
  26. package/bin/walletFunding/dtos/CancelFundingRequest.d.ts +11 -0
  27. package/bin/{platformRbac/dtos/ResendOtpRequest.js → walletFunding/dtos/CancelFundingRequest.js} +13 -16
  28. package/bin/walletFunding/dtos/CancelFundingResponse.d.ts +14 -0
  29. package/bin/walletFunding/dtos/CancelFundingResponse.js +12 -0
  30. package/bin/walletFunding/dtos/CancelWalletFundingRequest.d.ts +3 -0
  31. package/bin/walletFunding/dtos/CancelWalletFundingRequest.js +21 -0
  32. package/bin/walletFunding/dtos/CancelWalletFundingResponse.d.ts +7 -0
  33. package/bin/walletFunding/dtos/CancelWalletFundingResponse.js +6 -0
  34. package/package.json +1 -1
  35. package/src/collection/dtos/CollectionAttemptDto.ts +17 -0
  36. package/src/collection/dtos/CollectionErrorLogDto.ts +14 -0
  37. package/src/collection/dtos/CollectionIntentDetailDto.ts +13 -0
  38. package/src/collection/dtos/CollectionIntentSummaryDto.ts +24 -0
  39. package/src/collection/dtos/CollectionMetricsDto.ts +11 -0
  40. package/src/collection/dtos/CollectionOutboxEventDto.ts +17 -0
  41. package/src/collection/index.ts +8 -0
  42. package/bin/loanConfig/enums/ModifiableByRoleEnum.d.ts +0 -11
  43. package/bin/loanConfig/enums/ModifiableByRoleEnum.js +0 -15
  44. package/bin/places/dtos/CashInFeeDto.d.ts +0 -17
  45. package/bin/places/dtos/CashInFeeDto.js +0 -12
  46. package/bin/platformRbac/dtos/ResendOtpRequest.d.ts +0 -22
  47. package/bin/platformRbac/dtos/ResendSelfRegisterOtpRequest.d.ts +0 -11
@@ -106,4 +106,31 @@ describe('CreateBiometricVerificationRequest', () => {
106
106
  it('rechaza un callerContext de más de 256 caracteres', async () => {
107
107
  expect(await propiedadesConError({ ...base, callerContext: 'x'.repeat(257) })).toContain('callerContext');
108
108
  });
109
+
110
+ /**
111
+ * `deliveryMode` es OPCIONAL y es una PREFERENCIA: el servicio responde con el modo que el
112
+ * proveedor soporta de verdad, y el real siempre viene en la respuesta. Acá solo se valida que el
113
+ * request admita los modos del enum y rechace cualquier otra cosa.
114
+ */
115
+ describe('deliveryMode', () => {
116
+ it('es opcional: sin él, el request mínimo sigue siendo válido', async () => {
117
+ expect(await propiedadesConError(base)).toEqual([]);
118
+ });
119
+
120
+ it.each(['REDIRECT', 'EMBEDDED_SDK', 'CHALLENGE', 'IMMEDIATE'])('acepta %s', async (modo) => {
121
+ expect(await propiedadesConError({ ...base, deliveryMode: modo })).toEqual([]);
122
+ });
123
+
124
+ it('rechaza un modo que no está en el enum', async () => {
125
+ expect(await propiedadesConError({ ...base, deliveryMode: 'CARTA_CERTIFICADA' })).toContain('deliveryMode');
126
+ });
127
+
128
+ it('rechaza el nombre en minúsculas: el enum distingue mayúsculas', async () => {
129
+ expect(await propiedadesConError({ ...base, deliveryMode: 'redirect' })).toContain('deliveryMode');
130
+ });
131
+
132
+ it('sobrevive al plainToInstance con excludeExtraneousValues (lleva @Expose)', () => {
133
+ expect(instancia({ ...base, deliveryMode: 'EMBEDDED_SDK' }).deliveryMode).toBe('EMBEDDED_SDK');
134
+ });
135
+ });
109
136
  });
@@ -0,0 +1,15 @@
1
+ import { MechanismType } from '../enums/MechanismType';
2
+ import { CollectionResultStatus } from '../enums/CollectionResultStatus';
3
+ /** Un intento de cobro ejecutado sobre un intent, para el backoffice de monitoreo. */
4
+ export declare class CollectionAttemptDto {
5
+ attemptId: string;
6
+ intentId: string;
7
+ source: string;
8
+ mechanism: MechanismType;
9
+ amount: number;
10
+ holdTxId?: string;
11
+ result?: CollectionResultStatus;
12
+ errorCode?: string;
13
+ errorDetail?: string;
14
+ createdAt: number;
15
+ }
@@ -0,0 +1,63 @@
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.CollectionAttemptDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const MechanismType_1 = require("../enums/MechanismType");
15
+ const CollectionResultStatus_1 = require("../enums/CollectionResultStatus");
16
+ /** Un intento de cobro ejecutado sobre un intent, para el backoffice de monitoreo. */
17
+ class CollectionAttemptDto {
18
+ }
19
+ exports.CollectionAttemptDto = CollectionAttemptDto;
20
+ __decorate([
21
+ (0, class_validator_1.IsString)(),
22
+ __metadata("design:type", String)
23
+ ], CollectionAttemptDto.prototype, "attemptId", void 0);
24
+ __decorate([
25
+ (0, class_validator_1.IsString)(),
26
+ __metadata("design:type", String)
27
+ ], CollectionAttemptDto.prototype, "intentId", void 0);
28
+ __decorate([
29
+ (0, class_validator_1.IsString)(),
30
+ __metadata("design:type", String)
31
+ ], CollectionAttemptDto.prototype, "source", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsEnum)(MechanismType_1.MechanismType),
34
+ __metadata("design:type", String)
35
+ ], CollectionAttemptDto.prototype, "mechanism", void 0);
36
+ __decorate([
37
+ (0, class_validator_1.IsInt)(),
38
+ __metadata("design:type", Number)
39
+ ], CollectionAttemptDto.prototype, "amount", void 0);
40
+ __decorate([
41
+ (0, class_validator_1.IsOptional)(),
42
+ (0, class_validator_1.IsString)(),
43
+ __metadata("design:type", String)
44
+ ], CollectionAttemptDto.prototype, "holdTxId", void 0);
45
+ __decorate([
46
+ (0, class_validator_1.IsOptional)(),
47
+ (0, class_validator_1.IsEnum)(CollectionResultStatus_1.CollectionResultStatus),
48
+ __metadata("design:type", String)
49
+ ], CollectionAttemptDto.prototype, "result", void 0);
50
+ __decorate([
51
+ (0, class_validator_1.IsOptional)(),
52
+ (0, class_validator_1.IsString)(),
53
+ __metadata("design:type", String)
54
+ ], CollectionAttemptDto.prototype, "errorCode", void 0);
55
+ __decorate([
56
+ (0, class_validator_1.IsOptional)(),
57
+ (0, class_validator_1.IsString)(),
58
+ __metadata("design:type", String)
59
+ ], CollectionAttemptDto.prototype, "errorDetail", void 0);
60
+ __decorate([
61
+ (0, class_validator_1.IsInt)(),
62
+ __metadata("design:type", Number)
63
+ ], CollectionAttemptDto.prototype, "createdAt", void 0);
@@ -0,0 +1,12 @@
1
+ import { SagaStep } from '../enums/SagaStep';
2
+ /** Entrada del log estructurado de errores del motor de cobro, para el backoffice de monitoreo. */
3
+ export declare class CollectionErrorLogDto {
4
+ errorId: string;
5
+ intentId?: string;
6
+ attemptId?: string;
7
+ sagaStep?: SagaStep;
8
+ errorCode: string;
9
+ errorDetail?: string;
10
+ tenantId: string;
11
+ createdAt: number;
12
+ }
@@ -0,0 +1,54 @@
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.CollectionErrorLogDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const SagaStep_1 = require("../enums/SagaStep");
15
+ /** Entrada del log estructurado de errores del motor de cobro, para el backoffice de monitoreo. */
16
+ class CollectionErrorLogDto {
17
+ }
18
+ exports.CollectionErrorLogDto = CollectionErrorLogDto;
19
+ __decorate([
20
+ (0, class_validator_1.IsString)(),
21
+ __metadata("design:type", String)
22
+ ], CollectionErrorLogDto.prototype, "errorId", void 0);
23
+ __decorate([
24
+ (0, class_validator_1.IsOptional)(),
25
+ (0, class_validator_1.IsString)(),
26
+ __metadata("design:type", String)
27
+ ], CollectionErrorLogDto.prototype, "intentId", void 0);
28
+ __decorate([
29
+ (0, class_validator_1.IsOptional)(),
30
+ (0, class_validator_1.IsString)(),
31
+ __metadata("design:type", String)
32
+ ], CollectionErrorLogDto.prototype, "attemptId", void 0);
33
+ __decorate([
34
+ (0, class_validator_1.IsOptional)(),
35
+ (0, class_validator_1.IsEnum)(SagaStep_1.SagaStep),
36
+ __metadata("design:type", String)
37
+ ], CollectionErrorLogDto.prototype, "sagaStep", void 0);
38
+ __decorate([
39
+ (0, class_validator_1.IsString)(),
40
+ __metadata("design:type", String)
41
+ ], CollectionErrorLogDto.prototype, "errorCode", void 0);
42
+ __decorate([
43
+ (0, class_validator_1.IsOptional)(),
44
+ (0, class_validator_1.IsString)(),
45
+ __metadata("design:type", String)
46
+ ], CollectionErrorLogDto.prototype, "errorDetail", void 0);
47
+ __decorate([
48
+ (0, class_validator_1.IsString)(),
49
+ __metadata("design:type", String)
50
+ ], CollectionErrorLogDto.prototype, "tenantId", void 0);
51
+ __decorate([
52
+ (0, class_validator_1.IsInt)(),
53
+ __metadata("design:type", Number)
54
+ ], CollectionErrorLogDto.prototype, "createdAt", void 0);
@@ -0,0 +1,10 @@
1
+ import { CollectionIntentSummaryDto } from './CollectionIntentSummaryDto';
2
+ import { CollectionAttemptDto } from './CollectionAttemptDto';
3
+ import { CollectionOutboxEventDto } from './CollectionOutboxEventDto';
4
+ import { CollectionErrorLogDto } from './CollectionErrorLogDto';
5
+ /** Detalle de un intent para el backoffice de monitoreo: el resumen más su historial completo. */
6
+ export declare class CollectionIntentDetailDto extends CollectionIntentSummaryDto {
7
+ attempts: CollectionAttemptDto[];
8
+ outbox: CollectionOutboxEventDto[];
9
+ errors: CollectionErrorLogDto[];
10
+ }
@@ -0,0 +1,40 @@
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.CollectionIntentDetailDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const class_transformer_1 = require("class-transformer");
15
+ const CollectionIntentSummaryDto_1 = require("./CollectionIntentSummaryDto");
16
+ const CollectionAttemptDto_1 = require("./CollectionAttemptDto");
17
+ const CollectionOutboxEventDto_1 = require("./CollectionOutboxEventDto");
18
+ const CollectionErrorLogDto_1 = require("./CollectionErrorLogDto");
19
+ /** Detalle de un intent para el backoffice de monitoreo: el resumen más su historial completo. */
20
+ class CollectionIntentDetailDto extends CollectionIntentSummaryDto_1.CollectionIntentSummaryDto {
21
+ }
22
+ exports.CollectionIntentDetailDto = CollectionIntentDetailDto;
23
+ __decorate([
24
+ (0, class_validator_1.IsArray)(),
25
+ (0, class_validator_1.ValidateNested)({ each: true }),
26
+ (0, class_transformer_1.Type)(() => CollectionAttemptDto_1.CollectionAttemptDto),
27
+ __metadata("design:type", Array)
28
+ ], CollectionIntentDetailDto.prototype, "attempts", void 0);
29
+ __decorate([
30
+ (0, class_validator_1.IsArray)(),
31
+ (0, class_validator_1.ValidateNested)({ each: true }),
32
+ (0, class_transformer_1.Type)(() => CollectionOutboxEventDto_1.CollectionOutboxEventDto),
33
+ __metadata("design:type", Array)
34
+ ], CollectionIntentDetailDto.prototype, "outbox", void 0);
35
+ __decorate([
36
+ (0, class_validator_1.IsArray)(),
37
+ (0, class_validator_1.ValidateNested)({ each: true }),
38
+ (0, class_transformer_1.Type)(() => CollectionErrorLogDto_1.CollectionErrorLogDto),
39
+ __metadata("design:type", Array)
40
+ ], CollectionIntentDetailDto.prototype, "errors", void 0);
@@ -0,0 +1,22 @@
1
+ import { CollectionState } from '../enums/CollectionState';
2
+ import { SagaStep } from '../enums/SagaStep';
3
+ /** Fila de listado de intents para el backoffice de monitoreo del motor de cobro. */
4
+ export declare class CollectionIntentSummaryDto {
5
+ intentId: string;
6
+ ownerRef: string;
7
+ tenantId: string;
8
+ domain: string;
9
+ chargeId: string;
10
+ amount: number;
11
+ reserved?: number;
12
+ state: CollectionState;
13
+ sagaStep: SagaStep;
14
+ attention?: boolean;
15
+ failureCount?: number;
16
+ retryCount?: number;
17
+ nextRetryAt?: number;
18
+ lastErrorCode?: string;
19
+ lastErrorMsg?: string;
20
+ createdAt: number;
21
+ updatedAt: number;
22
+ }
@@ -0,0 +1,94 @@
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.CollectionIntentSummaryDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const CollectionState_1 = require("../enums/CollectionState");
15
+ const SagaStep_1 = require("../enums/SagaStep");
16
+ /** Fila de listado de intents para el backoffice de monitoreo del motor de cobro. */
17
+ class CollectionIntentSummaryDto {
18
+ }
19
+ exports.CollectionIntentSummaryDto = CollectionIntentSummaryDto;
20
+ __decorate([
21
+ (0, class_validator_1.IsString)(),
22
+ __metadata("design:type", String)
23
+ ], CollectionIntentSummaryDto.prototype, "intentId", void 0);
24
+ __decorate([
25
+ (0, class_validator_1.IsString)(),
26
+ __metadata("design:type", String)
27
+ ], CollectionIntentSummaryDto.prototype, "ownerRef", void 0);
28
+ __decorate([
29
+ (0, class_validator_1.IsString)(),
30
+ __metadata("design:type", String)
31
+ ], CollectionIntentSummaryDto.prototype, "tenantId", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsString)(),
34
+ __metadata("design:type", String)
35
+ ], CollectionIntentSummaryDto.prototype, "domain", void 0);
36
+ __decorate([
37
+ (0, class_validator_1.IsString)(),
38
+ __metadata("design:type", String)
39
+ ], CollectionIntentSummaryDto.prototype, "chargeId", void 0);
40
+ __decorate([
41
+ (0, class_validator_1.IsInt)(),
42
+ __metadata("design:type", Number)
43
+ ], CollectionIntentSummaryDto.prototype, "amount", void 0);
44
+ __decorate([
45
+ (0, class_validator_1.IsOptional)(),
46
+ (0, class_validator_1.IsInt)(),
47
+ __metadata("design:type", Number)
48
+ ], CollectionIntentSummaryDto.prototype, "reserved", void 0);
49
+ __decorate([
50
+ (0, class_validator_1.IsEnum)(CollectionState_1.CollectionState),
51
+ __metadata("design:type", String)
52
+ ], CollectionIntentSummaryDto.prototype, "state", void 0);
53
+ __decorate([
54
+ (0, class_validator_1.IsEnum)(SagaStep_1.SagaStep),
55
+ __metadata("design:type", String)
56
+ ], CollectionIntentSummaryDto.prototype, "sagaStep", void 0);
57
+ __decorate([
58
+ (0, class_validator_1.IsOptional)(),
59
+ (0, class_validator_1.IsBoolean)(),
60
+ __metadata("design:type", Boolean)
61
+ ], CollectionIntentSummaryDto.prototype, "attention", void 0);
62
+ __decorate([
63
+ (0, class_validator_1.IsOptional)(),
64
+ (0, class_validator_1.IsInt)(),
65
+ __metadata("design:type", Number)
66
+ ], CollectionIntentSummaryDto.prototype, "failureCount", void 0);
67
+ __decorate([
68
+ (0, class_validator_1.IsOptional)(),
69
+ (0, class_validator_1.IsInt)(),
70
+ __metadata("design:type", Number)
71
+ ], CollectionIntentSummaryDto.prototype, "retryCount", void 0);
72
+ __decorate([
73
+ (0, class_validator_1.IsOptional)(),
74
+ (0, class_validator_1.IsInt)(),
75
+ __metadata("design:type", Number)
76
+ ], CollectionIntentSummaryDto.prototype, "nextRetryAt", void 0);
77
+ __decorate([
78
+ (0, class_validator_1.IsOptional)(),
79
+ (0, class_validator_1.IsString)(),
80
+ __metadata("design:type", String)
81
+ ], CollectionIntentSummaryDto.prototype, "lastErrorCode", void 0);
82
+ __decorate([
83
+ (0, class_validator_1.IsOptional)(),
84
+ (0, class_validator_1.IsString)(),
85
+ __metadata("design:type", String)
86
+ ], CollectionIntentSummaryDto.prototype, "lastErrorMsg", void 0);
87
+ __decorate([
88
+ (0, class_validator_1.IsInt)(),
89
+ __metadata("design:type", Number)
90
+ ], CollectionIntentSummaryDto.prototype, "createdAt", void 0);
91
+ __decorate([
92
+ (0, class_validator_1.IsInt)(),
93
+ __metadata("design:type", Number)
94
+ ], CollectionIntentSummaryDto.prototype, "updatedAt", void 0);
@@ -0,0 +1,9 @@
1
+ /** Métricas agregadas del motor de cobro, para el dashboard del backoffice de monitoreo. */
2
+ export declare class CollectionMetricsDto {
3
+ countsByState: Record<string, number>;
4
+ successRate: number;
5
+ amountReserved: number;
6
+ amountCollected: number;
7
+ backlogAwaitingFunds: number;
8
+ dlqCount: number;
9
+ }
@@ -0,0 +1,41 @@
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.CollectionMetricsDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ /** Métricas agregadas del motor de cobro, para el dashboard del backoffice de monitoreo. */
15
+ class CollectionMetricsDto {
16
+ }
17
+ exports.CollectionMetricsDto = CollectionMetricsDto;
18
+ __decorate([
19
+ (0, class_validator_1.IsObject)(),
20
+ __metadata("design:type", Object)
21
+ ], CollectionMetricsDto.prototype, "countsByState", void 0);
22
+ __decorate([
23
+ (0, class_validator_1.IsNumber)(),
24
+ __metadata("design:type", Number)
25
+ ], CollectionMetricsDto.prototype, "successRate", void 0);
26
+ __decorate([
27
+ (0, class_validator_1.IsInt)(),
28
+ __metadata("design:type", Number)
29
+ ], CollectionMetricsDto.prototype, "amountReserved", void 0);
30
+ __decorate([
31
+ (0, class_validator_1.IsInt)(),
32
+ __metadata("design:type", Number)
33
+ ], CollectionMetricsDto.prototype, "amountCollected", void 0);
34
+ __decorate([
35
+ (0, class_validator_1.IsInt)(),
36
+ __metadata("design:type", Number)
37
+ ], CollectionMetricsDto.prototype, "backlogAwaitingFunds", void 0);
38
+ __decorate([
39
+ (0, class_validator_1.IsInt)(),
40
+ __metadata("design:type", Number)
41
+ ], CollectionMetricsDto.prototype, "dlqCount", void 0);
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Mensaje del outbox transaccional (publicación de `CollectionResult` hacia el dominio), para el
3
+ * backoffice de monitoreo. `status` viaja como texto (p.ej. `PENDING`, `SENT`, `FAILED`, `DLQ`) — su
4
+ * enum de origen es interno a la mecánica de entrega del motor.
5
+ */
6
+ export declare class CollectionOutboxEventDto {
7
+ eventId: string;
8
+ attemptId: string;
9
+ domain: string;
10
+ status: string;
11
+ deliveryAttempts?: number;
12
+ lastError?: string;
13
+ movedToDlqAt?: number;
14
+ createdAt: number;
15
+ }
@@ -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.CollectionOutboxEventDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ /**
15
+ * Mensaje del outbox transaccional (publicación de `CollectionResult` hacia el dominio), para el
16
+ * backoffice de monitoreo. `status` viaja como texto (p.ej. `PENDING`, `SENT`, `FAILED`, `DLQ`) — su
17
+ * enum de origen es interno a la mecánica de entrega del motor.
18
+ */
19
+ class CollectionOutboxEventDto {
20
+ }
21
+ exports.CollectionOutboxEventDto = CollectionOutboxEventDto;
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ __metadata("design:type", String)
25
+ ], CollectionOutboxEventDto.prototype, "eventId", void 0);
26
+ __decorate([
27
+ (0, class_validator_1.IsString)(),
28
+ __metadata("design:type", String)
29
+ ], CollectionOutboxEventDto.prototype, "attemptId", void 0);
30
+ __decorate([
31
+ (0, class_validator_1.IsString)(),
32
+ __metadata("design:type", String)
33
+ ], CollectionOutboxEventDto.prototype, "domain", void 0);
34
+ __decorate([
35
+ (0, class_validator_1.IsString)(),
36
+ __metadata("design:type", String)
37
+ ], CollectionOutboxEventDto.prototype, "status", void 0);
38
+ __decorate([
39
+ (0, class_validator_1.IsOptional)(),
40
+ (0, class_validator_1.IsInt)(),
41
+ __metadata("design:type", Number)
42
+ ], CollectionOutboxEventDto.prototype, "deliveryAttempts", void 0);
43
+ __decorate([
44
+ (0, class_validator_1.IsOptional)(),
45
+ (0, class_validator_1.IsString)(),
46
+ __metadata("design:type", String)
47
+ ], CollectionOutboxEventDto.prototype, "lastError", void 0);
48
+ __decorate([
49
+ (0, class_validator_1.IsOptional)(),
50
+ (0, class_validator_1.IsInt)(),
51
+ __metadata("design:type", Number)
52
+ ], CollectionOutboxEventDto.prototype, "movedToDlqAt", void 0);
53
+ __decorate([
54
+ (0, class_validator_1.IsInt)(),
55
+ __metadata("design:type", Number)
56
+ ], CollectionOutboxEventDto.prototype, "createdAt", void 0);
@@ -14,3 +14,9 @@ export * from './dtos/CollectionSourceDto';
14
14
  export * from './dtos/CollectionProductConfigDto';
15
15
  export * from './dtos/UpsertProductConfigRequest';
16
16
  export * from './dtos/ApplyCollectionResultRequest';
17
+ export * from './dtos/CollectionIntentSummaryDto';
18
+ export * from './dtos/CollectionAttemptDto';
19
+ export * from './dtos/CollectionOutboxEventDto';
20
+ export * from './dtos/CollectionErrorLogDto';
21
+ export * from './dtos/CollectionIntentDetailDto';
22
+ export * from './dtos/CollectionMetricsDto';
@@ -32,3 +32,10 @@ __exportStar(require("./dtos/CollectionSourceDto"), exports);
32
32
  __exportStar(require("./dtos/CollectionProductConfigDto"), exports);
33
33
  __exportStar(require("./dtos/UpsertProductConfigRequest"), exports);
34
34
  __exportStar(require("./dtos/ApplyCollectionResultRequest"), exports);
35
+ // DTOs — backoffice de monitoreo
36
+ __exportStar(require("./dtos/CollectionIntentSummaryDto"), exports);
37
+ __exportStar(require("./dtos/CollectionAttemptDto"), exports);
38
+ __exportStar(require("./dtos/CollectionOutboxEventDto"), exports);
39
+ __exportStar(require("./dtos/CollectionErrorLogDto"), exports);
40
+ __exportStar(require("./dtos/CollectionIntentDetailDto"), exports);
41
+ __exportStar(require("./dtos/CollectionMetricsDto"), exports);
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Con qué criterio se resolvió cuál archivo de S3 es la selfie del usuario.
3
+ * Le dice al consumidor qué tan confiable es el match antes de mandarla a un facematch.
4
+ */
5
+ export declare enum SelfieSourceEnum {
6
+ /** Matcheó el verificationId de la verificación vigente en People. */
7
+ VERIFICATION = "VERIFICATION",
8
+ /** No hubo match por verificación: se tomó el archivo de selfie más reciente del bucket. */
9
+ LATEST = "LATEST"
10
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SelfieSourceEnum = void 0;
4
+ /**
5
+ * Con qué criterio se resolvió cuál archivo de S3 es la selfie del usuario.
6
+ * Le dice al consumidor qué tan confiable es el match antes de mandarla a un facematch.
7
+ */
8
+ var SelfieSourceEnum;
9
+ (function (SelfieSourceEnum) {
10
+ /** Matcheó el verificationId de la verificación vigente en People. */
11
+ SelfieSourceEnum["VERIFICATION"] = "VERIFICATION";
12
+ /** No hubo match por verificación: se tomó el archivo de selfie más reciente del bucket. */
13
+ SelfieSourceEnum["LATEST"] = "LATEST";
14
+ })(SelfieSourceEnum || (exports.SelfieSourceEnum = SelfieSourceEnum = {}));
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Body de PUT /credits/:creditId/checklist (loan-credit-business). Marca condiciones de activación
3
+ * cumplidas. Solo se mandan las que cambian; en F3 las marcarán los flujos de firma de contrato
4
+ * (`downPayment` + `contractSigned`) y de enrolamiento MDM (`imeiEnrolled` + `lockVerified`).
5
+ */
6
+ export declare class UpdateActivationChecklistRequest {
7
+ downPayment?: boolean;
8
+ contractSigned?: boolean;
9
+ imeiEnrolled?: boolean;
10
+ lockVerified?: boolean;
11
+ }
@@ -0,0 +1,46 @@
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.UpdateActivationChecklistRequest = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ /**
16
+ * Body de PUT /credits/:creditId/checklist (loan-credit-business). Marca condiciones de activación
17
+ * cumplidas. Solo se mandan las que cambian; en F3 las marcarán los flujos de firma de contrato
18
+ * (`downPayment` + `contractSigned`) y de enrolamiento MDM (`imeiEnrolled` + `lockVerified`).
19
+ */
20
+ class UpdateActivationChecklistRequest {
21
+ }
22
+ exports.UpdateActivationChecklistRequest = UpdateActivationChecklistRequest;
23
+ __decorate([
24
+ (0, class_transformer_1.Expose)(),
25
+ (0, class_validator_1.IsOptional)(),
26
+ (0, class_validator_1.IsBoolean)(),
27
+ __metadata("design:type", Boolean)
28
+ ], UpdateActivationChecklistRequest.prototype, "downPayment", void 0);
29
+ __decorate([
30
+ (0, class_transformer_1.Expose)(),
31
+ (0, class_validator_1.IsOptional)(),
32
+ (0, class_validator_1.IsBoolean)(),
33
+ __metadata("design:type", Boolean)
34
+ ], UpdateActivationChecklistRequest.prototype, "contractSigned", void 0);
35
+ __decorate([
36
+ (0, class_transformer_1.Expose)(),
37
+ (0, class_validator_1.IsOptional)(),
38
+ (0, class_validator_1.IsBoolean)(),
39
+ __metadata("design:type", Boolean)
40
+ ], UpdateActivationChecklistRequest.prototype, "imeiEnrolled", void 0);
41
+ __decorate([
42
+ (0, class_transformer_1.Expose)(),
43
+ (0, class_validator_1.IsOptional)(),
44
+ (0, class_validator_1.IsBoolean)(),
45
+ __metadata("design:type", Boolean)
46
+ ], UpdateActivationChecklistRequest.prototype, "lockVerified", void 0);
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Nivel del cliente según su SCI (M7/05_MOTOR §3.2): 21-60 Bronce · 61-80 Plata · 81-100 Oro.
3
+ * Distinto de `CreditPlanLevelEnum` de loanOfferings (que además tiene `ALL` para planes):
4
+ * un CLIENTE nunca es `ALL`.
5
+ * @enum {string}
6
+ */
7
+ export declare enum ClientLevelEnum {
8
+ BRONZE = "BRONZE",
9
+ SILVER = "SILVER",
10
+ GOLD = "GOLD"
11
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ClientLevelEnum = void 0;
4
+ /**
5
+ * Nivel del cliente según su SCI (M7/05_MOTOR §3.2): 21-60 Bronce · 61-80 Plata · 81-100 Oro.
6
+ * Distinto de `CreditPlanLevelEnum` de loanOfferings (que además tiene `ALL` para planes):
7
+ * un CLIENTE nunca es `ALL`.
8
+ * @enum {string}
9
+ */
10
+ var ClientLevelEnum;
11
+ (function (ClientLevelEnum) {
12
+ ClientLevelEnum["BRONZE"] = "BRONZE";
13
+ ClientLevelEnum["SILVER"] = "SILVER";
14
+ ClientLevelEnum["GOLD"] = "GOLD";
15
+ })(ClientLevelEnum || (exports.ClientLevelEnum = ClientLevelEnum = {}));
@@ -0,0 +1,6 @@
1
+ export declare class CancelFundingReferenceRequest {
2
+ /** Referencia Passport (PK de EqualityFundingReference_GT). */
3
+ reference: string;
4
+ directoryId: string;
5
+ idempotencyKey: string;
6
+ }
@@ -9,28 +9,23 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.ResendSelfRegisterOtpRequest = void 0;
13
- const class_transformer_1 = require("class-transformer");
12
+ exports.CancelFundingReferenceRequest = void 0;
14
13
  const class_validator_1 = require("class-validator");
15
- /**
16
- * Body del POST /self-register/resend-otp (público, anónimo). DEC-RBAC-054.
17
- * Re-envía el OTP del autoregistro (mecanismo messages-business, NO Cognito) tras validar un
18
- * `pending` existente. Misma postura anti-enumeración del start. El email se normaliza lowercase
19
- * server-side. DTO propio por endpoint (NO reusa SelfRegisterStartRequest, que exige roleId/scope/
20
- * scopeRef, ni SelfRegisterVerifyOtpRequest, que exige otp).
21
- */
22
- class ResendSelfRegisterOtpRequest {
14
+ class CancelFundingReferenceRequest {
23
15
  }
24
- exports.ResendSelfRegisterOtpRequest = ResendSelfRegisterOtpRequest;
16
+ exports.CancelFundingReferenceRequest = CancelFundingReferenceRequest;
25
17
  __decorate([
26
- (0, class_transformer_1.Expose)(),
27
18
  (0, class_validator_1.IsString)(),
28
- (0, class_validator_1.IsNotEmpty)(),
19
+ (0, class_validator_1.MaxLength)(64),
29
20
  __metadata("design:type", String)
30
- ], ResendSelfRegisterOtpRequest.prototype, "tenantId", void 0);
21
+ ], CancelFundingReferenceRequest.prototype, "reference", void 0);
31
22
  __decorate([
32
- (0, class_transformer_1.Expose)(),
33
- (0, class_validator_1.IsEmail)(),
34
- (0, class_validator_1.IsNotEmpty)(),
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.MaxLength)(64),
25
+ __metadata("design:type", String)
26
+ ], CancelFundingReferenceRequest.prototype, "directoryId", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsString)(),
29
+ (0, class_validator_1.MaxLength)(64),
35
30
  __metadata("design:type", String)
36
- ], ResendSelfRegisterOtpRequest.prototype, "email", void 0);
31
+ ], CancelFundingReferenceRequest.prototype, "idempotencyKey", void 0);
@@ -0,0 +1,7 @@
1
+ import { BenefitPaymentStatusEnum } from "../../benefitCenter/enums/BenefitPaymentStatusEnum";
2
+ import { WalletFundingErrorCodeEnum } from "../enums/WalletFundingErrorCodeEnum";
3
+ export declare class CancelFundingReferenceResponse {
4
+ reference: string;
5
+ status: BenefitPaymentStatusEnum;
6
+ errorCode?: WalletFundingErrorCodeEnum;
7
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CancelFundingReferenceResponse = void 0;
4
+ class CancelFundingReferenceResponse {
5
+ }
6
+ exports.CancelFundingReferenceResponse = CancelFundingReferenceResponse;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Request del cancel via Centro de Beneficios (spec 13 v2.0).
3
+ * `reference` viaja en el path, `directoryId` se resuelve del JWT.
4
+ * `providerModuleName` permite al marketplace rutear al publisher correcto
5
+ * sin tener que persistir el mapping (el wallet-app sabe el moduleName
6
+ * porque vino en la respuesta del authorize).
7
+ */
8
+ export declare class CancelFundingRequest {
9
+ idempotencyKey: string;
10
+ providerModuleName: string;
11
+ }
@@ -9,28 +9,25 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.ResendOtpRequest = void 0;
13
- const class_transformer_1 = require("class-transformer");
12
+ exports.CancelFundingRequest = void 0;
14
13
  const class_validator_1 = require("class-validator");
15
14
  /**
16
- * Body del POST /auth/resend-otp (público, anónimo). DEC-RBAC-054.
17
- * Reenvía el OTP del login re-disparando el challenge real CUSTOM_AUTH (EMAIL_OTP) para la
18
- * identidad SIN password. `tenantId` obligatorio (DEC-064 el picker ya lo resolvió, NO "solo email").
19
- * El email se normaliza lowercase server-side. Postura anti-enumeración: respuesta 200 genérica
20
- * siempre, sin filtrar existencia (ver AuthLoginManager.resendChallengeOtp).
15
+ * Request del cancel via Centro de Beneficios (spec 13 v2.0).
16
+ * `reference` viaja en el path, `directoryId` se resuelve del JWT.
17
+ * `providerModuleName` permite al marketplace rutear al publisher correcto
18
+ * sin tener que persistir el mapping (el wallet-app sabe el moduleName
19
+ * porque vino en la respuesta del authorize).
21
20
  */
22
- class ResendOtpRequest {
21
+ class CancelFundingRequest {
23
22
  }
24
- exports.ResendOtpRequest = ResendOtpRequest;
23
+ exports.CancelFundingRequest = CancelFundingRequest;
25
24
  __decorate([
26
- (0, class_transformer_1.Expose)(),
27
- (0, class_validator_1.IsEmail)(),
28
- (0, class_validator_1.IsNotEmpty)(),
25
+ (0, class_validator_1.IsString)(),
26
+ (0, class_validator_1.MaxLength)(64),
29
27
  __metadata("design:type", String)
30
- ], ResendOtpRequest.prototype, "email", void 0);
28
+ ], CancelFundingRequest.prototype, "idempotencyKey", void 0);
31
29
  __decorate([
32
- (0, class_transformer_1.Expose)(),
33
30
  (0, class_validator_1.IsString)(),
34
- (0, class_validator_1.IsNotEmpty)(),
31
+ (0, class_validator_1.MaxLength)(128),
35
32
  __metadata("design:type", String)
36
- ], ResendOtpRequest.prototype, "tenantId", void 0);
33
+ ], CancelFundingRequest.prototype, "providerModuleName", void 0);
@@ -0,0 +1,14 @@
1
+ import { BenefitPaymentStatusEnum } from "../../benefitCenter/enums/BenefitPaymentStatusEnum";
2
+ import { WalletFundingErrorCodeEnum } from "../enums/WalletFundingErrorCodeEnum";
3
+ /**
4
+ * Response del cancel via Centro de Beneficios (spec 13 v2.0).
5
+ * `status` reusa `BenefitPaymentStatusEnum` (APPROVED = cancel aceptado;
6
+ * REJECTED = no se pudo) para consistencia con `CancelFundingReferenceResponse`
7
+ * (marketplace ↔ connector). Idempotente: re-cancelar devuelve APPROVED.
8
+ */
9
+ export declare class CancelFundingResponse {
10
+ reference: string;
11
+ status: BenefitPaymentStatusEnum;
12
+ errorCode?: WalletFundingErrorCodeEnum;
13
+ message?: string;
14
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CancelFundingResponse = void 0;
4
+ /**
5
+ * Response del cancel via Centro de Beneficios (spec 13 v2.0).
6
+ * `status` reusa `BenefitPaymentStatusEnum` (APPROVED = cancel aceptado;
7
+ * REJECTED = no se pudo) para consistencia con `CancelFundingReferenceResponse`
8
+ * (marketplace ↔ connector). Idempotente: re-cancelar devuelve APPROVED.
9
+ */
10
+ class CancelFundingResponse {
11
+ }
12
+ exports.CancelFundingResponse = CancelFundingResponse;
@@ -0,0 +1,3 @@
1
+ export declare class CancelWalletFundingRequest {
2
+ idempotencyKey: string;
3
+ }
@@ -0,0 +1,21 @@
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.CancelWalletFundingRequest = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class CancelWalletFundingRequest {
15
+ }
16
+ exports.CancelWalletFundingRequest = CancelWalletFundingRequest;
17
+ __decorate([
18
+ (0, class_validator_1.IsString)(),
19
+ (0, class_validator_1.MaxLength)(64),
20
+ __metadata("design:type", String)
21
+ ], CancelWalletFundingRequest.prototype, "idempotencyKey", void 0);
@@ -0,0 +1,7 @@
1
+ import { BenefitPaymentStatusEnum } from "../../benefitCenter/enums/BenefitPaymentStatusEnum";
2
+ import { WalletFundingErrorCodeEnum } from "../enums/WalletFundingErrorCodeEnum";
3
+ export declare class CancelWalletFundingResponse {
4
+ status: BenefitPaymentStatusEnum;
5
+ errorCode?: WalletFundingErrorCodeEnum;
6
+ reference?: string;
7
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CancelWalletFundingResponse = void 0;
4
+ class CancelWalletFundingResponse {
5
+ }
6
+ exports.CancelWalletFundingResponse = CancelWalletFundingResponse;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/type-kit",
3
- "version": "3.277.0",
3
+ "version": "3.279.0",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -0,0 +1,17 @@
1
+ import { IsString, IsInt, IsEnum, IsOptional } from 'class-validator';
2
+ import { MechanismType } from '../enums/MechanismType';
3
+ import { CollectionResultStatus } from '../enums/CollectionResultStatus';
4
+
5
+ /** Un intento de cobro ejecutado sobre un intent, para el backoffice de monitoreo. */
6
+ export class CollectionAttemptDto {
7
+ @IsString() attemptId!: string;
8
+ @IsString() intentId!: string;
9
+ @IsString() source!: string;
10
+ @IsEnum(MechanismType) mechanism!: MechanismType;
11
+ @IsInt() amount!: number;
12
+ @IsOptional() @IsString() holdTxId?: string;
13
+ @IsOptional() @IsEnum(CollectionResultStatus) result?: CollectionResultStatus;
14
+ @IsOptional() @IsString() errorCode?: string;
15
+ @IsOptional() @IsString() errorDetail?: string;
16
+ @IsInt() createdAt!: number; // epoch ms
17
+ }
@@ -0,0 +1,14 @@
1
+ import { IsString, IsInt, IsEnum, IsOptional } from 'class-validator';
2
+ import { SagaStep } from '../enums/SagaStep';
3
+
4
+ /** Entrada del log estructurado de errores del motor de cobro, para el backoffice de monitoreo. */
5
+ export class CollectionErrorLogDto {
6
+ @IsString() errorId!: string;
7
+ @IsOptional() @IsString() intentId?: string;
8
+ @IsOptional() @IsString() attemptId?: string;
9
+ @IsOptional() @IsEnum(SagaStep) sagaStep?: SagaStep;
10
+ @IsString() errorCode!: string;
11
+ @IsOptional() @IsString() errorDetail?: string;
12
+ @IsString() tenantId!: string;
13
+ @IsInt() createdAt!: number; // epoch ms
14
+ }
@@ -0,0 +1,13 @@
1
+ import { IsArray, ValidateNested } from 'class-validator';
2
+ import { Type } from 'class-transformer';
3
+ import { CollectionIntentSummaryDto } from './CollectionIntentSummaryDto';
4
+ import { CollectionAttemptDto } from './CollectionAttemptDto';
5
+ import { CollectionOutboxEventDto } from './CollectionOutboxEventDto';
6
+ import { CollectionErrorLogDto } from './CollectionErrorLogDto';
7
+
8
+ /** Detalle de un intent para el backoffice de monitoreo: el resumen más su historial completo. */
9
+ export class CollectionIntentDetailDto extends CollectionIntentSummaryDto {
10
+ @IsArray() @ValidateNested({ each: true }) @Type(() => CollectionAttemptDto) attempts!: CollectionAttemptDto[];
11
+ @IsArray() @ValidateNested({ each: true }) @Type(() => CollectionOutboxEventDto) outbox!: CollectionOutboxEventDto[];
12
+ @IsArray() @ValidateNested({ each: true }) @Type(() => CollectionErrorLogDto) errors!: CollectionErrorLogDto[];
13
+ }
@@ -0,0 +1,24 @@
1
+ import { IsString, IsInt, IsBoolean, IsEnum, IsOptional } from 'class-validator';
2
+ import { CollectionState } from '../enums/CollectionState';
3
+ import { SagaStep } from '../enums/SagaStep';
4
+
5
+ /** Fila de listado de intents para el backoffice de monitoreo del motor de cobro. */
6
+ export class CollectionIntentSummaryDto {
7
+ @IsString() intentId!: string;
8
+ @IsString() ownerRef!: string;
9
+ @IsString() tenantId!: string;
10
+ @IsString() domain!: string;
11
+ @IsString() chargeId!: string;
12
+ @IsInt() amount!: number;
13
+ @IsOptional() @IsInt() reserved?: number;
14
+ @IsEnum(CollectionState) state!: CollectionState;
15
+ @IsEnum(SagaStep) sagaStep!: SagaStep;
16
+ @IsOptional() @IsBoolean() attention?: boolean;
17
+ @IsOptional() @IsInt() failureCount?: number;
18
+ @IsOptional() @IsInt() retryCount?: number;
19
+ @IsOptional() @IsInt() nextRetryAt?: number; // epoch ms
20
+ @IsOptional() @IsString() lastErrorCode?: string;
21
+ @IsOptional() @IsString() lastErrorMsg?: string;
22
+ @IsInt() createdAt!: number; // epoch ms
23
+ @IsInt() updatedAt!: number; // epoch ms
24
+ }
@@ -0,0 +1,11 @@
1
+ import { IsInt, IsNumber, IsObject } from 'class-validator';
2
+
3
+ /** Métricas agregadas del motor de cobro, para el dashboard del backoffice de monitoreo. */
4
+ export class CollectionMetricsDto {
5
+ @IsObject() countsByState!: Record<string, number>;
6
+ @IsNumber() successRate!: number;
7
+ @IsInt() amountReserved!: number;
8
+ @IsInt() amountCollected!: number;
9
+ @IsInt() backlogAwaitingFunds!: number;
10
+ @IsInt() dlqCount!: number;
11
+ }
@@ -0,0 +1,17 @@
1
+ import { IsString, IsInt, IsOptional } from 'class-validator';
2
+
3
+ /**
4
+ * Mensaje del outbox transaccional (publicación de `CollectionResult` hacia el dominio), para el
5
+ * backoffice de monitoreo. `status` viaja como texto (p.ej. `PENDING`, `SENT`, `FAILED`, `DLQ`) — su
6
+ * enum de origen es interno a la mecánica de entrega del motor.
7
+ */
8
+ export class CollectionOutboxEventDto {
9
+ @IsString() eventId!: string;
10
+ @IsString() attemptId!: string;
11
+ @IsString() domain!: string;
12
+ @IsString() status!: string;
13
+ @IsOptional() @IsInt() deliveryAttempts?: number;
14
+ @IsOptional() @IsString() lastError?: string;
15
+ @IsOptional() @IsInt() movedToDlqAt?: number; // epoch ms
16
+ @IsInt() createdAt!: number; // epoch ms
17
+ }
@@ -17,3 +17,11 @@ export * from './dtos/CollectionSourceDto';
17
17
  export * from './dtos/CollectionProductConfigDto';
18
18
  export * from './dtos/UpsertProductConfigRequest';
19
19
  export * from './dtos/ApplyCollectionResultRequest';
20
+
21
+ // DTOs — backoffice de monitoreo
22
+ export * from './dtos/CollectionIntentSummaryDto';
23
+ export * from './dtos/CollectionAttemptDto';
24
+ export * from './dtos/CollectionOutboxEventDto';
25
+ export * from './dtos/CollectionErrorLogDto';
26
+ export * from './dtos/CollectionIntentDetailDto';
27
+ export * from './dtos/CollectionMetricsDto';
@@ -1,11 +0,0 @@
1
- /**
2
- * Rol RBAC mínimo que puede modificar un parámetro (RBAC a nivel de parámetro, modelo-datos §8).
3
- * `retailer_admin` = "Admin VentasLuga" de M6 §8. Valores = identificadores de rol de RBAC F0.
4
- * TD-004: confirmar mapeo super_admin ↔ platform_super_admin con el naming real de F0.
5
- * @enum {string}
6
- */
7
- export declare enum ModifiableByRoleEnum {
8
- SUPER_ADMIN = "super_admin",
9
- SOFOM_ADMIN = "sofom_admin",
10
- RETAILER_ADMIN = "retailer_admin"
11
- }
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ModifiableByRoleEnum = void 0;
4
- /**
5
- * Rol RBAC mínimo que puede modificar un parámetro (RBAC a nivel de parámetro, modelo-datos §8).
6
- * `retailer_admin` = "Admin VentasLuga" de M6 §8. Valores = identificadores de rol de RBAC F0.
7
- * TD-004: confirmar mapeo super_admin ↔ platform_super_admin con el naming real de F0.
8
- * @enum {string}
9
- */
10
- var ModifiableByRoleEnum;
11
- (function (ModifiableByRoleEnum) {
12
- ModifiableByRoleEnum["SUPER_ADMIN"] = "super_admin";
13
- ModifiableByRoleEnum["SOFOM_ADMIN"] = "sofom_admin";
14
- ModifiableByRoleEnum["RETAILER_ADMIN"] = "retailer_admin";
15
- })(ModifiableByRoleEnum || (exports.ModifiableByRoleEnum = ModifiableByRoleEnum = {}));
@@ -1,17 +0,0 @@
1
- import { CurrencyId } from '../../currency/enums/CurrencyId';
2
- /**
3
- * Comisión que cobra un punto de cash-in (lo que el lambda MUESTRA, no cobra).
4
- * - GreenDot (US): representativo por cadena → `fixed` + `cap` (cada tienda cobra hasta el tope).
5
- * - Passport (MX): por red → `fixed` + `percentage`.
6
- * Response DTO — sin decoradores de validación.
7
- */
8
- export declare class CashInFeeDto {
9
- /** Comisión fija, en la moneda del país. */
10
- fixed?: number;
11
- /** Porcentaje del monto depositado (0–100). */
12
- percentage?: number;
13
- /** Tope máximo de comisión (GreenDot: el asociado cobra hasta este cap). */
14
- cap?: number;
15
- /** Moneda del fee: USD (GreenDot) | MXN (Passport). */
16
- currency: CurrencyId;
17
- }
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CashInFeeDto = void 0;
4
- /**
5
- * Comisión que cobra un punto de cash-in (lo que el lambda MUESTRA, no cobra).
6
- * - GreenDot (US): representativo por cadena → `fixed` + `cap` (cada tienda cobra hasta el tope).
7
- * - Passport (MX): por red → `fixed` + `percentage`.
8
- * Response DTO — sin decoradores de validación.
9
- */
10
- class CashInFeeDto {
11
- }
12
- exports.CashInFeeDto = CashInFeeDto;
@@ -1,22 +0,0 @@
1
- import { MfaMethodEnum } from '../enums/MfaMethodEnum';
2
- /**
3
- * Body del POST /auth/resend-otp (público, anónimo). DEC-RBAC-054.
4
- * Reenvía el OTP del login re-disparando el challenge real CUSTOM_AUTH (EMAIL_OTP) para la
5
- * identidad SIN password. `tenantId` obligatorio (DEC-064 — el picker ya lo resolvió, NO "solo email").
6
- * El email se normaliza lowercase server-side. Postura anti-enumeración: respuesta 200 genérica
7
- * siempre, sin filtrar existencia (ver AuthLoginManager.resendChallengeOtp).
8
- */
9
- export declare class ResendOtpRequest {
10
- email: string;
11
- tenantId: string;
12
- }
13
- /**
14
- * Respuesta del resend-otp. `session`/`mfaMethod` frescos del nuevo challenge CUSTOM_AUTH.
15
- * Plain sin validators (no validamos lo que mandamos al cliente — fiado-validation-and-dtos § 7).
16
- * Ambos opcionales: en los caminos de rechazo silencioso (anti-enumeración) o ramas sin CUSTOM_AUTH
17
- * el server responde 200 genérico sin session ni método.
18
- */
19
- export interface ResendOtpResponse {
20
- session?: string;
21
- mfaMethod?: MfaMethodEnum;
22
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * Body del POST /self-register/resend-otp (público, anónimo). DEC-RBAC-054.
3
- * Re-envía el OTP del autoregistro (mecanismo messages-business, NO Cognito) tras validar un
4
- * `pending` existente. Misma postura anti-enumeración del start. El email se normaliza lowercase
5
- * server-side. DTO propio por endpoint (NO reusa SelfRegisterStartRequest, que exige roleId/scope/
6
- * scopeRef, ni SelfRegisterVerifyOtpRequest, que exige otp).
7
- */
8
- export declare class ResendSelfRegisterOtpRequest {
9
- tenantId: string;
10
- email: string;
11
- }