@silexpert/core 1.3.185-0 → 1.3.186-1
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/api/resources/Mfa.d.ts +1 -0
- package/dist/cjs/api/resources/Mfa.d.ts.map +1 -1
- package/dist/cjs/api/resources/Mfa.js +4 -0
- package/dist/cjs/api/resources/Mfa.js.map +1 -1
- package/dist/cjs/api/resources/Society.d.ts +1 -2
- package/dist/cjs/api/resources/Society.d.ts.map +1 -1
- package/dist/cjs/api/resources/Society.js +0 -3
- package/dist/cjs/api/resources/Society.js.map +1 -1
- 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/Enum/PriceGridClementine.d.ts.map +1 -1
- package/dist/cjs/types/Enum/PriceGridClementine.js +478 -482
- package/dist/cjs/types/Enum/PriceGridClementine.js.map +1 -1
- 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/FinalizeMobileApprovalDto.d.ts +4 -0
- package/dist/cjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.js +21 -0
- package/dist/cjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.js.map +1 -0
- package/dist/cjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.d.ts +0 -17
- package/dist/cjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.js +1 -4
- package/dist/cjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.js.map +1 -1
- package/dist/cjs/types/Interface/api/authentification/SetMobileApprovalDto.d.ts +5 -0
- package/dist/cjs/types/Interface/api/authentification/SetMobileApprovalDto.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/authentification/SetMobileApprovalDto.js +27 -0
- package/dist/cjs/types/Interface/api/authentification/SetMobileApprovalDto.js.map +1 -0
- package/dist/cjs/types/Interface/api/authentification/loginApproval.d.ts +66 -0
- package/dist/cjs/types/Interface/api/authentification/loginApproval.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/authentification/loginApproval.js +26 -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 +2 -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 +6 -0
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js +6 -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/api/resources/Mfa.d.ts +1 -0
- package/dist/mjs/api/resources/Mfa.d.ts.map +1 -1
- package/dist/mjs/api/resources/Mfa.js +4 -0
- package/dist/mjs/api/resources/Mfa.js.map +1 -1
- package/dist/mjs/api/resources/Society.d.ts +1 -2
- package/dist/mjs/api/resources/Society.d.ts.map +1 -1
- package/dist/mjs/api/resources/Society.js +0 -3
- package/dist/mjs/api/resources/Society.js.map +1 -1
- 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/Enum/PriceGridClementine.d.ts.map +1 -1
- package/dist/mjs/types/Enum/PriceGridClementine.js +474 -486
- package/dist/mjs/types/Enum/PriceGridClementine.js.map +1 -1
- 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/FinalizeMobileApprovalDto.d.ts +4 -0
- package/dist/mjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.js +18 -0
- package/dist/mjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.js.map +1 -0
- package/dist/mjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.d.ts +0 -17
- package/dist/mjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.js +0 -7
- package/dist/mjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.js.map +1 -1
- package/dist/mjs/types/Interface/api/authentification/SetMobileApprovalDto.d.ts +5 -0
- package/dist/mjs/types/Interface/api/authentification/SetMobileApprovalDto.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/authentification/SetMobileApprovalDto.js +25 -0
- package/dist/mjs/types/Interface/api/authentification/SetMobileApprovalDto.js.map +1 -0
- package/dist/mjs/types/Interface/api/authentification/loginApproval.d.ts +66 -0
- package/dist/mjs/types/Interface/api/authentification/loginApproval.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/authentification/loginApproval.js +23 -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 +2 -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 +6 -0
- package/dist/mjs/types/index.d.ts.map +1 -1
- package/dist/mjs/types/index.js +6 -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/api/resources/Mfa.ts +6 -0
- package/ts/api/resources/Society.ts +0 -5
- package/ts/types/Enum/LoginApprovalStatus.ts +13 -0
- package/ts/types/Enum/MfaMode.ts +11 -0
- package/ts/types/Enum/PriceGridClementine.ts +474 -487
- package/ts/types/Interface/api/authentification/AuthenticationResponse.ts +10 -0
- package/ts/types/Interface/api/authentification/FinalizeMobileApprovalDto.ts +6 -0
- package/ts/types/Interface/api/authentification/ReadAuthenticateCollaborater.ts +0 -18
- package/ts/types/Interface/api/authentification/SetMobileApprovalDto.ts +11 -0
- package/ts/types/Interface/api/authentification/loginApproval.ts +75 -0
- package/ts/types/Interface/models/ILoginApproval.ts +31 -0
- package/ts/types/Interface/models/IUser.ts +2 -0
- package/ts/types/index.ts +6 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Resource } from '../Resource';
|
|
2
|
+
import { ILoginApprovalStatusResponse } from '../../types/Interface/api/authentification/loginApproval';
|
|
3
|
+
|
|
4
|
+
export class LoginApproval extends Resource {
|
|
5
|
+
approve(requestId: string, deviceId: string): Promise<{ message: string; status: string }> {
|
|
6
|
+
return this.axios.$post(`/auth/approvals/${requestId}/approve`, { deviceId });
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
deny(requestId: string, deviceId: string): Promise<{ message: string; status: string }> {
|
|
10
|
+
return this.axios.$post(`/auth/approvals/${requestId}/deny`, { deviceId });
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
getStatus(requestId: string): Promise<ILoginApprovalStatusResponse> {
|
|
14
|
+
return this.axios.$get(`/auth/approvals/${requestId}/status`);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
cleanup(): Promise<{ deleted: number; message: string }> {
|
|
18
|
+
return this.axios.$post('/auth/approvals/cleanup');
|
|
19
|
+
}
|
|
20
|
+
}
|
package/ts/api/resources/Mfa.ts
CHANGED
|
@@ -26,4 +26,10 @@ export class UserMfa extends Resource {
|
|
|
26
26
|
// Si userId est fourni, l'envoyer en query param, sinon vérifier l'user connecté
|
|
27
27
|
return this.axios.$get('/mfa/is-enabled', userId ? { params: { userId } } : undefined);
|
|
28
28
|
}
|
|
29
|
+
|
|
30
|
+
///// Mobile Approval MFA /////
|
|
31
|
+
|
|
32
|
+
setMobileApproval(userId: number, enable: boolean): Promise<void> {
|
|
33
|
+
return this.axios.$post('/mfa/mobile-approval', { userId, enable });
|
|
34
|
+
}
|
|
29
35
|
}
|
|
@@ -30,7 +30,6 @@ import {
|
|
|
30
30
|
DataCustomersCsv,
|
|
31
31
|
ReadCurrentPrestations,
|
|
32
32
|
QueryToArchivedSociety,
|
|
33
|
-
ReadFeatureAccess,
|
|
34
33
|
} from '../../types';
|
|
35
34
|
import { CancelToken } from 'axios';
|
|
36
35
|
|
|
@@ -206,8 +205,4 @@ export class Society extends Resource {
|
|
|
206
205
|
},
|
|
207
206
|
});
|
|
208
207
|
}
|
|
209
|
-
|
|
210
|
-
getAllFeatures(idSociety: number): Promise<ReadFeatureAccess> {
|
|
211
|
-
return this.axios.$get(`/societies/${idSociety}/features`);
|
|
212
|
-
}
|
|
213
208
|
}
|
|
@@ -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
|
+
}
|