@fiado/type-kit 3.138.0 → 3.140.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.
@@ -3,4 +3,5 @@ export declare class PrepareChallengeRequest {
3
3
  cognitoSub: string;
4
4
  challengeName: ChallengeNameEnum;
5
5
  email: string;
6
+ phone?: string;
6
7
  }
@@ -27,3 +27,8 @@ __decorate([
27
27
  (0, class_validator_1.IsEmail)(),
28
28
  __metadata("design:type", String)
29
29
  ], PrepareChallengeRequest.prototype, "email", void 0);
30
+ __decorate([
31
+ (0, class_validator_1.IsOptional)(),
32
+ (0, class_validator_1.IsString)(),
33
+ __metadata("design:type", String)
34
+ ], PrepareChallengeRequest.prototype, "phone", void 0);
@@ -6,6 +6,6 @@
6
6
  * MfaMethodEnum ('EMAIL_OTP'|'TOTP') a propósito. Ver TECH_DEBT.md del platform-rbac-business.
7
7
  */
8
8
  export interface TenantSecurityPolicyResponse {
9
- methodsAllowed: ('EMAIL' | 'TOTP')[];
9
+ methodsAllowed: ('EMAIL' | 'TOTP' | 'SMS')[];
10
10
  mfaEnabled?: boolean;
11
11
  }
@@ -1,4 +1,4 @@
1
1
  export declare class UpdateTenantSecurityPolicyRequest {
2
- methodsAllowed: ('EMAIL' | 'TOTP')[];
2
+ methodsAllowed: ('EMAIL' | 'TOTP' | 'SMS')[];
3
3
  mfaEnabled?: boolean;
4
4
  }
@@ -12,14 +12,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.UpdateTenantSecurityPolicyRequest = void 0;
13
13
  const class_transformer_1 = require("class-transformer");
14
14
  const class_validator_1 = require("class-validator");
15
- // TD-RBAC-071: methodsAllowed usa el value-set 'EMAIL'|'TOTP' (string), distinto de MfaMethodEnum.
15
+ // TD-RBAC-071: methodsAllowed usa el value-set 'EMAIL'|'TOTP'|'SMS' (string), distinto de MfaMethodEnum.
16
+ // DEC-RBAC-085: 'SMS' se suma como método tenant-controlado (3er método de MFA).
16
17
  class UpdateTenantSecurityPolicyRequest {
17
18
  }
18
19
  exports.UpdateTenantSecurityPolicyRequest = UpdateTenantSecurityPolicyRequest;
19
20
  __decorate([
20
21
  (0, class_transformer_1.Expose)(),
21
22
  (0, class_validator_1.ArrayNotEmpty)(),
22
- (0, class_validator_1.IsIn)(['EMAIL', 'TOTP'], { each: true }),
23
+ (0, class_validator_1.IsIn)(['EMAIL', 'TOTP', 'SMS'], { each: true }),
23
24
  __metadata("design:type", Array)
24
25
  ], UpdateTenantSecurityPolicyRequest.prototype, "methodsAllowed", void 0);
25
26
  __decorate([
@@ -3,5 +3,6 @@ export declare enum ChallengeNameEnum {
3
3
  EMAIL_OTP = "EMAIL_OTP",
4
4
  TOTP = "TOTP",
5
5
  NEW_PASSWORD_REQUIRED = "NEW_PASSWORD_REQUIRED",
6
- RESET_PASSWORD = "RESET_PASSWORD"
6
+ RESET_PASSWORD = "RESET_PASSWORD",
7
+ SMS_OTP = "SMS_OTP"
7
8
  }
@@ -8,4 +8,5 @@ var ChallengeNameEnum;
8
8
  ChallengeNameEnum["TOTP"] = "TOTP";
9
9
  ChallengeNameEnum["NEW_PASSWORD_REQUIRED"] = "NEW_PASSWORD_REQUIRED";
10
10
  ChallengeNameEnum["RESET_PASSWORD"] = "RESET_PASSWORD";
11
+ ChallengeNameEnum["SMS_OTP"] = "SMS_OTP";
11
12
  })(ChallengeNameEnum || (exports.ChallengeNameEnum = ChallengeNameEnum = {}));
@@ -1,4 +1,5 @@
1
1
  export declare enum MfaMethodEnum {
2
2
  EMAIL_OTP = "EMAIL_OTP",
3
- TOTP = "TOTP"
3
+ TOTP = "TOTP",
4
+ SMS_OTP = "SMS_OTP"
4
5
  }
@@ -5,4 +5,5 @@ var MfaMethodEnum;
5
5
  (function (MfaMethodEnum) {
6
6
  MfaMethodEnum["EMAIL_OTP"] = "EMAIL_OTP";
7
7
  MfaMethodEnum["TOTP"] = "TOTP";
8
+ MfaMethodEnum["SMS_OTP"] = "SMS_OTP";
8
9
  })(MfaMethodEnum || (exports.MfaMethodEnum = MfaMethodEnum = {}));
@@ -8,6 +8,12 @@ export declare class RemittanceBackofficeTransaction {
8
8
  directoryId: string;
9
9
  txNumber: string;
10
10
  marketplaceTransactionNumber?: string;
11
+ /**
12
+ * Nombre del remitente (usuario de remesas). Se resuelve en el connector
13
+ * uniendo `directoryId` → `RemittanceUser.fullName` (tabla de remesas), NO
14
+ * viene de directory. `null` si el usuario aún no tiene `fullName` snapshotteado.
15
+ */
16
+ senderName?: string | null;
11
17
  beneficiaryId: string;
12
18
  beneficiaryName: string;
13
19
  countryISO: string;
@@ -6,6 +6,12 @@
6
6
  export declare class RemittanceBackofficeUserView {
7
7
  directoryId: string;
8
8
  unirEmail: string;
9
+ /** Nombre del usuario (snapshot de identidad UNIR en la tabla de remesas). `null` si aún no se snapshoteó. */
10
+ fullName?: string | null;
11
+ /** Ciudad del usuario (RemittanceUser.addressCity). `null` si no está poblada. */
12
+ city?: string | null;
13
+ /** Estado/provincia del usuario (RemittanceUser.addressState). `null` si no está poblada. */
14
+ state?: string | null;
9
15
  status: string;
10
16
  remitterStatus?: string;
11
17
  remitterLevel?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/type-kit",
3
- "version": "3.138.0",
3
+ "version": "3.140.0",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -1,4 +1,4 @@
1
- import { IsEmail, IsEnum, IsString } from 'class-validator';
1
+ import { IsEmail, IsEnum, IsOptional, IsString } from 'class-validator';
2
2
  import { ChallengeNameEnum } from '../enums/ChallengeNameEnum';
3
3
 
4
4
  export class PrepareChallengeRequest {
@@ -10,4 +10,11 @@ export class PrepareChallengeRequest {
10
10
 
11
11
  @IsEmail()
12
12
  email!: string;
13
+
14
+ // DEC-RBAC-083: teléfono destino del challenge SMS_OTP. Lo popula el trigger CreateAuthChallenge
15
+ // (JWTAuth-cognito) desde el atributo phone_number de Cognito, igual que email. Opcional: ausente
16
+ // en challenges EMAIL_OTP/TOTP. Ver TD-RBAC-124.
17
+ @IsOptional()
18
+ @IsString()
19
+ phone?: string;
13
20
  }
@@ -6,7 +6,7 @@
6
6
  * MfaMethodEnum ('EMAIL_OTP'|'TOTP') a propósito. Ver TECH_DEBT.md del platform-rbac-business.
7
7
  */
8
8
  export interface TenantSecurityPolicyResponse {
9
- methodsAllowed: ('EMAIL' | 'TOTP')[];
9
+ methodsAllowed: ('EMAIL' | 'TOTP' | 'SMS')[];
10
10
 
11
11
  // DEC-RBAC-045: 2FA master switch por tenant. Ausente ⇒ habilitado (secure-by-default).
12
12
  mfaEnabled?: boolean;
@@ -1,12 +1,13 @@
1
1
  import { Expose } from 'class-transformer';
2
2
  import { ArrayNotEmpty, IsBoolean, IsIn, IsOptional } from 'class-validator';
3
3
 
4
- // TD-RBAC-071: methodsAllowed usa el value-set 'EMAIL'|'TOTP' (string), distinto de MfaMethodEnum.
4
+ // TD-RBAC-071: methodsAllowed usa el value-set 'EMAIL'|'TOTP'|'SMS' (string), distinto de MfaMethodEnum.
5
+ // DEC-RBAC-085: 'SMS' se suma como método tenant-controlado (3er método de MFA).
5
6
  export class UpdateTenantSecurityPolicyRequest {
6
7
  @Expose()
7
8
  @ArrayNotEmpty()
8
- @IsIn(['EMAIL', 'TOTP'], { each: true })
9
- methodsAllowed!: ('EMAIL' | 'TOTP')[];
9
+ @IsIn(['EMAIL', 'TOTP', 'SMS'], { each: true })
10
+ methodsAllowed!: ('EMAIL' | 'TOTP' | 'SMS')[];
10
11
 
11
12
  // DEC-RBAC-045: 2FA master switch por tenant. Ausente ⇒ habilitado (secure-by-default).
12
13
  @Expose()
@@ -4,4 +4,5 @@ export enum ChallengeNameEnum {
4
4
  TOTP = 'TOTP',
5
5
  NEW_PASSWORD_REQUIRED = 'NEW_PASSWORD_REQUIRED',
6
6
  RESET_PASSWORD = 'RESET_PASSWORD',
7
+ SMS_OTP = 'SMS_OTP',
7
8
  }
@@ -1,4 +1,5 @@
1
1
  export enum MfaMethodEnum {
2
2
  EMAIL_OTP = 'EMAIL_OTP',
3
3
  TOTP = 'TOTP',
4
+ SMS_OTP = 'SMS_OTP',
4
5
  }
@@ -9,6 +9,12 @@ export class RemittanceBackofficeTransaction {
9
9
  directoryId!: string;
10
10
  txNumber!: string;
11
11
  marketplaceTransactionNumber?: string;
12
+ /**
13
+ * Nombre del remitente (usuario de remesas). Se resuelve en el connector
14
+ * uniendo `directoryId` → `RemittanceUser.fullName` (tabla de remesas), NO
15
+ * viene de directory. `null` si el usuario aún no tiene `fullName` snapshotteado.
16
+ */
17
+ senderName?: string | null;
12
18
  beneficiaryId!: string;
13
19
  beneficiaryName!: string;
14
20
  countryISO!: string;
@@ -6,6 +6,12 @@
6
6
  export class RemittanceBackofficeUserView {
7
7
  directoryId!: string;
8
8
  unirEmail!: string;
9
+ /** Nombre del usuario (snapshot de identidad UNIR en la tabla de remesas). `null` si aún no se snapshoteó. */
10
+ fullName?: string | null;
11
+ /** Ciudad del usuario (RemittanceUser.addressCity). `null` si no está poblada. */
12
+ city?: string | null;
13
+ /** Estado/provincia del usuario (RemittanceUser.addressState). `null` si no está poblada. */
14
+ state?: string | null;
9
15
  status!: string;
10
16
  remitterStatus?: string;
11
17
  remitterLevel?: string;