@fiado/type-kit 3.99.1 → 3.99.2
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/emailVerification/dtos/EmailConfirmRequest.test.ts +38 -0
- package/_test_/unit/emailVerification/dtos/EmailVerificationStartRequest.test.ts +44 -0
- package/_test_/unit/emailVerification/dtos/internal/PrimaryEmailByDirectoryRequest.test.ts +22 -0
- package/_test_/unit/emailVerification/enums/EmailVerificationStatusEnum.test.ts +17 -0
- package/bin/cognitoBackofficeConnector/dtos/MfaPoolConfig.d.ts +7 -0
- package/bin/cognitoBackofficeConnector/dtos/MfaPoolConfig.js +36 -0
- package/bin/cognitoBackofficeConnector/dtos/PoolConfigResponse.d.ts +20 -0
- package/bin/cognitoBackofficeConnector/dtos/PoolConfigResponse.js +11 -0
- package/bin/cognitoBackofficeConnector/dtos/PoolsListResponse.d.ts +4 -0
- package/bin/cognitoBackofficeConnector/dtos/PoolsListResponse.js +6 -0
- package/bin/cognitoBackofficeConnector/validators/MfaTypesRequiresOne.d.ts +17 -0
- package/bin/cognitoBackofficeConnector/validators/MfaTypesRequiresOne.js +39 -0
- package/bin/emailVerification/dtos/EmailConfirmRequest.d.ts +9 -0
- package/bin/emailVerification/dtos/EmailConfirmRequest.js +34 -0
- package/bin/emailVerification/dtos/EmailDeleteRequest.d.ts +7 -0
- package/bin/emailVerification/dtos/EmailDeleteRequest.js +30 -0
- package/bin/emailVerification/dtos/EmailDeleteResponse.d.ts +7 -0
- package/bin/emailVerification/dtos/EmailDeleteResponse.js +27 -0
- package/bin/emailVerification/dtos/EmailItem.d.ts +12 -0
- package/bin/emailVerification/dtos/EmailItem.js +41 -0
- package/bin/emailVerification/dtos/EmailListResponse.d.ts +7 -0
- package/bin/emailVerification/dtos/EmailListResponse.js +23 -0
- package/bin/emailVerification/dtos/EmailSetPrincipalRequest.d.ts +7 -0
- package/bin/emailVerification/dtos/EmailSetPrincipalRequest.js +30 -0
- package/bin/emailVerification/dtos/EmailSetPrincipalResponse.d.ts +7 -0
- package/bin/emailVerification/dtos/EmailSetPrincipalResponse.js +27 -0
- package/bin/emailVerification/dtos/EmailVerificationResendRequest.d.ts +7 -0
- package/bin/emailVerification/dtos/EmailVerificationResendRequest.js +30 -0
- package/bin/emailVerification/dtos/EmailVerificationResendResponse.d.ts +8 -0
- package/bin/emailVerification/dtos/EmailVerificationResendResponse.js +28 -0
- package/bin/emailVerification/dtos/EmailVerificationStartRequest.d.ts +9 -0
- package/bin/emailVerification/dtos/EmailVerificationStartRequest.js +32 -0
- package/bin/emailVerification/dtos/EmailVerificationStartResponse.d.ts +9 -0
- package/bin/emailVerification/dtos/EmailVerificationStartResponse.js +32 -0
- package/bin/emailVerification/dtos/EmailVerificationStatusRequest.d.ts +7 -0
- package/bin/emailVerification/dtos/EmailVerificationStatusRequest.js +30 -0
- package/bin/emailVerification/dtos/EmailVerificationStatusResponse.d.ts +10 -0
- package/bin/emailVerification/dtos/EmailVerificationStatusResponse.js +36 -0
- package/bin/emailVerification/dtos/internal/EmailsByDirectoryRequest.d.ts +6 -0
- package/bin/emailVerification/dtos/internal/EmailsByDirectoryRequest.js +25 -0
- package/bin/emailVerification/dtos/internal/EmailsByDirectoryResponse.d.ts +7 -0
- package/bin/emailVerification/dtos/internal/EmailsByDirectoryResponse.js +23 -0
- package/bin/emailVerification/dtos/internal/PrimaryEmailByDirectoryRequest.d.ts +7 -0
- package/bin/emailVerification/dtos/internal/PrimaryEmailByDirectoryRequest.js +26 -0
- package/bin/emailVerification/dtos/internal/PrimaryEmailResponse.d.ts +9 -0
- package/bin/emailVerification/dtos/internal/PrimaryEmailResponse.js +32 -0
- package/bin/emailVerification/enums/EmailVerificationStatusEnum.d.ts +15 -0
- package/bin/emailVerification/enums/EmailVerificationStatusEnum.js +19 -0
- package/bin/emailVerification/index.d.ts +18 -0
- package/bin/emailVerification/index.js +34 -0
- package/bin/index.d.ts +1 -0
- package/bin/index.js +2 -1
- package/bin/rbac/enums/PoolKind.d.ts +16 -0
- package/bin/rbac/enums/PoolKind.js +20 -0
- package/bin/rbac/index.d.ts +1 -0
- package/bin/rbac/index.js +17 -0
- package/package.json +1 -1
- package/src/emailVerification/dtos/EmailConfirmRequest.ts +19 -0
- package/src/emailVerification/dtos/EmailDeleteRequest.ts +15 -0
- package/src/emailVerification/dtos/EmailDeleteResponse.ts +12 -0
- package/src/emailVerification/dtos/EmailItem.ts +23 -0
- package/src/emailVerification/dtos/EmailListResponse.ts +10 -0
- package/src/emailVerification/dtos/EmailSetPrincipalRequest.ts +15 -0
- package/src/emailVerification/dtos/EmailSetPrincipalResponse.ts +12 -0
- package/src/emailVerification/dtos/EmailVerificationResendRequest.ts +15 -0
- package/src/emailVerification/dtos/EmailVerificationResendResponse.ts +13 -0
- package/src/emailVerification/dtos/EmailVerificationStartRequest.ts +17 -0
- package/src/emailVerification/dtos/EmailVerificationStartResponse.ts +16 -0
- package/src/emailVerification/dtos/EmailVerificationStatusRequest.ts +15 -0
- package/src/emailVerification/dtos/EmailVerificationStatusResponse.ts +19 -0
- package/src/emailVerification/dtos/internal/EmailsByDirectoryRequest.ts +11 -0
- package/src/emailVerification/dtos/internal/EmailsByDirectoryResponse.ts +10 -0
- package/src/emailVerification/dtos/internal/PrimaryEmailByDirectoryRequest.ts +12 -0
- package/src/emailVerification/dtos/internal/PrimaryEmailResponse.ts +16 -0
- package/src/emailVerification/enums/EmailVerificationStatusEnum.ts +15 -0
- package/src/emailVerification/index.ts +18 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { IsEmail, IsString } from 'class-validator';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Body para reenviar el correo de verificación de un email ya iniciado.
|
|
6
|
+
*/
|
|
7
|
+
export class EmailVerificationResendRequest {
|
|
8
|
+
@Expose()
|
|
9
|
+
@IsString()
|
|
10
|
+
directoryId!: string;
|
|
11
|
+
|
|
12
|
+
@Expose()
|
|
13
|
+
@IsEmail()
|
|
14
|
+
email!: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { EmailVerificationStatusEnum } from '../enums/EmailVerificationStatusEnum';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Respuesta al reenviar el correo de verificación.
|
|
6
|
+
*/
|
|
7
|
+
export class EmailVerificationResendResponse {
|
|
8
|
+
@Expose()
|
|
9
|
+
verificationId!: string;
|
|
10
|
+
|
|
11
|
+
@Expose()
|
|
12
|
+
status!: EmailVerificationStatusEnum;
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { IsEmail, IsString } from 'class-validator';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Body para iniciar la verificación de un email asociado a un directorio.
|
|
6
|
+
* `directoryId` es @IsString (NO @IsUUID): el cognitoSub de backoffice es UUID v7
|
|
7
|
+
* y rompe la validación @IsUUID de class-validator.
|
|
8
|
+
*/
|
|
9
|
+
export class EmailVerificationStartRequest {
|
|
10
|
+
@Expose()
|
|
11
|
+
@IsString()
|
|
12
|
+
directoryId!: string;
|
|
13
|
+
|
|
14
|
+
@Expose()
|
|
15
|
+
@IsEmail()
|
|
16
|
+
email!: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { EmailVerificationStatusEnum } from '../enums/EmailVerificationStatusEnum';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Respuesta al iniciar la verificación de un email.
|
|
6
|
+
*/
|
|
7
|
+
export class EmailVerificationStartResponse {
|
|
8
|
+
@Expose()
|
|
9
|
+
verificationId!: string;
|
|
10
|
+
|
|
11
|
+
@Expose()
|
|
12
|
+
email!: string;
|
|
13
|
+
|
|
14
|
+
@Expose()
|
|
15
|
+
status!: EmailVerificationStatusEnum;
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { IsEmail, IsString } from 'class-validator';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Body para consultar el estado de verificación de un email.
|
|
6
|
+
*/
|
|
7
|
+
export class EmailVerificationStatusRequest {
|
|
8
|
+
@Expose()
|
|
9
|
+
@IsString()
|
|
10
|
+
directoryId!: string;
|
|
11
|
+
|
|
12
|
+
@Expose()
|
|
13
|
+
@IsEmail()
|
|
14
|
+
email!: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { EmailVerificationStatusEnum } from '../enums/EmailVerificationStatusEnum';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Estado de verificación de un email puntual de un directorio.
|
|
6
|
+
*/
|
|
7
|
+
export class EmailVerificationStatusResponse {
|
|
8
|
+
@Expose()
|
|
9
|
+
email!: string;
|
|
10
|
+
|
|
11
|
+
@Expose()
|
|
12
|
+
status!: EmailVerificationStatusEnum;
|
|
13
|
+
|
|
14
|
+
@Expose()
|
|
15
|
+
isVerified!: boolean;
|
|
16
|
+
|
|
17
|
+
@Expose()
|
|
18
|
+
isPrincipal!: boolean;
|
|
19
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { IsString } from 'class-validator';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Request interno (api-invoker) para listar todos los emails de un directorio.
|
|
6
|
+
*/
|
|
7
|
+
export class EmailsByDirectoryRequest {
|
|
8
|
+
@Expose()
|
|
9
|
+
@IsString()
|
|
10
|
+
directoryId!: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { EmailItem } from '../EmailItem';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Lista interna de emails de un directorio. Reutiliza el EmailItem público.
|
|
6
|
+
*/
|
|
7
|
+
export class EmailsByDirectoryResponse {
|
|
8
|
+
@Expose()
|
|
9
|
+
items!: EmailItem[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { IsString } from 'class-validator';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Request interno (api-invoker) para obtener el email principal de un directorio.
|
|
6
|
+
* `directoryId` es @IsString (cognitoSub UUID v7 — no usar @IsUUID).
|
|
7
|
+
*/
|
|
8
|
+
export class PrimaryEmailByDirectoryRequest {
|
|
9
|
+
@Expose()
|
|
10
|
+
@IsString()
|
|
11
|
+
directoryId!: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Email principal de un directorio. `email` es null si el directorio todavía
|
|
5
|
+
* no tiene un email principal definido.
|
|
6
|
+
*/
|
|
7
|
+
export class PrimaryEmailResponse {
|
|
8
|
+
@Expose()
|
|
9
|
+
directoryId!: string;
|
|
10
|
+
|
|
11
|
+
@Expose()
|
|
12
|
+
email!: string | null;
|
|
13
|
+
|
|
14
|
+
@Expose()
|
|
15
|
+
isVerified!: boolean;
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Estado del flujo de verificación de un email asociado a un directorio.
|
|
3
|
+
* PENDING: creado, todavía no se envió el correo.
|
|
4
|
+
* SENT: correo de verificación enviado.
|
|
5
|
+
* VERIFIED: el usuario confirmó el email vía el link.
|
|
6
|
+
* EXPIRED: el token de verificación venció sin confirmarse.
|
|
7
|
+
* FAILED: el envío o la verificación falló de forma terminal.
|
|
8
|
+
*/
|
|
9
|
+
export enum EmailVerificationStatusEnum {
|
|
10
|
+
PENDING = 'PENDING',
|
|
11
|
+
SENT = 'SENT',
|
|
12
|
+
VERIFIED = 'VERIFIED',
|
|
13
|
+
EXPIRED = 'EXPIRED',
|
|
14
|
+
FAILED = 'FAILED',
|
|
15
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export * from './enums/EmailVerificationStatusEnum';
|
|
2
|
+
export * from './dtos/EmailVerificationStartRequest';
|
|
3
|
+
export * from './dtos/EmailVerificationStartResponse';
|
|
4
|
+
export * from './dtos/EmailVerificationResendRequest';
|
|
5
|
+
export * from './dtos/EmailVerificationResendResponse';
|
|
6
|
+
export * from './dtos/EmailVerificationStatusRequest';
|
|
7
|
+
export * from './dtos/EmailVerificationStatusResponse';
|
|
8
|
+
export * from './dtos/EmailItem';
|
|
9
|
+
export * from './dtos/EmailListResponse';
|
|
10
|
+
export * from './dtos/EmailSetPrincipalRequest';
|
|
11
|
+
export * from './dtos/EmailSetPrincipalResponse';
|
|
12
|
+
export * from './dtos/EmailDeleteRequest';
|
|
13
|
+
export * from './dtos/EmailDeleteResponse';
|
|
14
|
+
export * from './dtos/EmailConfirmRequest';
|
|
15
|
+
export * from './dtos/internal/PrimaryEmailByDirectoryRequest';
|
|
16
|
+
export * from './dtos/internal/PrimaryEmailResponse';
|
|
17
|
+
export * from './dtos/internal/EmailsByDirectoryRequest';
|
|
18
|
+
export * from './dtos/internal/EmailsByDirectoryResponse';
|
package/src/index.ts
CHANGED
|
@@ -88,5 +88,6 @@ export * as TotpSecurity from './totpSecurity';
|
|
|
88
88
|
// NetworkConnector: módulo del lambda fiado-network-business (Access Card / Digital Business Card).
|
|
89
89
|
// Contiene DTOs y enums para perfiles, leads, lead groups y fotos.
|
|
90
90
|
export * as NetworkConnector from './networkConnector';
|
|
91
|
+
export * as EmailVerification from './emailVerification';
|
|
91
92
|
export * from './messaging';
|
|
92
93
|
export * from './complaint';
|