@fiado/type-kit 3.140.0 → 3.142.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 (75) hide show
  1. package/_test_/unit/platformRbac/dtos/CreateTenantRequest.test.ts +6 -5
  2. package/_test_/unit/platformRbac/enums/__snapshots__/permissionBits.test.ts.snap +1 -73
  3. package/_test_/unit/platformRbac/tenantTypes.test.ts +5 -40
  4. package/bin/platformRbac/dtos/CreateTenantRequest.d.ts +5 -4
  5. package/bin/platformRbac/dtos/CreateTenantRequest.js +1 -2
  6. package/bin/platformRbac/dtos/ResendOtpRequest.d.ts +22 -0
  7. package/bin/{walletFunding/dtos/CancelFundingRequest.js → platformRbac/dtos/ResendOtpRequest.js} +16 -13
  8. package/bin/platformRbac/dtos/ResendSelfRegisterOtpRequest.d.ts +11 -0
  9. package/bin/{cognitoBackofficeConnector/dtos/MfaPoolConfig.js → platformRbac/dtos/ResendSelfRegisterOtpRequest.js} +18 -18
  10. package/bin/platformRbac/enums/Permission.d.ts +0 -77
  11. package/bin/platformRbac/enums/Permission.js +8 -186
  12. package/bin/platformRbac/enums/PermissionCategory.d.ts +0 -7
  13. package/bin/platformRbac/enums/PermissionCategory.js +4 -9
  14. package/bin/platformRbac/tenantTypes.d.ts +18 -13
  15. package/bin/platformRbac/tenantTypes.js +20 -30
  16. package/bin/remittance/dtos/RemittanceAuditLog.d.ts +42 -0
  17. package/bin/remittance/dtos/RemittanceAuditLog.js +62 -0
  18. package/bin/remittance/dtos/RemittanceCohort.d.ts +62 -0
  19. package/bin/remittance/dtos/RemittanceCohort.js +105 -0
  20. package/bin/remittance/dtos/index.d.ts +2 -0
  21. package/bin/remittance/dtos/index.js +2 -0
  22. package/bin/remittance/dtos/internal/RemittanceCohortCount.d.ts +16 -0
  23. package/bin/remittance/dtos/internal/RemittanceCohortCount.js +34 -0
  24. package/bin/remittance/enums/AuditAction.d.ts +12 -0
  25. package/bin/remittance/enums/AuditAction.js +16 -0
  26. package/bin/remittance/enums/AuditEntityType.d.ts +12 -0
  27. package/bin/remittance/enums/AuditEntityType.js +16 -0
  28. package/bin/remittance/enums/CohortField.d.ts +23 -0
  29. package/bin/remittance/enums/CohortField.js +27 -0
  30. package/bin/remittance/enums/CohortOperator.d.ts +11 -0
  31. package/bin/remittance/enums/CohortOperator.js +15 -0
  32. package/bin/remittance/enums/CohortRefresh.d.ts +9 -0
  33. package/bin/remittance/enums/CohortRefresh.js +13 -0
  34. package/bin/remittance/enums/index.d.ts +5 -0
  35. package/bin/remittance/enums/index.js +5 -0
  36. package/bin/remittance/index.d.ts +1 -0
  37. package/bin/remittance/index.js +1 -0
  38. package/package.json +1 -1
  39. package/src/platformRbac/dtos/CreateTenantRequest.ts +5 -4
  40. package/src/platformRbac/enums/Permission.ts +8 -191
  41. package/src/platformRbac/enums/PermissionCategory.ts +4 -9
  42. package/src/platformRbac/tenantTypes.ts +21 -32
  43. package/src/remittance/dtos/RemittanceAuditLog.ts +60 -0
  44. package/src/remittance/dtos/RemittanceCohort.ts +112 -0
  45. package/src/remittance/dtos/index.ts +2 -0
  46. package/src/remittance/dtos/internal/RemittanceCohortCount.ts +24 -0
  47. package/src/remittance/enums/AuditAction.ts +12 -0
  48. package/src/remittance/enums/AuditEntityType.ts +12 -0
  49. package/src/remittance/enums/CohortField.ts +23 -0
  50. package/src/remittance/enums/CohortOperator.ts +11 -0
  51. package/src/remittance/enums/CohortRefresh.ts +9 -0
  52. package/src/remittance/enums/index.ts +5 -0
  53. package/src/remittance/index.ts +1 -0
  54. package/bin/cognitoBackofficeConnector/dtos/MfaPoolConfig.d.ts +0 -7
  55. package/bin/cognitoBackofficeConnector/dtos/PoolConfigResponse.d.ts +0 -20
  56. package/bin/cognitoBackofficeConnector/dtos/PoolConfigResponse.js +0 -11
  57. package/bin/cognitoBackofficeConnector/dtos/PoolsListResponse.d.ts +0 -4
  58. package/bin/cognitoBackofficeConnector/dtos/PoolsListResponse.js +0 -6
  59. package/bin/cognitoBackofficeConnector/validators/MfaTypesRequiresOne.d.ts +0 -17
  60. package/bin/cognitoBackofficeConnector/validators/MfaTypesRequiresOne.js +0 -39
  61. package/bin/rbac/enums/PoolKind.d.ts +0 -16
  62. package/bin/rbac/enums/PoolKind.js +0 -20
  63. package/bin/rbac/index.d.ts +0 -1
  64. package/bin/rbac/index.js +0 -17
  65. package/bin/walletFunding/dtos/CancelFundingReferenceRequest.d.ts +0 -5
  66. package/bin/walletFunding/dtos/CancelFundingReferenceRequest.js +0 -31
  67. package/bin/walletFunding/dtos/CancelFundingReferenceResponse.d.ts +0 -7
  68. package/bin/walletFunding/dtos/CancelFundingReferenceResponse.js +0 -6
  69. package/bin/walletFunding/dtos/CancelFundingRequest.d.ts +0 -11
  70. package/bin/walletFunding/dtos/CancelFundingResponse.d.ts +0 -14
  71. package/bin/walletFunding/dtos/CancelFundingResponse.js +0 -12
  72. package/bin/walletFunding/dtos/CancelWalletFundingRequest.d.ts +0 -3
  73. package/bin/walletFunding/dtos/CancelWalletFundingRequest.js +0 -21
  74. package/bin/walletFunding/dtos/CancelWalletFundingResponse.d.ts +0 -7
  75. package/bin/walletFunding/dtos/CancelWalletFundingResponse.js +0 -6
@@ -0,0 +1,60 @@
1
+ import { IsEnum, IsObject, IsOptional, IsString, MaxLength } from "class-validator";
2
+ import { AuditAction } from "../enums/AuditAction";
3
+ import { AuditEntityType } from "../enums/AuditEntityType";
4
+
5
+ /**
6
+ * DTOs del audit trail del backoffice de remesas (RemittanceAuditLog_GT, dueño:
7
+ * remittance-business). Append-only: registra "quién cambió qué, cuándo" en cada
8
+ * mutación (Configuración, Variables Operativas y, a futuro, suspend/reactivate
9
+ * desde el connector vía api-invoker — por eso el request vive en type-kit).
10
+ *
11
+ * MVP persiste `summary` + `after` (snapshot nuevo); `before` se agrega después
12
+ * si la UI quiere diff visual.
13
+ */
14
+
15
+ /** Request de append (helper `recordAudit` en rb; futuro cross-lambda). */
16
+ export class AuditAppendRequest {
17
+ @IsEnum(AuditEntityType)
18
+ entityType!: AuditEntityType;
19
+
20
+ /** Id de la entidad afectada (cohortId, segmentId, directoryId…). */
21
+ @IsString()
22
+ entityId!: string;
23
+
24
+ @IsEnum(AuditAction)
25
+ action!: AuditAction;
26
+
27
+ /** Email del operador (claim del JWT) o "sistema" para jobs. */
28
+ @IsString()
29
+ actor!: string;
30
+
31
+ /** Descripción legible ("Editó condiciones del cohort 'Activo'"). */
32
+ @IsString()
33
+ @MaxLength(500)
34
+ summary!: string;
35
+
36
+ /** Snapshot del estado nuevo de la entidad (opcional). */
37
+ @IsOptional()
38
+ @IsObject()
39
+ after?: Record<string, unknown>;
40
+ }
41
+
42
+ /** Entrada del audit trail (response). */
43
+ export class AuditLogEntry {
44
+ entityType!: AuditEntityType;
45
+ /** SK: ISO-8601 + `#<uuid>` (orden cronológico + unicidad dentro del entityType). */
46
+ at!: string;
47
+ actor!: string;
48
+ entityId!: string;
49
+ action!: AuditAction;
50
+ summary!: string;
51
+ after!: Record<string, unknown> | null;
52
+ createdAt!: string;
53
+ }
54
+
55
+ /** Response de GET /backoffice/audit (paginación estándar index/pageSize). */
56
+ export class AuditListResponse {
57
+ items!: AuditLogEntry[];
58
+ /** Cursor opaco (base64) para la próxima página; null/ausente = última. */
59
+ index?: string | null;
60
+ }
@@ -0,0 +1,112 @@
1
+ import { Type } from "class-transformer";
2
+ import {
3
+ ArrayMinSize,
4
+ IsArray,
5
+ IsEnum,
6
+ IsNumber,
7
+ IsOptional,
8
+ IsString,
9
+ Length,
10
+ MaxLength,
11
+ ValidateNested,
12
+ } from "class-validator";
13
+ import { CohortField } from "../enums/CohortField";
14
+ import { CohortOperator } from "../enums/CohortOperator";
15
+ import { CohortRefresh } from "../enums/CohortRefresh";
16
+
17
+ /**
18
+ * DTOs de Cohorts (Dashboard Ops · Configuración §3, EP-26..30).
19
+ *
20
+ * Un cohort es un grupo dinámico de clientes definido por condiciones en AND
21
+ * (rule builder del mockup) que se recalcula periódicamente. Dueño de la tabla:
22
+ * remittance-business (RemittanceCohorts_GT). Solo se persiste el count (D4.5),
23
+ * nunca la membership.
24
+ */
25
+
26
+ /** Condición del rule builder: `SI <field> <op> <value>`. Todas en AND. */
27
+ export class CohortCondition {
28
+ @IsEnum(CohortField)
29
+ field!: CohortField;
30
+
31
+ @IsEnum(CohortOperator)
32
+ op!: CohortOperator;
33
+
34
+ @IsNumber()
35
+ value!: number;
36
+ }
37
+
38
+ /** Body de EP-27 POST /backoffice/config/cohorts. */
39
+ export class CreateCohortRequest {
40
+ @IsString()
41
+ @Length(3, 100)
42
+ name!: string;
43
+
44
+ @IsOptional()
45
+ @IsString()
46
+ @MaxLength(500)
47
+ description?: string;
48
+
49
+ @IsArray()
50
+ @ArrayMinSize(1)
51
+ @ValidateNested({ each: true })
52
+ @Type(() => CohortCondition)
53
+ conditions!: CohortCondition[];
54
+
55
+ @IsEnum(CohortRefresh)
56
+ refresh!: CohortRefresh;
57
+ }
58
+
59
+ /** Body de EP-28 PUT /backoffice/config/cohorts/{id} (reemplazo completo, patrón Save del mockup). */
60
+ export class UpdateCohortRequest {
61
+ @IsString()
62
+ @Length(3, 100)
63
+ name!: string;
64
+
65
+ @IsOptional()
66
+ @IsString()
67
+ @MaxLength(500)
68
+ description?: string;
69
+
70
+ @IsArray()
71
+ @ArrayMinSize(1)
72
+ @ValidateNested({ each: true })
73
+ @Type(() => CohortCondition)
74
+ conditions!: CohortCondition[];
75
+
76
+ @IsEnum(CohortRefresh)
77
+ refresh!: CohortRefresh;
78
+ }
79
+
80
+ /** Cohort completo (response). `memberCount`/`pctTotal` son null si nunca se calculó. */
81
+ export class Cohort {
82
+ id!: string;
83
+ name!: string;
84
+ description!: string | null;
85
+ conditions!: CohortCondition[];
86
+ refresh!: CohortRefresh;
87
+ /** Clientes actualmente en el cohort (snapshot del último recálculo). */
88
+ memberCount!: number | null;
89
+ /** % del total de RemittanceUsers (denominador = todos, no solo ACTIVE). 0-100. */
90
+ pctTotal!: number | null;
91
+ lastCalculatedAt!: string | null;
92
+ /** ISO — próxima corrida que el cron horario debe honrar (derivado de `refresh`). */
93
+ nextCalculationAt!: string;
94
+ createdAt!: string;
95
+ updatedAt!: string;
96
+ createdBy!: string;
97
+ updatedBy!: string;
98
+ }
99
+
100
+ /** Response de EP-26 GET /backoffice/config/cohorts (tabla chica, sin paginación). */
101
+ export class CohortListResponse {
102
+ items!: Cohort[];
103
+ }
104
+
105
+ /** Response de EP-30 POST /backoffice/config/cohorts/{id}/recalcular. */
106
+ export class RecalculateCohortResponse {
107
+ id!: string;
108
+ memberCount!: number;
109
+ pctTotal!: number;
110
+ lastCalculatedAt!: string;
111
+ nextCalculationAt!: string;
112
+ }
@@ -36,3 +36,5 @@ export * from "./RemittanceBackofficeTxListResponse";
36
36
  export * from "./RemittanceBackofficeStats";
37
37
  export * from "./RemittanceUserLimits";
38
38
  export * from "./RemittanceKyc";
39
+ export * from "./RemittanceCohort";
40
+ export * from "./RemittanceAuditLog";
@@ -0,0 +1,24 @@
1
+ import { Type } from "class-transformer";
2
+ import { ArrayMinSize, IsArray, ValidateNested } from "class-validator";
3
+ import { CohortCondition } from "../RemittanceCohort";
4
+
5
+ /**
6
+ * Contrato interno del puente de recálculo de Cohorts (Opción A):
7
+ * remittance-business pide al uniteller-connector (dueño de RemittanceUsers_GT /
8
+ * RemittanceTransactions_GT) cuántos usuarios cumplen las condiciones, vía
9
+ * api-invoker → POST /backoffice/config/cohorts/count (privado).
10
+ */
11
+ export class CohortCountRequest {
12
+ @IsArray()
13
+ @ArrayMinSize(1)
14
+ @ValidateNested({ each: true })
15
+ @Type(() => CohortCondition)
16
+ conditions!: CohortCondition[];
17
+ }
18
+
19
+ export class CohortCountResponse {
20
+ /** Usuarios que cumplen TODAS las condiciones (AND). */
21
+ count!: number;
22
+ /** Universo total de RemittanceUsers (denominador del % — todos, no solo ACTIVE). */
23
+ total!: number;
24
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Acción registrada en el audit trail del backoffice de remesas (RemittanceAuditLog_GT).
3
+ * SUSPEND/REACTIVATE quedan listos para el flujo futuro de Operación (EP-02/03).
4
+ */
5
+ export enum AuditAction {
6
+ CREATE = "CREATE",
7
+ UPDATE = "UPDATE",
8
+ DELETE = "DELETE",
9
+ RECALCULATE = "RECALCULATE",
10
+ SUSPEND = "SUSPEND",
11
+ REACTIVATE = "REACTIVATE",
12
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Módulo/dominio afectado por una entrada del audit trail (PK de RemittanceAuditLog_GT).
3
+ */
4
+ export enum AuditEntityType {
5
+ COHORT = "COHORT",
6
+ COMMITTEE = "COMMITTEE",
7
+ SEGMENT = "SEGMENT",
8
+ PRICING = "PRICING",
9
+ PROMOTION = "PROMOTION",
10
+ RULE = "RULE",
11
+ USER = "USER",
12
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Campos conductuales del rule builder de Cohorts (Dashboard Ops · Configuración §3).
3
+ * Los valores son los del mockup (snake_case) para que el front no traduzca.
4
+ *
5
+ * MVP soporta 6 campos; TX_POST_REACTIVACION está DIFERIDO (el backend lo rechaza
6
+ * hasta que exista el contador denormalizado `txSinceReactivation` en el connector).
7
+ */
8
+ export enum CohortField {
9
+ /** # de tx totales (RemittanceUsers_GT.txCount). */
10
+ TX_TOTALES = "tx_totales",
11
+ /** Días desde el signup (now − (unirSignupDate ?? createdAt)). */
12
+ DIAS_DESDE_SIGNUP = "dias_desde_signup",
13
+ /** Días desde la última tx (now − lastTxAt). */
14
+ DIAS_DESDE_ULTIMA_TX = "dias_desde_ultima_tx",
15
+ /** Días sin actividad — sinónimo de DIAS_DESDE_ULTIMA_TX. */
16
+ DIAS_SIN_TX = "dias_sin_tx",
17
+ /** Monto total histórico en USD (RemittanceUsers_GT.totalSentUSD). */
18
+ MONTO_TOTAL_HISTORICO = "monto_total_historico",
19
+ /** Tx en los últimos 30 días (query nivel-tx por usuario). */
20
+ TX_ULTIMOS_30_DIAS = "tx_ultimos_30_dias",
21
+ /** # de tx tras reactivación — DIFERIDO (no-MVP, el backend lo rechaza). */
22
+ TX_POST_REACTIVACION = "tx_post_reactivacion",
23
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Operadores de comparación del rule builder de Cohorts. Los valores son los
3
+ * símbolos que renderiza el mockup; todas las condiciones se evalúan en AND.
4
+ */
5
+ export enum CohortOperator {
6
+ LT = "<",
7
+ LTE = "<=",
8
+ EQ = "==",
9
+ GTE = ">=",
10
+ GT = ">",
11
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Frecuencia de recálculo de un cohort. Un solo cron horario en remittance-business
3
+ * honra las 3 frecuencias respetando `nextCalculationAt` (+1h / +1d / +7d).
4
+ */
5
+ export enum CohortRefresh {
6
+ HORARIO = "horario",
7
+ DIARIO = "diario",
8
+ SEMANAL = "semanal",
9
+ }
@@ -5,3 +5,8 @@ export * from "./RemittanceUserState";
5
5
  export * from "./RemittanceCancelledByEnum";
6
6
  export * from "./RemittanceCancelOutcomeEnum";
7
7
  export * from "./FeeAbsorbedByEnum";
8
+ export * from "./CohortField";
9
+ export * from "./CohortOperator";
10
+ export * from "./CohortRefresh";
11
+ export * from "./AuditAction";
12
+ export * from "./AuditEntityType";
@@ -4,3 +4,4 @@ export * from "./enums";
4
4
  export * from "./dtos";
5
5
  export * from "./dtos/internal/RemittanceCreditBackRequest";
6
6
  export * from "./dtos/internal/RemittanceCreditBackResponse";
7
+ export * from "./dtos/internal/RemittanceCohortCount";
@@ -1,7 +0,0 @@
1
- declare const ALLOWED_MFA_TYPES: readonly ["SOFTWARE_TOKEN_MFA"];
2
- export type AllowedMfaType = (typeof ALLOWED_MFA_TYPES)[number];
3
- export declare class MfaPoolConfig {
4
- requireMfa: boolean;
5
- mfaTypes: AllowedMfaType[];
6
- }
7
- export {};
@@ -1,20 +0,0 @@
1
- import { PoolKind } from '../../rbac/enums/PoolKind';
2
- /**
3
- * Shape del `PoolConfigRow` expuesto al caller (BFF M18 / otros lambdas Fiado).
4
- * Refleja la configuración de un Cognito User Pool registrado en la tabla
5
- * `PoolConfigs_GT` del lambda `cognito-backoffice-connector`.
6
- */
7
- export declare class PoolConfigResponse {
8
- userPoolId: string;
9
- userPoolArn: string;
10
- region: string;
11
- poolKind: PoolKind;
12
- displayName: string;
13
- appClients: Record<string, {
14
- clientId: string;
15
- clientName: string;
16
- }>;
17
- status: 'active' | 'deprecated';
18
- createdAt: number;
19
- updatedAt: number;
20
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PoolConfigResponse = void 0;
4
- /**
5
- * Shape del `PoolConfigRow` expuesto al caller (BFF M18 / otros lambdas Fiado).
6
- * Refleja la configuración de un Cognito User Pool registrado en la tabla
7
- * `PoolConfigs_GT` del lambda `cognito-backoffice-connector`.
8
- */
9
- class PoolConfigResponse {
10
- }
11
- exports.PoolConfigResponse = PoolConfigResponse;
@@ -1,4 +0,0 @@
1
- import { PoolConfigResponse } from './PoolConfigResponse';
2
- export declare class PoolsListResponse {
3
- pools: PoolConfigResponse[];
4
- }
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PoolsListResponse = void 0;
4
- class PoolsListResponse {
5
- }
6
- exports.PoolsListResponse = PoolsListResponse;
@@ -1,17 +0,0 @@
1
- import { ValidatorConstraintInterface, ValidationArguments } from 'class-validator';
2
- /**
3
- * Cross-field validator: si `requireMfa: true`, entonces `mfaTypes` debe tener
4
- * al menos 1 elemento. Si `requireMfa: false`, `mfaTypes` puede ser vacío.
5
- *
6
- * Razón: cuando el pool nace con MFA habilitado, el connector llama
7
- * `SetUserPoolMfaConfigCommand` con la lista de tipos del DTO. Si el array
8
- * llega vacío con `requireMfa: true`, el SDK rechaza con InvalidParameterException
9
- * y el pool queda en estado inconsistente (MfaConfiguration:'ON' sin tipos).
10
- * Mejor rechazar en validación del DTO antes de tocar AWS.
11
- *
12
- * Ver pivote v1.4.1 TD-017 cerrado + spec doc §1 R3.
13
- */
14
- export declare class MfaTypesRequiresOne implements ValidatorConstraintInterface {
15
- validate(mfaTypes: unknown, args: ValidationArguments): boolean;
16
- defaultMessage(): string;
17
- }
@@ -1,39 +0,0 @@
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
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.MfaTypesRequiresOne = void 0;
10
- const class_validator_1 = require("class-validator");
11
- /**
12
- * Cross-field validator: si `requireMfa: true`, entonces `mfaTypes` debe tener
13
- * al menos 1 elemento. Si `requireMfa: false`, `mfaTypes` puede ser vacío.
14
- *
15
- * Razón: cuando el pool nace con MFA habilitado, el connector llama
16
- * `SetUserPoolMfaConfigCommand` con la lista de tipos del DTO. Si el array
17
- * llega vacío con `requireMfa: true`, el SDK rechaza con InvalidParameterException
18
- * y el pool queda en estado inconsistente (MfaConfiguration:'ON' sin tipos).
19
- * Mejor rechazar en validación del DTO antes de tocar AWS.
20
- *
21
- * Ver pivote v1.4.1 TD-017 cerrado + spec doc §1 R3.
22
- */
23
- let MfaTypesRequiresOne = class MfaTypesRequiresOne {
24
- validate(mfaTypes, args) {
25
- const obj = args.object;
26
- if (obj.requireMfa === true) {
27
- return Array.isArray(mfaTypes) && mfaTypes.length >= 1;
28
- }
29
- // requireMfa: false → cualquier mfaTypes pasa.
30
- return true;
31
- }
32
- defaultMessage() {
33
- return 'mfaTypes requiere al menos un tipo cuando requireMfa=true';
34
- }
35
- };
36
- exports.MfaTypesRequiresOne = MfaTypesRequiresOne;
37
- exports.MfaTypesRequiresOne = MfaTypesRequiresOne = __decorate([
38
- (0, class_validator_1.ValidatorConstraint)({ name: 'MfaTypesRequiresOneWhenMfaRequired', async: false })
39
- ], MfaTypesRequiresOne);
@@ -1,16 +0,0 @@
1
- /**
2
- * Tipo de User Pool de Cognito desde la perspectiva del modelo RBAC Fiado.
3
- *
4
- * Origen: spec del proyecto `cognito-backoffice-connector` (Fase 0, componente 01
5
- * documento `docs/superpowers/specs/2026-05-26-cognito-connector-decisiones-pendientes-design.md`).
6
- *
7
- * Decisión (TD-003): el proyecto converge en estos 2 valores. El documento componente 03
8
- * lista 3 valores (incluyendo una variante adicional) pero queda como outlier — la
9
- * decisión vigente en los 6 docs restantes y en el plan de implementación es 2 valores:
10
- * - BACKOFFICE_PLATFORM — pool del backoffice de plataforma (cross-tenant)
11
- * - BACKOFFICE_TENANT — pool por tenant (multi-tenant isolation)
12
- */
13
- export declare enum PoolKind {
14
- BACKOFFICE_PLATFORM = "BACKOFFICE_PLATFORM",
15
- BACKOFFICE_TENANT = "BACKOFFICE_TENANT"
16
- }
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PoolKind = void 0;
4
- /**
5
- * Tipo de User Pool de Cognito desde la perspectiva del modelo RBAC Fiado.
6
- *
7
- * Origen: spec del proyecto `cognito-backoffice-connector` (Fase 0, componente 01
8
- * documento `docs/superpowers/specs/2026-05-26-cognito-connector-decisiones-pendientes-design.md`).
9
- *
10
- * Decisión (TD-003): el proyecto converge en estos 2 valores. El documento componente 03
11
- * lista 3 valores (incluyendo una variante adicional) pero queda como outlier — la
12
- * decisión vigente en los 6 docs restantes y en el plan de implementación es 2 valores:
13
- * - BACKOFFICE_PLATFORM — pool del backoffice de plataforma (cross-tenant)
14
- * - BACKOFFICE_TENANT — pool por tenant (multi-tenant isolation)
15
- */
16
- var PoolKind;
17
- (function (PoolKind) {
18
- PoolKind["BACKOFFICE_PLATFORM"] = "BACKOFFICE_PLATFORM";
19
- PoolKind["BACKOFFICE_TENANT"] = "BACKOFFICE_TENANT";
20
- })(PoolKind || (exports.PoolKind = PoolKind = {}));
@@ -1 +0,0 @@
1
- export * from './enums/PoolKind';
package/bin/rbac/index.js DELETED
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./enums/PoolKind"), exports);
@@ -1,5 +0,0 @@
1
- export declare class CancelFundingReferenceRequest {
2
- fundingId: string;
3
- directoryId: string;
4
- idempotencyKey: string;
5
- }
@@ -1,31 +0,0 @@
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.CancelFundingReferenceRequest = void 0;
13
- const class_validator_1 = require("class-validator");
14
- class CancelFundingReferenceRequest {
15
- }
16
- exports.CancelFundingReferenceRequest = CancelFundingReferenceRequest;
17
- __decorate([
18
- (0, class_validator_1.IsString)(),
19
- (0, class_validator_1.MaxLength)(64),
20
- __metadata("design:type", String)
21
- ], CancelFundingReferenceRequest.prototype, "fundingId", void 0);
22
- __decorate([
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),
30
- __metadata("design:type", String)
31
- ], CancelFundingReferenceRequest.prototype, "idempotencyKey", void 0);
@@ -1,7 +0,0 @@
1
- import { BenefitPaymentStatusEnum } from "../../benefitCenter/enums/BenefitPaymentStatusEnum";
2
- import { WalletFundingErrorCodeEnum } from "../enums/WalletFundingErrorCodeEnum";
3
- export declare class CancelFundingReferenceResponse {
4
- fundingId: string;
5
- status: BenefitPaymentStatusEnum;
6
- errorCode?: WalletFundingErrorCodeEnum;
7
- }
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CancelFundingReferenceResponse = void 0;
4
- class CancelFundingReferenceResponse {
5
- }
6
- exports.CancelFundingReferenceResponse = CancelFundingReferenceResponse;
@@ -1,11 +0,0 @@
1
- /**
2
- * Request del cancel via Centro de Beneficios (spec 13 v2.0).
3
- * `fundingId` 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
- }
@@ -1,14 +0,0 @@
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
- fundingId: string;
11
- status: BenefitPaymentStatusEnum;
12
- errorCode?: WalletFundingErrorCodeEnum;
13
- message?: string;
14
- }
@@ -1,12 +0,0 @@
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;
@@ -1,3 +0,0 @@
1
- export declare class CancelWalletFundingRequest {
2
- idempotencyKey: string;
3
- }
@@ -1,21 +0,0 @@
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);
@@ -1,7 +0,0 @@
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
- fundingId?: string;
7
- }
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CancelWalletFundingResponse = void 0;
4
- class CancelWalletFundingResponse {
5
- }
6
- exports.CancelWalletFundingResponse = CancelWalletFundingResponse;