@fiado/type-kit 3.290.0 → 3.292.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.
@@ -1,10 +1,13 @@
1
1
  import { KycStatus } from "../enums/issuance/KycStatus";
2
2
  import { UserStatus } from "../enums/issuance/UserStatus";
3
3
  import { KycReason } from "../enums/KycReason";
4
+ import { KycVendorResultDetail } from "./KycVendorResultDetail";
4
5
  export declare class CardUpdateIssuanceRequest {
5
6
  kycStatus: KycStatus;
6
7
  userStatus: UserStatus;
7
8
  directoryId: string;
8
9
  externalUserId: string;
9
10
  kycReasons?: KycReason[];
11
+ /** Detalle crudo del vendor de KYC. Solo lo manda la ruta del webhook/connector de CP. */
12
+ kycVendorResults?: KycVendorResultDetail[];
10
13
  }
@@ -10,9 +10,11 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.CardUpdateIssuanceRequest = void 0;
13
+ const class_transformer_1 = require("class-transformer");
13
14
  const class_validator_1 = require("class-validator");
14
15
  const KycStatus_1 = require("../enums/issuance/KycStatus");
15
16
  const UserStatus_1 = require("../enums/issuance/UserStatus");
17
+ const KycVendorResultDetail_1 = require("./KycVendorResultDetail");
16
18
  class CardUpdateIssuanceRequest {
17
19
  }
18
20
  exports.CardUpdateIssuanceRequest = CardUpdateIssuanceRequest;
@@ -37,3 +39,10 @@ __decorate([
37
39
  (0, class_validator_1.IsString)(),
38
40
  __metadata("design:type", Array)
39
41
  ], CardUpdateIssuanceRequest.prototype, "kycReasons", void 0);
42
+ __decorate([
43
+ (0, class_validator_1.IsOptional)(),
44
+ (0, class_validator_1.IsArray)(),
45
+ (0, class_validator_1.ValidateNested)({ each: true }),
46
+ (0, class_transformer_1.Type)(() => KycVendorResultDetail_1.KycVendorResultDetail),
47
+ __metadata("design:type", Array)
48
+ ], CardUpdateIssuanceRequest.prototype, "kycVendorResults", void 0);
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Resultado crudo del vendor de KYC (IDology vía Central Payments). Valores libres a propósito:
3
+ * los códigos son un conjunto abierto del vendor — la traducción vive en el consumidor.
4
+ */
5
+ export declare class KycVendorResultDetail {
6
+ vendor?: string;
7
+ type?: string;
8
+ code?: string;
9
+ description?: string;
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.KycVendorResultDetail = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ /**
15
+ * Resultado crudo del vendor de KYC (IDology vía Central Payments). Valores libres a propósito:
16
+ * los códigos son un conjunto abierto del vendor — la traducción vive en el consumidor.
17
+ */
18
+ class KycVendorResultDetail {
19
+ }
20
+ exports.KycVendorResultDetail = KycVendorResultDetail;
21
+ __decorate([
22
+ (0, class_validator_1.IsOptional)(),
23
+ (0, class_validator_1.IsString)(),
24
+ __metadata("design:type", String)
25
+ ], KycVendorResultDetail.prototype, "vendor", void 0);
26
+ __decorate([
27
+ (0, class_validator_1.IsOptional)(),
28
+ (0, class_validator_1.IsString)(),
29
+ __metadata("design:type", String)
30
+ ], KycVendorResultDetail.prototype, "type", void 0);
31
+ __decorate([
32
+ (0, class_validator_1.IsOptional)(),
33
+ (0, class_validator_1.IsString)(),
34
+ __metadata("design:type", String)
35
+ ], KycVendorResultDetail.prototype, "code", void 0);
36
+ __decorate([
37
+ (0, class_validator_1.IsOptional)(),
38
+ (0, class_validator_1.IsString)(),
39
+ __metadata("design:type", String)
40
+ ], KycVendorResultDetail.prototype, "description", void 0);
@@ -37,6 +37,7 @@ export * from './dtos/CardSummaryResponse';
37
37
  export * from './dtos/CardAdditionalResponse';
38
38
  export * from './dtos/AccountCancelGetResponse';
39
39
  export * from './dtos/CardUpdateIssuanceRequest';
40
+ export * from './dtos/KycVendorResultDetail';
40
41
  export * from './dtos/AccountIssuanceStepConfig';
41
42
  export * from './enums/CardType';
42
43
  export * from './enums/CardUpdateKey';
package/bin/card/index.js CHANGED
@@ -55,6 +55,7 @@ __exportStar(require("./dtos/CardSummaryResponse"), exports);
55
55
  __exportStar(require("./dtos/CardAdditionalResponse"), exports);
56
56
  __exportStar(require("./dtos/AccountCancelGetResponse"), exports);
57
57
  __exportStar(require("./dtos/CardUpdateIssuanceRequest"), exports);
58
+ __exportStar(require("./dtos/KycVendorResultDetail"), exports);
58
59
  __exportStar(require("./dtos/AccountIssuanceStepConfig"), exports);
59
60
  //enums
60
61
  __exportStar(require("./enums/CardType"), exports);
@@ -0,0 +1,14 @@
1
+ /**
2
+ * DEC-RBAC-120: qué clase de principal está haciendo el request.
3
+ *
4
+ * USER — persona autenticada con sesión de Cognito (cookie `session`).
5
+ * INTEGRATION — credencial máquina-a-máquina de un socio externo (API key bearer). Su `cognitoSub`
6
+ * tiene la forma `INT#<integrationId>` y NO viene de Cognito.
7
+ *
8
+ * NO confundir con `PrincipalIdentifierEnum` (EMAIL/PHONE), que es cómo se identifica un humano al
9
+ * hacer login (DEC-RBAC-079). Este enum es el TIPO de principal, no cómo se identifica.
10
+ */
11
+ export declare enum PrincipalKind {
12
+ USER = "USER",
13
+ INTEGRATION = "INTEGRATION"
14
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PrincipalKind = void 0;
4
+ /**
5
+ * DEC-RBAC-120: qué clase de principal está haciendo el request.
6
+ *
7
+ * USER — persona autenticada con sesión de Cognito (cookie `session`).
8
+ * INTEGRATION — credencial máquina-a-máquina de un socio externo (API key bearer). Su `cognitoSub`
9
+ * tiene la forma `INT#<integrationId>` y NO viene de Cognito.
10
+ *
11
+ * NO confundir con `PrincipalIdentifierEnum` (EMAIL/PHONE), que es cómo se identifica un humano al
12
+ * hacer login (DEC-RBAC-079). Este enum es el TIPO de principal, no cómo se identifica.
13
+ */
14
+ var PrincipalKind;
15
+ (function (PrincipalKind) {
16
+ PrincipalKind["USER"] = "USER";
17
+ PrincipalKind["INTEGRATION"] = "INTEGRATION";
18
+ })(PrincipalKind || (exports.PrincipalKind = PrincipalKind = {}));
@@ -2,6 +2,7 @@ export { Permission, PERMISSION_BIT_ORDER, PERMS_VERSION, permissionsToBits, bit
2
2
  export { PermissionScope } from './enums/PermissionScope';
3
3
  export { PermissionCategory } from './enums/PermissionCategory';
4
4
  export { PrincipalIdentifierEnum } from './enums/PrincipalIdentifierEnum';
5
+ export { PrincipalKind } from './enums/PrincipalKind';
5
6
  export type { AuthContext } from './dtos/AuthContext';
6
7
  export type { RoleAssignmentInfo } from './dtos/RoleAssignmentInfo';
7
8
  export type { PermissionMeta } from './dtos/PermissionMeta';
@@ -23,7 +23,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
23
23
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.UserFieldType = exports.scopeRankOrder = exports.tableSuffixForLevel = exports.levelsOf = exports.TENANT_TYPES = exports.TenantType = exports.AuthorizeDenyReason = exports.PrincipalIdentifierEnum = exports.PermissionCategory = exports.PermissionScope = exports.bitsToPermissions = exports.permissionsToBits = exports.PERMS_VERSION = exports.PERMISSION_BIT_ORDER = exports.Permission = void 0;
26
+ exports.UserFieldType = exports.scopeRankOrder = exports.tableSuffixForLevel = exports.levelsOf = exports.TENANT_TYPES = exports.TenantType = exports.AuthorizeDenyReason = exports.PrincipalKind = exports.PrincipalIdentifierEnum = exports.PermissionCategory = exports.PermissionScope = exports.bitsToPermissions = exports.permissionsToBits = exports.PERMS_VERSION = exports.PERMISSION_BIT_ORDER = exports.Permission = void 0;
27
27
  var Permission_1 = require("./enums/Permission");
28
28
  Object.defineProperty(exports, "Permission", { enumerable: true, get: function () { return Permission_1.Permission; } });
29
29
  Object.defineProperty(exports, "PERMISSION_BIT_ORDER", { enumerable: true, get: function () { return Permission_1.PERMISSION_BIT_ORDER; } });
@@ -37,6 +37,10 @@ Object.defineProperty(exports, "PermissionCategory", { enumerable: true, get: fu
37
37
  // DEC-RBAC-079: identificador principal de login por aplicación (heredado por tenant).
38
38
  var PrincipalIdentifierEnum_1 = require("./enums/PrincipalIdentifierEnum");
39
39
  Object.defineProperty(exports, "PrincipalIdentifierEnum", { enumerable: true, get: function () { return PrincipalIdentifierEnum_1.PrincipalIdentifierEnum; } });
40
+ // DEC-RBAC-120: TIPO de principal (humano vs credencial M2M). No confundir con el de arriba,
41
+ // que es cómo se identifica un humano al hacer login.
42
+ var PrincipalKind_1 = require("./enums/PrincipalKind");
43
+ Object.defineProperty(exports, "PrincipalKind", { enumerable: true, get: function () { return PrincipalKind_1.PrincipalKind; } });
40
44
  // Fase 1 — Custom Auth Challenge (Email OTP + TOTP) + MFA self-service.
41
45
  // Class values (no type-only) — los DTOs llevan decoradores class-validator y se hidratan con plainToInstance en runtime.
42
46
  __exportStar(require("./enums/MfaMethodEnum"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/type-kit",
3
- "version": "3.290.0",
3
+ "version": "3.292.0",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -1,7 +1,9 @@
1
- import { IsEnum, IsOptional, IsString, IsUUID } from "class-validator";
1
+ import { Type } from "class-transformer";
2
+ import { IsArray, IsEnum, IsOptional, IsString, IsUUID, ValidateNested } from "class-validator";
2
3
  import { KycStatus } from "../enums/issuance/KycStatus";
3
4
  import { UserStatus } from "../enums/issuance/UserStatus";
4
5
  import { KycReason } from "../enums/KycReason";
6
+ import { KycVendorResultDetail } from "./KycVendorResultDetail";
5
7
 
6
8
 
7
9
  export class CardUpdateIssuanceRequest {
@@ -22,4 +24,11 @@ export class CardUpdateIssuanceRequest {
22
24
  @IsString()
23
25
  kycReasons?: KycReason[];
24
26
 
27
+ /** Detalle crudo del vendor de KYC. Solo lo manda la ruta del webhook/connector de CP. */
28
+ @IsOptional()
29
+ @IsArray()
30
+ @ValidateNested({ each: true })
31
+ @Type(() => KycVendorResultDetail)
32
+ kycVendorResults?: KycVendorResultDetail[];
33
+
25
34
  }
@@ -0,0 +1,24 @@
1
+ import { IsOptional, IsString } from "class-validator";
2
+
3
+ /**
4
+ * Resultado crudo del vendor de KYC (IDology vía Central Payments). Valores libres a propósito:
5
+ * los códigos son un conjunto abierto del vendor — la traducción vive en el consumidor.
6
+ */
7
+ export class KycVendorResultDetail {
8
+
9
+ @IsOptional()
10
+ @IsString()
11
+ vendor?: string;
12
+
13
+ @IsOptional()
14
+ @IsString()
15
+ type?: string;
16
+
17
+ @IsOptional()
18
+ @IsString()
19
+ code?: string;
20
+
21
+ @IsOptional()
22
+ @IsString()
23
+ description?: string;
24
+ }
package/src/card/index.ts CHANGED
@@ -41,6 +41,7 @@ export * from './dtos/CardSummaryResponse'
41
41
  export * from './dtos/CardAdditionalResponse'
42
42
  export * from './dtos/AccountCancelGetResponse'
43
43
  export * from './dtos/CardUpdateIssuanceRequest'
44
+ export * from './dtos/KycVendorResultDetail'
44
45
  export * from './dtos/AccountIssuanceStepConfig'
45
46
 
46
47
  //enums
@@ -0,0 +1,14 @@
1
+ /**
2
+ * DEC-RBAC-120: qué clase de principal está haciendo el request.
3
+ *
4
+ * USER — persona autenticada con sesión de Cognito (cookie `session`).
5
+ * INTEGRATION — credencial máquina-a-máquina de un socio externo (API key bearer). Su `cognitoSub`
6
+ * tiene la forma `INT#<integrationId>` y NO viene de Cognito.
7
+ *
8
+ * NO confundir con `PrincipalIdentifierEnum` (EMAIL/PHONE), que es cómo se identifica un humano al
9
+ * hacer login (DEC-RBAC-079). Este enum es el TIPO de principal, no cómo se identifica.
10
+ */
11
+ export enum PrincipalKind {
12
+ USER = 'USER',
13
+ INTEGRATION = 'INTEGRATION',
14
+ }
@@ -19,6 +19,9 @@ export { PermissionScope } from './enums/PermissionScope';
19
19
  export { PermissionCategory } from './enums/PermissionCategory';
20
20
  // DEC-RBAC-079: identificador principal de login por aplicación (heredado por tenant).
21
21
  export { PrincipalIdentifierEnum } from './enums/PrincipalIdentifierEnum';
22
+ // DEC-RBAC-120: TIPO de principal (humano vs credencial M2M). No confundir con el de arriba,
23
+ // que es cómo se identifica un humano al hacer login.
24
+ export { PrincipalKind } from './enums/PrincipalKind';
22
25
 
23
26
  export type { AuthContext } from './dtos/AuthContext';
24
27
  export type { RoleAssignmentInfo } from './dtos/RoleAssignmentInfo';