@silexpert/core 1.3.159 → 1.3.160-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/dist/cjs/api/resources/LoginApproval.d.ts +18 -0
- package/dist/cjs/api/resources/LoginApproval.d.ts.map +1 -0
- package/dist/cjs/api/resources/LoginApproval.js +20 -0
- package/dist/cjs/api/resources/LoginApproval.js.map +1 -0
- package/dist/cjs/types/Enum/LoginApprovalStatus.d.ts +14 -0
- package/dist/cjs/types/Enum/LoginApprovalStatus.d.ts.map +1 -0
- package/dist/cjs/types/Enum/LoginApprovalStatus.js +18 -0
- package/dist/cjs/types/Enum/LoginApprovalStatus.js.map +1 -0
- package/dist/cjs/types/Enum/MfaMode.d.ts +12 -0
- package/dist/cjs/types/Enum/MfaMode.d.ts.map +1 -0
- package/dist/cjs/types/Enum/MfaMode.js +16 -0
- package/dist/cjs/types/Enum/MfaMode.js.map +1 -0
- package/dist/cjs/types/Interface/api/authentification/AuthenticationResponse.d.ts +10 -0
- package/dist/cjs/types/Interface/api/authentification/AuthenticationResponse.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/authentification/AuthenticationResponse.js.map +1 -1
- package/dist/cjs/types/Interface/api/authentification/loginApproval.d.ts +65 -0
- package/dist/cjs/types/Interface/api/authentification/loginApproval.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/authentification/loginApproval.js +3 -0
- package/dist/cjs/types/Interface/api/authentification/loginApproval.js.map +1 -0
- package/dist/cjs/types/Interface/models/ILoginApproval.d.ts +31 -0
- package/dist/cjs/types/Interface/models/ILoginApproval.d.ts.map +1 -0
- package/dist/cjs/types/Interface/models/ILoginApproval.js +3 -0
- package/dist/cjs/types/Interface/models/ILoginApproval.js.map +1 -0
- package/dist/cjs/types/Interface/models/IUser.d.ts +1 -0
- package/dist/cjs/types/Interface/models/IUser.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IUser.js.map +1 -1
- package/dist/cjs/types/index.d.ts +5 -0
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js +5 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/mjs/api/resources/LoginApproval.d.ts +18 -0
- package/dist/mjs/api/resources/LoginApproval.d.ts.map +1 -0
- package/dist/mjs/api/resources/LoginApproval.js +16 -0
- package/dist/mjs/api/resources/LoginApproval.js.map +1 -0
- package/dist/mjs/types/Enum/LoginApprovalStatus.d.ts +14 -0
- package/dist/mjs/types/Enum/LoginApprovalStatus.d.ts.map +1 -0
- package/dist/mjs/types/Enum/LoginApprovalStatus.js +15 -0
- package/dist/mjs/types/Enum/LoginApprovalStatus.js.map +1 -0
- package/dist/mjs/types/Enum/MfaMode.d.ts +12 -0
- package/dist/mjs/types/Enum/MfaMode.d.ts.map +1 -0
- package/dist/mjs/types/Enum/MfaMode.js +13 -0
- package/dist/mjs/types/Enum/MfaMode.js.map +1 -0
- package/dist/mjs/types/Interface/api/authentification/AuthenticationResponse.d.ts +10 -0
- package/dist/mjs/types/Interface/api/authentification/AuthenticationResponse.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/authentification/AuthenticationResponse.js.map +1 -1
- package/dist/mjs/types/Interface/api/authentification/loginApproval.d.ts +65 -0
- package/dist/mjs/types/Interface/api/authentification/loginApproval.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/authentification/loginApproval.js +2 -0
- package/dist/mjs/types/Interface/api/authentification/loginApproval.js.map +1 -0
- package/dist/mjs/types/Interface/models/ILoginApproval.d.ts +31 -0
- package/dist/mjs/types/Interface/models/ILoginApproval.d.ts.map +1 -0
- package/dist/mjs/types/Interface/models/ILoginApproval.js +2 -0
- package/dist/mjs/types/Interface/models/ILoginApproval.js.map +1 -0
- package/dist/mjs/types/Interface/models/IUser.d.ts +1 -0
- package/dist/mjs/types/Interface/models/IUser.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IUser.js.map +1 -1
- package/dist/mjs/types/index.d.ts +5 -0
- package/dist/mjs/types/index.d.ts.map +1 -1
- package/dist/mjs/types/index.js +5 -0
- package/dist/mjs/types/index.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/LoginApproval.ts +20 -0
- package/ts/types/Enum/LoginApprovalStatus.ts +13 -0
- package/ts/types/Enum/MfaMode.ts +11 -0
- package/ts/types/Interface/api/authentification/AuthenticationResponse.ts +10 -0
- package/ts/types/Interface/api/authentification/loginApproval.ts +69 -0
- package/ts/types/Interface/models/ILoginApproval.ts +31 -0
- package/ts/types/Interface/models/IUser.ts +1 -0
- package/ts/types/index.ts +5 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Statuts possibles d'une demande d'approbation de connexion mobile
|
|
3
|
+
*/
|
|
4
|
+
export enum LoginApprovalStatus {
|
|
5
|
+
/** En attente de validation par le mobile */
|
|
6
|
+
PENDING = 'pending',
|
|
7
|
+
/** Approuvée par l'utilisateur sur son mobile */
|
|
8
|
+
APPROVED = 'approved',
|
|
9
|
+
/** Refusée par l'utilisateur sur son mobile */
|
|
10
|
+
DENIED = 'denied',
|
|
11
|
+
/** Expirée (timeout dépassé sans action) */
|
|
12
|
+
EXPIRED = 'expired',
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Modes de double authentification disponibles
|
|
3
|
+
*/
|
|
4
|
+
export enum MfaMode {
|
|
5
|
+
/** Pas de MFA activée */
|
|
6
|
+
NONE = 'none',
|
|
7
|
+
/** Authentification via code TOTP (Google Authenticator, etc.) */
|
|
8
|
+
TOTP = 'totp',
|
|
9
|
+
/** Validation via notification sur l'application mobile */
|
|
10
|
+
MOBILE_APPROVAL = 'mobile_approval',
|
|
11
|
+
}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
export interface IAuthenticationResponse {
|
|
2
|
+
/** TOTP MFA requis (classique avec code à 6 chiffres) */
|
|
2
3
|
requiresMfa?: boolean;
|
|
4
|
+
/** Mobile approval MFA requis (validation sur l'app mobile) */
|
|
5
|
+
requiresMobileApproval?: boolean;
|
|
6
|
+
/** ID de la demande d'approbation (pour polling/tracking) */
|
|
7
|
+
requestId?: string;
|
|
8
|
+
/** Date d'expiration de la demande */
|
|
9
|
+
expiresAt?: Date;
|
|
10
|
+
/** ID de l'utilisateur */
|
|
3
11
|
userId?: number;
|
|
12
|
+
/** Message informatif */
|
|
4
13
|
message?: string;
|
|
14
|
+
/** Token JWT si authentification réussie */
|
|
5
15
|
token?: string;
|
|
6
16
|
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { LoginApprovalStatus } from '../../../Enum/LoginApprovalStatus';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Payload de l'événement socket envoyé au mobile lors d'une demande de connexion
|
|
5
|
+
*/
|
|
6
|
+
export interface ILoginApprovalRequestEvent {
|
|
7
|
+
/** ID unique de la demande */
|
|
8
|
+
requestId: string;
|
|
9
|
+
/** Date d'expiration */
|
|
10
|
+
expiresAt: Date;
|
|
11
|
+
/** ID de l'utilisateur */
|
|
12
|
+
userId: number;
|
|
13
|
+
/** Métadonnées (IP, navigateur, localisation) */
|
|
14
|
+
metadata?: {
|
|
15
|
+
ip?: string;
|
|
16
|
+
userAgent?: string;
|
|
17
|
+
location?: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Payload de l'événement socket envoyé au Web lors d'un changement de statut
|
|
23
|
+
*/
|
|
24
|
+
export interface ILoginApprovalStatusEvent {
|
|
25
|
+
/** ID de la demande */
|
|
26
|
+
requestId: string;
|
|
27
|
+
/** Nouveau statut */
|
|
28
|
+
status: LoginApprovalStatus;
|
|
29
|
+
/** Date de la transition */
|
|
30
|
+
timestamp: Date;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Réponse renvoyée au Web lorsque mobile MFA est requis
|
|
35
|
+
*/
|
|
36
|
+
export interface ILoginApprovalResponse {
|
|
37
|
+
/** Indique qu'une validation mobile est nécessaire */
|
|
38
|
+
requiresMobileApproval: true;
|
|
39
|
+
/** ID de la demande pour polling/tracking */
|
|
40
|
+
requestId: string;
|
|
41
|
+
/** Date d'expiration de la demande */
|
|
42
|
+
expiresAt: Date;
|
|
43
|
+
/** ID utilisateur */
|
|
44
|
+
userId: number;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Réponse du statut d'une demande d'approbation
|
|
49
|
+
*/
|
|
50
|
+
export interface ILoginApprovalStatusResponse {
|
|
51
|
+
/** ID de la demande */
|
|
52
|
+
requestId: string;
|
|
53
|
+
/** Statut actuel */
|
|
54
|
+
status: LoginApprovalStatus;
|
|
55
|
+
/** Date d'expiration */
|
|
56
|
+
expiresAt: Date;
|
|
57
|
+
/** Token JWT si status = approved */
|
|
58
|
+
token?: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* DTO pour approuver/refuser une demande depuis le mobile
|
|
63
|
+
*/
|
|
64
|
+
export interface IApproveOrDenyRequest {
|
|
65
|
+
/** ID de la demande */
|
|
66
|
+
requestId: string;
|
|
67
|
+
/** Device ID du mobile (pour audit) */
|
|
68
|
+
deviceId: string;
|
|
69
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { LoginApprovalStatus } from '../../Enum/LoginApprovalStatus';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Interface représentant une demande d'approbation de connexion mobile
|
|
5
|
+
*/
|
|
6
|
+
export interface ILoginApproval {
|
|
7
|
+
/** Identifiant unique (UUID) */
|
|
8
|
+
id: string;
|
|
9
|
+
/** ID de l'utilisateur demandant la connexion */
|
|
10
|
+
idUser: number;
|
|
11
|
+
/** Statut actuel de la demande */
|
|
12
|
+
status: LoginApprovalStatus;
|
|
13
|
+
/** Date d'expiration de la demande (généralement 2-3 min après création) */
|
|
14
|
+
expiresAt: Date;
|
|
15
|
+
/** Date d'approbation (si status = approved) */
|
|
16
|
+
approvedAt?: Date;
|
|
17
|
+
/** Date de refus (si status = denied) */
|
|
18
|
+
deniedAt?: Date;
|
|
19
|
+
/** Device ID du mobile ayant approuvé/refusé */
|
|
20
|
+
deviceIdUsed?: string;
|
|
21
|
+
/** IP de la connexion Web à l'origine de la demande */
|
|
22
|
+
ip?: string;
|
|
23
|
+
/** User-Agent du navigateur Web */
|
|
24
|
+
userAgent?: string;
|
|
25
|
+
/** Métadonnées additionnelles (géoloc, risk score, etc.) */
|
|
26
|
+
metadata?: Record<string, any>;
|
|
27
|
+
/** Date de création */
|
|
28
|
+
createdAt: Date;
|
|
29
|
+
/** Date de mise à jour */
|
|
30
|
+
updatedAt: Date;
|
|
31
|
+
}
|
|
@@ -52,6 +52,7 @@ export interface IUser {
|
|
|
52
52
|
prefix?: string | null;
|
|
53
53
|
tokenLostPassword?: string | null;
|
|
54
54
|
twoFactorEnabled?: boolean | null;
|
|
55
|
+
mfaMode?: 'none' | 'totp' | 'mobile_approval';
|
|
55
56
|
tokenApi?: string | null;
|
|
56
57
|
tokenNotification?: string | null;
|
|
57
58
|
tokenSocket?: string | null;
|
package/ts/types/index.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from './Interface/models/ICallHistory';
|
|
|
3
3
|
export * from './Interface/models/IBusinessLineUser';
|
|
4
4
|
export * from './Interface/models/IVisualizedInformation';
|
|
5
5
|
export * from './Interface/models/IApiError';
|
|
6
|
+
export * from './Interface/models/ILoginApproval';
|
|
6
7
|
export * from './Interface/models/ISms';
|
|
7
8
|
export * from './Interface/models/IAccessToken';
|
|
8
9
|
export * from './Interface/models/IAccountDetail';
|
|
@@ -338,6 +339,8 @@ export * from './Enum/Feature';
|
|
|
338
339
|
export * from './Enum/AutomaticRegistration';
|
|
339
340
|
export * from './Enum/IntermediateManagementRebate';
|
|
340
341
|
export * from './Enum/Das';
|
|
342
|
+
export * from './Enum/LoginApprovalStatus';
|
|
343
|
+
export * from './Enum/MfaMode';
|
|
341
344
|
export * from './Enum/ChangeLog';
|
|
342
345
|
export * from './Enum/VisualizedInformation';
|
|
343
346
|
export * from './Enum/NafCode';
|
|
@@ -559,6 +562,7 @@ export * from './Enum/PaymentAttempt';
|
|
|
559
562
|
// Interfaces API
|
|
560
563
|
export * from './Interface/api/authentification/AuthenticationResponse';
|
|
561
564
|
export * from './Interface/api/exercice/ReadExercice';
|
|
565
|
+
export * from './Interface/api/authentification/AuthenticationResponse';
|
|
562
566
|
export * from './Interface/api/balanceSheet/consistency/Read';
|
|
563
567
|
export * from './Interface/api/kilometricAllowance/ReadKilometricAllowance';
|
|
564
568
|
export * from './Interface/api/cashAndExpense/Query';
|
|
@@ -1053,6 +1057,7 @@ export * from './Interface/api/changelog/Create';
|
|
|
1053
1057
|
export * from './Interface/api/authentification/ReadAuthenticateCollaborater';
|
|
1054
1058
|
export * from './Interface/api/authentification/ResetPassword';
|
|
1055
1059
|
export * from './Interface/api/authentification/ForgotPassword';
|
|
1060
|
+
export * from './Interface/api/authentification/loginApproval';
|
|
1056
1061
|
export * from './Interface/api/society/Export';
|
|
1057
1062
|
export * from './Interface/api/society/State';
|
|
1058
1063
|
export * from './Interface/api/businessSector/Create';
|