@fiado/type-kit 3.153.0 → 3.155.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 (65) hide show
  1. package/_test_/unit/platformRbac/auth/PrepareChallengeRequest.test.ts +1 -1
  2. package/bin/messagesConnector/dtos/AgentSendNotificationRequest.d.ts +26 -0
  3. package/bin/messagesConnector/dtos/AgentSendNotificationRequest.js +125 -0
  4. package/bin/messagesConnector/index.d.ts +1 -0
  5. package/bin/messagesConnector/index.js +1 -0
  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/remittance/dtos/RemittancePromotion.d.ts +90 -0
  11. package/bin/remittance/dtos/RemittancePromotion.js +150 -0
  12. package/bin/remittance/dtos/index.d.ts +1 -0
  13. package/bin/remittance/dtos/index.js +1 -0
  14. package/bin/remittance/dtos/internal/RemittancePromotionReach.d.ts +17 -0
  15. package/bin/remittance/dtos/internal/RemittancePromotionReach.js +44 -0
  16. package/bin/remittance/enums/FeeEffectMode.d.ts +7 -0
  17. package/bin/remittance/enums/FeeEffectMode.js +11 -0
  18. package/bin/remittance/enums/FxEffectMode.d.ts +6 -0
  19. package/bin/remittance/enums/FxEffectMode.js +10 -0
  20. package/bin/remittance/enums/PromotionActivation.d.ts +7 -0
  21. package/bin/remittance/enums/PromotionActivation.js +11 -0
  22. package/bin/remittance/enums/PromotionKind.d.ts +9 -0
  23. package/bin/remittance/enums/PromotionKind.js +13 -0
  24. package/bin/remittance/enums/PromotionStatus.d.ts +7 -0
  25. package/bin/remittance/enums/PromotionStatus.js +11 -0
  26. package/bin/remittance/enums/index.d.ts +5 -0
  27. package/bin/remittance/enums/index.js +5 -0
  28. package/bin/remittance/index.d.ts +1 -0
  29. package/bin/remittance/index.js +1 -0
  30. package/package.json +1 -1
  31. package/src/messagesConnector/dtos/AgentSendNotificationRequest.ts +29 -0
  32. package/src/messagesConnector/index.ts +1 -0
  33. package/src/platformRbac/auth/PrepareChallengeRequest.ts +1 -1
  34. package/src/remittance/dtos/RemittancePromotion.ts +162 -0
  35. package/src/remittance/dtos/index.ts +1 -0
  36. package/src/remittance/dtos/internal/RemittancePromotionReach.ts +31 -0
  37. package/src/remittance/enums/FeeEffectMode.ts +7 -0
  38. package/src/remittance/enums/FxEffectMode.ts +6 -0
  39. package/src/remittance/enums/PromotionActivation.ts +7 -0
  40. package/src/remittance/enums/PromotionKind.ts +9 -0
  41. package/src/remittance/enums/PromotionStatus.ts +7 -0
  42. package/src/remittance/enums/index.ts +5 -0
  43. package/src/remittance/index.ts +1 -0
  44. package/bin/cognitoBackofficeConnector/dtos/MfaPoolConfig.d.ts +0 -7
  45. package/bin/cognitoBackofficeConnector/dtos/PoolConfigResponse.d.ts +0 -20
  46. package/bin/cognitoBackofficeConnector/dtos/PoolConfigResponse.js +0 -11
  47. package/bin/cognitoBackofficeConnector/dtos/PoolsListResponse.d.ts +0 -4
  48. package/bin/cognitoBackofficeConnector/dtos/PoolsListResponse.js +0 -6
  49. package/bin/cognitoBackofficeConnector/validators/MfaTypesRequiresOne.d.ts +0 -17
  50. package/bin/cognitoBackofficeConnector/validators/MfaTypesRequiresOne.js +0 -39
  51. package/bin/rbac/enums/PoolKind.d.ts +0 -16
  52. package/bin/rbac/enums/PoolKind.js +0 -20
  53. package/bin/rbac/index.d.ts +0 -1
  54. package/bin/rbac/index.js +0 -17
  55. package/bin/walletFunding/dtos/CancelFundingReferenceRequest.d.ts +0 -5
  56. package/bin/walletFunding/dtos/CancelFundingReferenceRequest.js +0 -31
  57. package/bin/walletFunding/dtos/CancelFundingReferenceResponse.d.ts +0 -7
  58. package/bin/walletFunding/dtos/CancelFundingReferenceResponse.js +0 -6
  59. package/bin/walletFunding/dtos/CancelFundingRequest.d.ts +0 -11
  60. package/bin/walletFunding/dtos/CancelFundingResponse.d.ts +0 -14
  61. package/bin/walletFunding/dtos/CancelFundingResponse.js +0 -12
  62. package/bin/walletFunding/dtos/CancelWalletFundingRequest.d.ts +0 -3
  63. package/bin/walletFunding/dtos/CancelWalletFundingRequest.js +0 -21
  64. package/bin/walletFunding/dtos/CancelWalletFundingResponse.d.ts +0 -7
  65. package/bin/walletFunding/dtos/CancelWalletFundingResponse.js +0 -6
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FxEffectMode = void 0;
4
+ /** Efecto de la promo sobre el spread FX (relativo a la base efectiva). */
5
+ var FxEffectMode;
6
+ (function (FxEffectMode) {
7
+ FxEffectMode["NONE"] = "NONE";
8
+ FxEffectMode["DELTA"] = "DELTA";
9
+ FxEffectMode["ABSOLUTE"] = "ABSOLUTE";
10
+ })(FxEffectMode || (exports.FxEffectMode = FxEffectMode = {}));
@@ -0,0 +1,7 @@
1
+ /** Cómo se activa la promo para el cliente. */
2
+ export declare enum PromotionActivation {
3
+ /** Auto-aplica a toda la audiencia. */
4
+ AUTOMATIC = "AUTOMATIC",
5
+ /** El cliente teclea el código en la app (habilita SOLO esa promo). */
6
+ CODE = "CODE"
7
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PromotionActivation = void 0;
4
+ /** Cómo se activa la promo para el cliente. */
5
+ var PromotionActivation;
6
+ (function (PromotionActivation) {
7
+ /** Auto-aplica a toda la audiencia. */
8
+ PromotionActivation["AUTOMATIC"] = "AUTOMATIC";
9
+ /** El cliente teclea el código en la app (habilita SOLO esa promo). */
10
+ PromotionActivation["CODE"] = "CODE";
11
+ })(PromotionActivation || (exports.PromotionActivation = PromotionActivation = {}));
@@ -0,0 +1,9 @@
1
+ /** Tipo de promoción (Variables Operativas › Promociones — mockup). */
2
+ export declare enum PromotionKind {
3
+ /** Descuento promocional temporal (puede tener código). */
4
+ PROMO = "PROMO",
5
+ /** Cambio de BASE programado (overlay absoluto; NO muta RemittancePricing_GT). */
6
+ PRICE_CHANGE = "PRICE_CHANGE",
7
+ /** Override permanente por audiencia (VIP, Onboarding sin fee, …). */
8
+ PREFERENTIAL = "PREFERENTIAL"
9
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PromotionKind = void 0;
4
+ /** Tipo de promoción (Variables Operativas › Promociones — mockup). */
5
+ var PromotionKind;
6
+ (function (PromotionKind) {
7
+ /** Descuento promocional temporal (puede tener código). */
8
+ PromotionKind["PROMO"] = "PROMO";
9
+ /** Cambio de BASE programado (overlay absoluto; NO muta RemittancePricing_GT). */
10
+ PromotionKind["PRICE_CHANGE"] = "PRICE_CHANGE";
11
+ /** Override permanente por audiencia (VIP, Onboarding sin fee, …). */
12
+ PromotionKind["PREFERENTIAL"] = "PREFERENTIAL";
13
+ })(PromotionKind || (exports.PromotionKind = PromotionKind = {}));
@@ -0,0 +1,7 @@
1
+ /** Estado DERIVADO de effectiveFrom/To vs hoy (UTC). NO se persiste. */
2
+ export declare enum PromotionStatus {
3
+ ACTIVE = "ACTIVE",// vigente con fecha de fin
4
+ SCHEDULED = "SCHEDULED",// programada (hoy < from)
5
+ PERMANENT = "PERMANENT",// vigente sin fin (effectiveTo null)
6
+ EXPIRED = "EXPIRED"
7
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PromotionStatus = void 0;
4
+ /** Estado DERIVADO de effectiveFrom/To vs hoy (UTC). NO se persiste. */
5
+ var PromotionStatus;
6
+ (function (PromotionStatus) {
7
+ PromotionStatus["ACTIVE"] = "ACTIVE";
8
+ PromotionStatus["SCHEDULED"] = "SCHEDULED";
9
+ PromotionStatus["PERMANENT"] = "PERMANENT";
10
+ PromotionStatus["EXPIRED"] = "EXPIRED";
11
+ })(PromotionStatus || (exports.PromotionStatus = PromotionStatus = {}));
@@ -12,3 +12,8 @@ export * from "./AuditAction";
12
12
  export * from "./AuditEntityType";
13
13
  export * from "./SegmentMemberType";
14
14
  export * from "./RemittanceCorridor";
15
+ export * from "./PromotionKind";
16
+ export * from "./PromotionActivation";
17
+ export * from "./PromotionStatus";
18
+ export * from "./FxEffectMode";
19
+ export * from "./FeeEffectMode";
@@ -28,3 +28,8 @@ __exportStar(require("./AuditAction"), exports);
28
28
  __exportStar(require("./AuditEntityType"), exports);
29
29
  __exportStar(require("./SegmentMemberType"), exports);
30
30
  __exportStar(require("./RemittanceCorridor"), exports);
31
+ __exportStar(require("./PromotionKind"), exports);
32
+ __exportStar(require("./PromotionActivation"), exports);
33
+ __exportStar(require("./PromotionStatus"), exports);
34
+ __exportStar(require("./FxEffectMode"), exports);
35
+ __exportStar(require("./FeeEffectMode"), exports);
@@ -5,3 +5,4 @@ export * from "./dtos/internal/RemittanceCreditBackResponse";
5
5
  export * from "./dtos/internal/RemittanceCohortCount";
6
6
  export * from "./dtos/internal/RemittanceSegmentMetrics";
7
7
  export * from "./dtos/internal/RemittancePricingBridge";
8
+ export * from "./dtos/internal/RemittancePromotionReach";
@@ -23,3 +23,4 @@ __exportStar(require("./dtos/internal/RemittanceCreditBackResponse"), exports);
23
23
  __exportStar(require("./dtos/internal/RemittanceCohortCount"), exports);
24
24
  __exportStar(require("./dtos/internal/RemittanceSegmentMetrics"), exports);
25
25
  __exportStar(require("./dtos/internal/RemittancePricingBridge"), exports);
26
+ __exportStar(require("./dtos/internal/RemittancePromotionReach"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/type-kit",
3
- "version": "3.153.0",
3
+ "version": "3.155.0",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -0,0 +1,29 @@
1
+ import { Expose } from 'class-transformer';
2
+ import { IsEnum, IsNotEmpty, IsObject, IsOptional, IsString, IsUUID } from 'class-validator';
3
+ import { DeliveryChannelEnum } from '../../messaging';
4
+
5
+ /**
6
+ * DTO del endpoint agent `POST /v2/agents/notifications` (messages-business).
7
+ * Espejo de SendMessageRequest, pero `directoryId` es opcional/string (NO @IsUUID):
8
+ * el flujo agent (shortlink SMS pre-onboarding) manda el literal "NONE" cuando aún
9
+ * no hay una persona con UUID.
10
+ */
11
+ export class AgentSendNotificationRequest {
12
+ @Expose() @IsEnum(DeliveryChannelEnum) channelType!: DeliveryChannelEnum;
13
+ @Expose() @IsString() @IsNotEmpty() messageType!: string;
14
+ @Expose() @IsOptional() @IsString() directoryId?: string;
15
+ @Expose() @IsString() @IsNotEmpty() typeOfDirectory!: string;
16
+ @Expose() @IsString() @IsNotEmpty() language!: string;
17
+ @Expose() @IsString() @IsNotEmpty() country!: string;
18
+ @Expose() @IsOptional() @IsString() destination?: string;
19
+ @Expose() @IsOptional() @IsString() var1?: string;
20
+ @Expose() @IsOptional() @IsString() var2?: string;
21
+ @Expose() @IsOptional() @IsString() var3?: string;
22
+ @Expose() @IsOptional() @IsString() var4?: string;
23
+ @Expose() @IsOptional() @IsString() var5?: string;
24
+ @Expose() @IsOptional() @IsUUID() beneficiaryDirectoryId?: string;
25
+ @Expose() @IsOptional() @IsString() beneficiaryTypeOfDirectoryId?: string;
26
+ @Expose() @IsOptional() @IsObject() options?: Record<string, unknown>;
27
+ @Expose() @IsOptional() @IsUUID() referenceMessageId?: string;
28
+ @Expose() @IsOptional() @IsString() transactionNumber?: string;
29
+ }
@@ -2,6 +2,7 @@ export * from './enums/DeliveryChannelExtendedEnum';
2
2
  export * from './validators/IsStringValueRecord';
3
3
  export * from './dtos/NotificationQueueMessageRequestV2';
4
4
  export * from './dtos/SendMessageRequest';
5
+ export * from './dtos/AgentSendNotificationRequest';
5
6
  export * from './dtos/SendMessageResponse';
6
7
  export * from './dtos/VerifyOtpRequest';
7
8
  export * from './dtos/VerifyOtpResponse';
@@ -8,7 +8,7 @@ export class PrepareChallengeRequest {
8
8
  @IsEnum(ChallengeNameEnum)
9
9
  challengeName!: ChallengeNameEnum;
10
10
 
11
- // DEC-RBAC-093: email OPCIONAL y robusto a string vacío. Un usuario phone-primario (sin email)
11
+ // DEC-RBAC-094: email OPCIONAL y robusto a string vacío. Un usuario phone-primario (sin email)
12
12
  // hace login MFA (SMS_OTP/TOTP) sin email; el trigger CreateAuthChallenge ya no manda ''. Se usa
13
13
  // @ValidateIf (no @IsOptional) porque @IsOptional NO saltea '' — acá necesitamos que undefined,
14
14
  // null y '' NO rompan la validación. Cuando email SÍ trae valor no vacío, debe ser un email válido.
@@ -0,0 +1,162 @@
1
+ import { Type } from "class-transformer";
2
+ import {
3
+ IsEnum,
4
+ IsInt,
5
+ IsNumber,
6
+ IsOptional,
7
+ IsString,
8
+ Length,
9
+ Matches,
10
+ Max,
11
+ MaxLength,
12
+ Min,
13
+ ValidateNested,
14
+ } from "class-validator";
15
+ import { FeeEffectMode } from "../enums/FeeEffectMode";
16
+ import { FxEffectMode } from "../enums/FxEffectMode";
17
+ import { PromotionActivation } from "../enums/PromotionActivation";
18
+ import { PromotionKind } from "../enums/PromotionKind";
19
+ import { PromotionStatus } from "../enums/PromotionStatus";
20
+ import { RemittanceCorridor } from "../enums/RemittanceCorridor";
21
+
22
+ /**
23
+ * DTOs de Promociones (Dashboard Ops · Variables Operativas §2).
24
+ *
25
+ * UniTeller NO participa (no hay motor de promos en API Lite): toda la lógica
26
+ * vive en Fiado. Una promo es un OVERRIDE de Precio Base (markup y/o fee) para
27
+ * una audiencia (corridor × segmento × cohort, null = Cualquiera) y vigencia.
28
+ * Dueño de la tabla: remittance-business (RemittancePromotions_GT). La
29
+ * resolución en send-time (capas: base → PRICE_CHANGE → mejor-para-el-cliente)
30
+ * es Fase B — estos DTOs cubren la config.
31
+ */
32
+
33
+ const ISO_DATE = /^\d{4}-\d{2}-\d{2}$/;
34
+
35
+ /** Audiencia: null en una dimensión = "Cualquiera". */
36
+ export class PromotionAudience {
37
+ @IsOptional()
38
+ @IsEnum(RemittanceCorridor)
39
+ corridor?: RemittanceCorridor | null;
40
+
41
+ @IsOptional()
42
+ @IsString()
43
+ @Length(1, 100)
44
+ segmentId?: string | null;
45
+
46
+ @IsOptional()
47
+ @IsString()
48
+ @Length(1, 100)
49
+ cohortId?: string | null;
50
+ }
51
+
52
+ /** Efecto FX (spread): DELTA suma bps CON SIGNO al markup base; ABSOLUTE lo reemplaza. */
53
+ export class FxEffect {
54
+ @IsEnum(FxEffectMode)
55
+ mode!: FxEffectMode;
56
+
57
+ /** bps con signo. Ignorado si mode=NONE (mandar 0). */
58
+ @IsInt()
59
+ @Min(-500)
60
+ @Max(500)
61
+ valueBps!: number;
62
+ }
63
+
64
+ /** Efecto fee: ABSOLUTE = $; DELTA = ±$; PERCENTAGE = −% del fee (0-100). */
65
+ export class FeeEffect {
66
+ @IsEnum(FeeEffectMode)
67
+ mode!: FeeEffectMode;
68
+
69
+ @IsNumber()
70
+ @Min(-100)
71
+ @Max(100)
72
+ value!: number;
73
+ }
74
+
75
+ export class CreatePromotionRequest {
76
+ @IsString()
77
+ @Length(3, 100)
78
+ name!: string;
79
+
80
+ @IsEnum(PromotionKind)
81
+ kind!: PromotionKind;
82
+
83
+ @IsEnum(PromotionActivation)
84
+ activation!: PromotionActivation;
85
+
86
+ /** Requerido si activation=CODE (regla en manager); único case-insensitive. */
87
+ @IsOptional()
88
+ @IsString()
89
+ @Length(3, 30)
90
+ @Matches(/^[A-Z0-9_-]+$/i)
91
+ code?: string | null;
92
+
93
+ @ValidateNested()
94
+ @Type(() => PromotionAudience)
95
+ audience!: PromotionAudience;
96
+
97
+ /** ISO date (YYYY-MM-DD). */
98
+ @IsString()
99
+ @Matches(ISO_DATE)
100
+ effectiveFrom!: string;
101
+
102
+ /** ISO date; null/ausente = permanente (∞). */
103
+ @IsOptional()
104
+ @IsString()
105
+ @Matches(ISO_DATE)
106
+ effectiveTo?: string | null;
107
+
108
+ @ValidateNested()
109
+ @Type(() => FxEffect)
110
+ fxEffect!: FxEffect;
111
+
112
+ @ValidateNested()
113
+ @Type(() => FeeEffect)
114
+ feeEffect!: FeeEffect;
115
+
116
+ @IsOptional()
117
+ @IsString()
118
+ @MaxLength(500)
119
+ notes?: string | null;
120
+ }
121
+
122
+ /** PUT — reemplazo completo (mismos campos que create). */
123
+ export class UpdatePromotionRequest extends CreatePromotionRequest {
124
+ }
125
+
126
+ /** Promoción completa (response de list/create/update). */
127
+ export class Promotion {
128
+ id!: string;
129
+ name!: string;
130
+ kind!: PromotionKind;
131
+ activation!: PromotionActivation;
132
+ code!: string | null;
133
+ audience!: { corridor: RemittanceCorridor | null; segmentId: string | null; cohortId: string | null };
134
+ /** Display: nombres resueltos de segmento/cohort (null = "Cualquiera" o no resoluble). */
135
+ audienceDisplay!: { corridor: string | null; segmentName: string | null; cohortName: string | null };
136
+ effectiveFrom!: string;
137
+ effectiveTo!: string | null;
138
+ fxEffect!: { mode: FxEffectMode; valueBps: number };
139
+ feeEffect!: { mode: FeeEffectMode; value: number };
140
+ /** Derivado de la vigencia vs hoy (UTC). */
141
+ status!: PromotionStatus;
142
+ /** Legible para la columna EFECTO: "MU −30 bps + Fee = $0". */
143
+ effectSummary!: string;
144
+ notes!: string | null;
145
+ createdAt!: string;
146
+ updatedAt!: string;
147
+ createdBy!: string;
148
+ updatedBy!: string;
149
+ }
150
+
151
+ /** Response de GET /backoffice/pricing/promotions. */
152
+ export class PromotionListResponse {
153
+ items!: Promotion[];
154
+ }
155
+
156
+ /** Response de GET /backoffice/pricing/promotions/reach. */
157
+ export class PromotionReachResponse {
158
+ /** Clientes en la intersección corridor × segmento × cohort. */
159
+ reach!: number;
160
+ /** Universo (todos los RemittanceUsers) — para el % del picker. */
161
+ total!: number;
162
+ }
@@ -41,3 +41,4 @@ export * from "./RemittanceAuditLog";
41
41
  export * from "./RemittanceSegment";
42
42
  export * from "./RemittanceCommittee";
43
43
  export * from "./RemittancePricing";
44
+ export * from "./RemittancePromotion";
@@ -0,0 +1,31 @@
1
+ import { Type } from "class-transformer";
2
+ import { IsArray, IsEnum, IsOptional, IsUUID, ValidateNested } from "class-validator";
3
+ import { CohortCondition } from "../RemittanceCohort";
4
+ import { RemittanceCorridor } from "../../enums/RemittanceCorridor";
5
+
6
+ /**
7
+ * Contrato interno del reach de Promociones (puente Opción A):
8
+ * POST /backoffice/config/promotions/reach (privado connector). rb resuelve las
9
+ * dimensiones a datos crudos — segmento → directoryIds; cohort → conditions;
10
+ * corredor → corridor — y el connector computa la intersección sobre el universo
11
+ * de RemittanceUsers. Toda dimensión AUSENTE = no filtra ("Cualquiera").
12
+ */
13
+ export class PromotionReachRequest {
14
+ /** Miembros del segmento (resueltos por rb). Ausente = todos los usuarios. */
15
+ @IsOptional()
16
+ @IsArray()
17
+ @IsUUID("4", { each: true })
18
+ directoryIds?: string[];
19
+
20
+ /** Condiciones del cohort (AND, evaluadas como en cohortCount). Ausente = sin filtro. */
21
+ @IsOptional()
22
+ @IsArray()
23
+ @ValidateNested({ each: true })
24
+ @Type(() => CohortCondition)
25
+ conditions?: CohortCondition[];
26
+
27
+ /** Filtro por corredor (countryISO de CORRIDOR_INFO, ≥1 tx no-cancelada histórica). Ausente = sin filtro. */
28
+ @IsOptional()
29
+ @IsEnum(RemittanceCorridor)
30
+ corridor?: RemittanceCorridor;
31
+ }
@@ -0,0 +1,7 @@
1
+ /** Efecto de la promo sobre el service fee (relativo a la base efectiva). */
2
+ export enum FeeEffectMode {
3
+ NONE = "NONE", // sin cambio
4
+ ABSOLUTE = "ABSOLUTE", // fee = value (USD)
5
+ DELTA = "DELTA", // baseFee + value (CON SIGNO)
6
+ PERCENTAGE = "PERCENTAGE", // baseFee × (1 − value/100), value 0-100
7
+ }
@@ -0,0 +1,6 @@
1
+ /** Efecto de la promo sobre el spread FX (relativo a la base efectiva). */
2
+ export enum FxEffectMode {
3
+ NONE = "NONE", // sin cambio
4
+ DELTA = "DELTA", // baseMarkup + valueBps (CON SIGNO)
5
+ ABSOLUTE = "ABSOLUTE", // markup = valueBps
6
+ }
@@ -0,0 +1,7 @@
1
+ /** Cómo se activa la promo para el cliente. */
2
+ export enum PromotionActivation {
3
+ /** Auto-aplica a toda la audiencia. */
4
+ AUTOMATIC = "AUTOMATIC",
5
+ /** El cliente teclea el código en la app (habilita SOLO esa promo). */
6
+ CODE = "CODE",
7
+ }
@@ -0,0 +1,9 @@
1
+ /** Tipo de promoción (Variables Operativas › Promociones — mockup). */
2
+ export enum PromotionKind {
3
+ /** Descuento promocional temporal (puede tener código). */
4
+ PROMO = "PROMO",
5
+ /** Cambio de BASE programado (overlay absoluto; NO muta RemittancePricing_GT). */
6
+ PRICE_CHANGE = "PRICE_CHANGE",
7
+ /** Override permanente por audiencia (VIP, Onboarding sin fee, …). */
8
+ PREFERENTIAL = "PREFERENTIAL",
9
+ }
@@ -0,0 +1,7 @@
1
+ /** Estado DERIVADO de effectiveFrom/To vs hoy (UTC). NO se persiste. */
2
+ export enum PromotionStatus {
3
+ ACTIVE = "ACTIVE", // vigente con fecha de fin
4
+ SCHEDULED = "SCHEDULED", // programada (hoy < from)
5
+ PERMANENT = "PERMANENT", // vigente sin fin (effectiveTo null)
6
+ EXPIRED = "EXPIRED", // vencida (hoy > to)
7
+ }
@@ -12,3 +12,8 @@ export * from "./AuditAction";
12
12
  export * from "./AuditEntityType";
13
13
  export * from "./SegmentMemberType";
14
14
  export * from "./RemittanceCorridor";
15
+ export * from "./PromotionKind";
16
+ export * from "./PromotionActivation";
17
+ export * from "./PromotionStatus";
18
+ export * from "./FxEffectMode";
19
+ export * from "./FeeEffectMode";
@@ -7,3 +7,4 @@ export * from "./dtos/internal/RemittanceCreditBackResponse";
7
7
  export * from "./dtos/internal/RemittanceCohortCount";
8
8
  export * from "./dtos/internal/RemittanceSegmentMetrics";
9
9
  export * from "./dtos/internal/RemittancePricingBridge";
10
+ export * from "./dtos/internal/RemittancePromotionReach";
@@ -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
- }