@fiado/type-kit 3.227.0 → 3.228.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.
- package/_test_/unit/identity/PeopleSelfieResponse.test.ts +57 -0
- package/bin/identity/dtos/PeopleSelfieResponse.d.ts +7 -20
- package/bin/identity/dtos/PeopleSelfieResponse.js +39 -8
- package/bin/identity/index.d.ts +1 -0
- package/bin/identity/index.js +1 -0
- package/bin/loanConfig/enums/ModifiableByRoleEnum.d.ts +11 -0
- package/bin/loanConfig/enums/ModifiableByRoleEnum.js +15 -0
- package/bin/places/dtos/CashInFeeDto.d.ts +17 -0
- package/bin/places/dtos/CashInFeeDto.js +12 -0
- package/bin/platformRbac/dtos/ResendOtpRequest.d.ts +22 -0
- package/bin/{walletFunding/dtos/CancelFundingRequest.js → platformRbac/dtos/ResendOtpRequest.js} +16 -13
- package/bin/platformRbac/dtos/ResendSelfRegisterOtpRequest.d.ts +11 -0
- package/bin/{walletFunding/dtos/CancelFundingReferenceRequest.js → platformRbac/dtos/ResendSelfRegisterOtpRequest.js} +18 -13
- package/package.json +1 -1
- package/src/identity/dtos/PeopleSelfieResponse.ts +26 -0
- package/src/identity/index.ts +1 -0
- package/bin/identity/enums/SelfieSourceEnum.d.ts +0 -10
- package/bin/identity/enums/SelfieSourceEnum.js +0 -14
- package/bin/loanCredit/dtos/requests/UpdateActivationChecklistRequest.d.ts +0 -11
- package/bin/loanCredit/dtos/requests/UpdateActivationChecklistRequest.js +0 -46
- package/bin/loanCredit/enums/ClientLevelEnum.d.ts +0 -11
- package/bin/loanCredit/enums/ClientLevelEnum.js +0 -15
- package/bin/walletFunding/dtos/CancelFundingReferenceRequest.d.ts +0 -6
- package/bin/walletFunding/dtos/CancelFundingReferenceResponse.d.ts +0 -7
- package/bin/walletFunding/dtos/CancelFundingReferenceResponse.js +0 -6
- package/bin/walletFunding/dtos/CancelFundingRequest.d.ts +0 -11
- package/bin/walletFunding/dtos/CancelFundingResponse.d.ts +0 -14
- package/bin/walletFunding/dtos/CancelFundingResponse.js +0 -12
- package/bin/walletFunding/dtos/CancelWalletFundingRequest.d.ts +0 -3
- package/bin/walletFunding/dtos/CancelWalletFundingRequest.js +0 -21
- package/bin/walletFunding/dtos/CancelWalletFundingResponse.d.ts +0 -7
- package/bin/walletFunding/dtos/CancelWalletFundingResponse.js +0 -6
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import { plainToInstance } from 'class-transformer';
|
|
3
|
+
import { validate } from 'class-validator';
|
|
4
|
+
import { PeopleSelfieResponse } from '../../../src/identity/index';
|
|
5
|
+
|
|
6
|
+
describe('PeopleSelfieResponse', () => {
|
|
7
|
+
const valid = {
|
|
8
|
+
directoryId: 'dir-1',
|
|
9
|
+
url: 'https://s3.amazonaws.com/bucket/USER/dir-1/ver-1_MEX_ppl_SELFIE.png?X-Amz-Expires=900',
|
|
10
|
+
key: 'ver-1_MEX_ppl_SELFIE.png',
|
|
11
|
+
expiresInSeconds: 900,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
it('acepta una respuesta de selfie completa', async () => {
|
|
15
|
+
const dto = plainToInstance(PeopleSelfieResponse, valid, { excludeExtraneousValues: true });
|
|
16
|
+
const errors = await validate(dto as object);
|
|
17
|
+
|
|
18
|
+
expect(errors).toHaveLength(0);
|
|
19
|
+
expect(dto.directoryId).toBe('dir-1');
|
|
20
|
+
expect(dto.key).toBe('ver-1_MEX_ppl_SELFIE.png');
|
|
21
|
+
expect(dto.url).toContain('SELFIE.png');
|
|
22
|
+
expect(dto.expiresInSeconds).toBe(900);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it.each(['directoryId', 'url', 'key'])('rechaza %s vacío', async (campo) => {
|
|
26
|
+
const dto = plainToInstance(
|
|
27
|
+
PeopleSelfieResponse,
|
|
28
|
+
{ ...valid, [campo]: '' },
|
|
29
|
+
{ excludeExtraneousValues: true },
|
|
30
|
+
);
|
|
31
|
+
const errors = await validate(dto as object);
|
|
32
|
+
|
|
33
|
+
expect(errors.map((e) => e.property)).toContain(campo);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it('rechaza expiresInSeconds no entero', async () => {
|
|
37
|
+
const dto = plainToInstance(
|
|
38
|
+
PeopleSelfieResponse,
|
|
39
|
+
{ ...valid, expiresInSeconds: 12.5 },
|
|
40
|
+
{ excludeExtraneousValues: true },
|
|
41
|
+
);
|
|
42
|
+
const errors = await validate(dto as object);
|
|
43
|
+
|
|
44
|
+
expect(errors.map((e) => e.property)).toContain('expiresInSeconds');
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it('rechaza expiresInSeconds no positivo', async () => {
|
|
48
|
+
const dto = plainToInstance(
|
|
49
|
+
PeopleSelfieResponse,
|
|
50
|
+
{ ...valid, expiresInSeconds: 0 },
|
|
51
|
+
{ excludeExtraneousValues: true },
|
|
52
|
+
);
|
|
53
|
+
const errors = await validate(dto as object);
|
|
54
|
+
|
|
55
|
+
expect(errors.map((e) => e.property)).toContain('expiresInSeconds');
|
|
56
|
+
});
|
|
57
|
+
});
|
|
@@ -1,29 +1,16 @@
|
|
|
1
|
-
import { SelfieSourceEnum } from '../enums/SelfieSourceEnum';
|
|
2
1
|
/**
|
|
3
|
-
*
|
|
2
|
+
* Respuesta del endpoint privado que devuelve la selfie del KYC de un usuario:
|
|
3
|
+
* el URL presignado de S3 (es el `userPhotoLink` del facematch) + su vigencia.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* `userPhotoLinkHash`, y el par va en el `metadata` de la verificación con `customInput: true`.
|
|
8
|
-
*
|
|
9
|
-
* Solo responde a usuarios con cuenta (`MEX_DebitAccount` o `USA_DebitAccount`); si no, el endpoint
|
|
10
|
-
* devuelve 401 con code `NO_ACCOUNT`. Si el usuario tiene cuenta pero no hay imagen de selfie,
|
|
11
|
-
* devuelve code `SELFIE_NOT_FOUND`. fiado-identity-lambda.
|
|
5
|
+
* Versión SIMPLIFICADA (sin `source` / `verificationId` / `lastModified`): el consumidor
|
|
6
|
+
* solo necesita el URL para el facematch y el nombre del archivo para trazabilidad.
|
|
12
7
|
*/
|
|
13
8
|
export declare class PeopleSelfieResponse {
|
|
14
9
|
directoryId: string;
|
|
10
|
+
/** URL presignado de S3 de la foto de cara (el `userPhotoLink` del facematch). */
|
|
11
|
+
url: string;
|
|
15
12
|
/** Nombre del archivo en S3, sin el prefijo `USER/{directoryId}/`. */
|
|
16
13
|
key: string;
|
|
17
|
-
/**
|
|
18
|
-
url: string;
|
|
19
|
-
/**
|
|
20
|
-
* Vigencia del presigned. La emite fiado-s3-lambda y hoy es 3600; el facematch tiene que
|
|
21
|
-
* dispararse dentro de esa ventana o Metamap no podrá descargar la foto.
|
|
22
|
-
*/
|
|
14
|
+
/** Vigencia del presigned URL en segundos. */
|
|
23
15
|
expiresInSeconds: number;
|
|
24
|
-
/** Verificación de Metamap a la que pertenece la selfie. `null` si no se pudo determinar. */
|
|
25
|
-
verificationId: string | null;
|
|
26
|
-
/** Fecha ISO de última modificación del objeto en S3. `null` si S3 no la reportó. */
|
|
27
|
-
lastModified: string | null;
|
|
28
|
-
source: SelfieSourceEnum;
|
|
29
16
|
}
|
|
@@ -1,17 +1,48 @@
|
|
|
1
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
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.PeopleSelfieResponse = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
4
15
|
/**
|
|
5
|
-
*
|
|
16
|
+
* Respuesta del endpoint privado que devuelve la selfie del KYC de un usuario:
|
|
17
|
+
* el URL presignado de S3 (es el `userPhotoLink` del facematch) + su vigencia.
|
|
6
18
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* `userPhotoLinkHash`, y el par va en el `metadata` de la verificación con `customInput: true`.
|
|
10
|
-
*
|
|
11
|
-
* Solo responde a usuarios con cuenta (`MEX_DebitAccount` o `USA_DebitAccount`); si no, el endpoint
|
|
12
|
-
* devuelve 401 con code `NO_ACCOUNT`. Si el usuario tiene cuenta pero no hay imagen de selfie,
|
|
13
|
-
* devuelve code `SELFIE_NOT_FOUND`. fiado-identity-lambda.
|
|
19
|
+
* Versión SIMPLIFICADA (sin `source` / `verificationId` / `lastModified`): el consumidor
|
|
20
|
+
* solo necesita el URL para el facematch y el nombre del archivo para trazabilidad.
|
|
14
21
|
*/
|
|
15
22
|
class PeopleSelfieResponse {
|
|
16
23
|
}
|
|
17
24
|
exports.PeopleSelfieResponse = PeopleSelfieResponse;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
28
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], PeopleSelfieResponse.prototype, "directoryId", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_transformer_1.Expose)(),
|
|
33
|
+
(0, class_validator_1.IsString)(),
|
|
34
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], PeopleSelfieResponse.prototype, "url", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_transformer_1.Expose)(),
|
|
39
|
+
(0, class_validator_1.IsString)(),
|
|
40
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], PeopleSelfieResponse.prototype, "key", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_transformer_1.Expose)(),
|
|
45
|
+
(0, class_validator_1.IsInt)(),
|
|
46
|
+
(0, class_validator_1.IsPositive)(),
|
|
47
|
+
__metadata("design:type", Number)
|
|
48
|
+
], PeopleSelfieResponse.prototype, "expiresInSeconds", void 0);
|
package/bin/identity/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from './dtos/UploadDocumentFile';
|
|
|
10
10
|
export * from './dtos/PeopleSelfVerifiedRequest';
|
|
11
11
|
export * from './dtos/AgentDocumentKeyResponse';
|
|
12
12
|
export * from './dtos/DocumentUploadResponse';
|
|
13
|
+
export * from './dtos/PeopleSelfieResponse';
|
|
13
14
|
export * from './enums/IdentificationDocumentStatus';
|
|
14
15
|
export * from './enums/SexDocument';
|
|
15
16
|
export * from './enums/InfoSelfVerifiedStatus';
|
package/bin/identity/index.js
CHANGED
|
@@ -27,6 +27,7 @@ __exportStar(require("./dtos/UploadDocumentFile"), exports);
|
|
|
27
27
|
__exportStar(require("./dtos/PeopleSelfVerifiedRequest"), exports);
|
|
28
28
|
__exportStar(require("./dtos/AgentDocumentKeyResponse"), exports);
|
|
29
29
|
__exportStar(require("./dtos/DocumentUploadResponse"), exports);
|
|
30
|
+
__exportStar(require("./dtos/PeopleSelfieResponse"), exports);
|
|
30
31
|
//enums
|
|
31
32
|
__exportStar(require("./enums/IdentificationDocumentStatus"), exports);
|
|
32
33
|
__exportStar(require("./enums/SexDocument"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
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 = {}));
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
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;
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
}
|
package/bin/{walletFunding/dtos/CancelFundingRequest.js → platformRbac/dtos/ResendOtpRequest.js}
RENAMED
|
@@ -9,25 +9,28 @@ 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.
|
|
12
|
+
exports.ResendOtpRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
13
14
|
const class_validator_1 = require("class-validator");
|
|
14
15
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* `
|
|
18
|
-
*
|
|
19
|
-
*
|
|
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).
|
|
20
21
|
*/
|
|
21
|
-
class
|
|
22
|
+
class ResendOtpRequest {
|
|
22
23
|
}
|
|
23
|
-
exports.
|
|
24
|
+
exports.ResendOtpRequest = ResendOtpRequest;
|
|
24
25
|
__decorate([
|
|
25
|
-
(0,
|
|
26
|
-
(0, class_validator_1.
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
27
|
+
(0, class_validator_1.IsEmail)(),
|
|
28
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
27
29
|
__metadata("design:type", String)
|
|
28
|
-
],
|
|
30
|
+
], ResendOtpRequest.prototype, "email", void 0);
|
|
29
31
|
__decorate([
|
|
32
|
+
(0, class_transformer_1.Expose)(),
|
|
30
33
|
(0, class_validator_1.IsString)(),
|
|
31
|
-
(0, class_validator_1.
|
|
34
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
32
35
|
__metadata("design:type", String)
|
|
33
|
-
],
|
|
36
|
+
], ResendOtpRequest.prototype, "tenantId", void 0);
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
}
|
|
@@ -9,23 +9,28 @@ 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.
|
|
12
|
+
exports.ResendSelfRegisterOtpRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
13
14
|
const class_validator_1 = require("class-validator");
|
|
14
|
-
|
|
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 {
|
|
15
23
|
}
|
|
16
|
-
exports.
|
|
24
|
+
exports.ResendSelfRegisterOtpRequest = ResendSelfRegisterOtpRequest;
|
|
17
25
|
__decorate([
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
18
27
|
(0, class_validator_1.IsString)(),
|
|
19
|
-
(0, class_validator_1.
|
|
28
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
20
29
|
__metadata("design:type", String)
|
|
21
|
-
],
|
|
30
|
+
], ResendSelfRegisterOtpRequest.prototype, "tenantId", void 0);
|
|
22
31
|
__decorate([
|
|
23
|
-
(0,
|
|
24
|
-
(0, class_validator_1.
|
|
25
|
-
|
|
26
|
-
], CancelFundingReferenceRequest.prototype, "directoryId", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, class_validator_1.IsString)(),
|
|
29
|
-
(0, class_validator_1.MaxLength)(64),
|
|
32
|
+
(0, class_transformer_1.Expose)(),
|
|
33
|
+
(0, class_validator_1.IsEmail)(),
|
|
34
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
30
35
|
__metadata("design:type", String)
|
|
31
|
-
],
|
|
36
|
+
], ResendSelfRegisterOtpRequest.prototype, "email", void 0);
|
package/package.json
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { IsInt, IsNotEmpty, IsPositive, IsString } from 'class-validator';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Respuesta del endpoint privado que devuelve la selfie del KYC de un usuario:
|
|
6
|
+
* el URL presignado de S3 (es el `userPhotoLink` del facematch) + su vigencia.
|
|
7
|
+
*
|
|
8
|
+
* Versión SIMPLIFICADA (sin `source` / `verificationId` / `lastModified`): el consumidor
|
|
9
|
+
* solo necesita el URL para el facematch y el nombre del archivo para trazabilidad.
|
|
10
|
+
*/
|
|
11
|
+
export class PeopleSelfieResponse {
|
|
12
|
+
@Expose() @IsString() @IsNotEmpty()
|
|
13
|
+
directoryId!: string;
|
|
14
|
+
|
|
15
|
+
/** URL presignado de S3 de la foto de cara (el `userPhotoLink` del facematch). */
|
|
16
|
+
@Expose() @IsString() @IsNotEmpty()
|
|
17
|
+
url!: string;
|
|
18
|
+
|
|
19
|
+
/** Nombre del archivo en S3, sin el prefijo `USER/{directoryId}/`. */
|
|
20
|
+
@Expose() @IsString() @IsNotEmpty()
|
|
21
|
+
key!: string;
|
|
22
|
+
|
|
23
|
+
/** Vigencia del presigned URL en segundos. */
|
|
24
|
+
@Expose() @IsInt() @IsPositive()
|
|
25
|
+
expiresInSeconds!: number;
|
|
26
|
+
}
|
package/src/identity/index.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from './dtos/UploadDocumentFile';
|
|
|
12
12
|
export * from './dtos/PeopleSelfVerifiedRequest';
|
|
13
13
|
export * from './dtos/AgentDocumentKeyResponse';
|
|
14
14
|
export * from './dtos/DocumentUploadResponse';
|
|
15
|
+
export * from './dtos/PeopleSelfieResponse';
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
//enums
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
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 = {}));
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,46 +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.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);
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
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 = {}));
|
|
@@ -1,7 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -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
|
-
reference: 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,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
|
-
reference?: string;
|
|
7
|
-
}
|