@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.
Files changed (121) hide show
  1. package/dist/cjs/api/resources/LoginApproval.d.ts +18 -0
  2. package/dist/cjs/api/resources/LoginApproval.d.ts.map +1 -0
  3. package/dist/cjs/api/resources/LoginApproval.js +20 -0
  4. package/dist/cjs/api/resources/LoginApproval.js.map +1 -0
  5. package/dist/cjs/api/resources/Mfa.d.ts +1 -0
  6. package/dist/cjs/api/resources/Mfa.d.ts.map +1 -1
  7. package/dist/cjs/api/resources/Mfa.js +4 -0
  8. package/dist/cjs/api/resources/Mfa.js.map +1 -1
  9. package/dist/cjs/api/resources/Society.d.ts +1 -2
  10. package/dist/cjs/api/resources/Society.d.ts.map +1 -1
  11. package/dist/cjs/api/resources/Society.js +0 -3
  12. package/dist/cjs/api/resources/Society.js.map +1 -1
  13. package/dist/cjs/types/Enum/LoginApprovalStatus.d.ts +14 -0
  14. package/dist/cjs/types/Enum/LoginApprovalStatus.d.ts.map +1 -0
  15. package/dist/cjs/types/Enum/LoginApprovalStatus.js +18 -0
  16. package/dist/cjs/types/Enum/LoginApprovalStatus.js.map +1 -0
  17. package/dist/cjs/types/Enum/MfaMode.d.ts +12 -0
  18. package/dist/cjs/types/Enum/MfaMode.d.ts.map +1 -0
  19. package/dist/cjs/types/Enum/MfaMode.js +16 -0
  20. package/dist/cjs/types/Enum/MfaMode.js.map +1 -0
  21. package/dist/cjs/types/Enum/PriceGridClementine.d.ts.map +1 -1
  22. package/dist/cjs/types/Enum/PriceGridClementine.js +478 -482
  23. package/dist/cjs/types/Enum/PriceGridClementine.js.map +1 -1
  24. package/dist/cjs/types/Interface/api/authentification/AuthenticationResponse.d.ts +10 -0
  25. package/dist/cjs/types/Interface/api/authentification/AuthenticationResponse.d.ts.map +1 -1
  26. package/dist/cjs/types/Interface/api/authentification/AuthenticationResponse.js.map +1 -1
  27. package/dist/cjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.d.ts +4 -0
  28. package/dist/cjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.d.ts.map +1 -0
  29. package/dist/cjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.js +21 -0
  30. package/dist/cjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.js.map +1 -0
  31. package/dist/cjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.d.ts +0 -17
  32. package/dist/cjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.d.ts.map +1 -1
  33. package/dist/cjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.js +1 -4
  34. package/dist/cjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.js.map +1 -1
  35. package/dist/cjs/types/Interface/api/authentification/SetMobileApprovalDto.d.ts +5 -0
  36. package/dist/cjs/types/Interface/api/authentification/SetMobileApprovalDto.d.ts.map +1 -0
  37. package/dist/cjs/types/Interface/api/authentification/SetMobileApprovalDto.js +27 -0
  38. package/dist/cjs/types/Interface/api/authentification/SetMobileApprovalDto.js.map +1 -0
  39. package/dist/cjs/types/Interface/api/authentification/loginApproval.d.ts +66 -0
  40. package/dist/cjs/types/Interface/api/authentification/loginApproval.d.ts.map +1 -0
  41. package/dist/cjs/types/Interface/api/authentification/loginApproval.js +26 -0
  42. package/dist/cjs/types/Interface/api/authentification/loginApproval.js.map +1 -0
  43. package/dist/cjs/types/Interface/models/ILoginApproval.d.ts +31 -0
  44. package/dist/cjs/types/Interface/models/ILoginApproval.d.ts.map +1 -0
  45. package/dist/cjs/types/Interface/models/ILoginApproval.js +3 -0
  46. package/dist/cjs/types/Interface/models/ILoginApproval.js.map +1 -0
  47. package/dist/cjs/types/Interface/models/IUser.d.ts +2 -0
  48. package/dist/cjs/types/Interface/models/IUser.d.ts.map +1 -1
  49. package/dist/cjs/types/Interface/models/IUser.js.map +1 -1
  50. package/dist/cjs/types/index.d.ts +6 -0
  51. package/dist/cjs/types/index.d.ts.map +1 -1
  52. package/dist/cjs/types/index.js +6 -0
  53. package/dist/cjs/types/index.js.map +1 -1
  54. package/dist/mjs/api/resources/LoginApproval.d.ts +18 -0
  55. package/dist/mjs/api/resources/LoginApproval.d.ts.map +1 -0
  56. package/dist/mjs/api/resources/LoginApproval.js +16 -0
  57. package/dist/mjs/api/resources/LoginApproval.js.map +1 -0
  58. package/dist/mjs/api/resources/Mfa.d.ts +1 -0
  59. package/dist/mjs/api/resources/Mfa.d.ts.map +1 -1
  60. package/dist/mjs/api/resources/Mfa.js +4 -0
  61. package/dist/mjs/api/resources/Mfa.js.map +1 -1
  62. package/dist/mjs/api/resources/Society.d.ts +1 -2
  63. package/dist/mjs/api/resources/Society.d.ts.map +1 -1
  64. package/dist/mjs/api/resources/Society.js +0 -3
  65. package/dist/mjs/api/resources/Society.js.map +1 -1
  66. package/dist/mjs/types/Enum/LoginApprovalStatus.d.ts +14 -0
  67. package/dist/mjs/types/Enum/LoginApprovalStatus.d.ts.map +1 -0
  68. package/dist/mjs/types/Enum/LoginApprovalStatus.js +15 -0
  69. package/dist/mjs/types/Enum/LoginApprovalStatus.js.map +1 -0
  70. package/dist/mjs/types/Enum/MfaMode.d.ts +12 -0
  71. package/dist/mjs/types/Enum/MfaMode.d.ts.map +1 -0
  72. package/dist/mjs/types/Enum/MfaMode.js +13 -0
  73. package/dist/mjs/types/Enum/MfaMode.js.map +1 -0
  74. package/dist/mjs/types/Enum/PriceGridClementine.d.ts.map +1 -1
  75. package/dist/mjs/types/Enum/PriceGridClementine.js +474 -486
  76. package/dist/mjs/types/Enum/PriceGridClementine.js.map +1 -1
  77. package/dist/mjs/types/Interface/api/authentification/AuthenticationResponse.d.ts +10 -0
  78. package/dist/mjs/types/Interface/api/authentification/AuthenticationResponse.d.ts.map +1 -1
  79. package/dist/mjs/types/Interface/api/authentification/AuthenticationResponse.js.map +1 -1
  80. package/dist/mjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.d.ts +4 -0
  81. package/dist/mjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.d.ts.map +1 -0
  82. package/dist/mjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.js +18 -0
  83. package/dist/mjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.js.map +1 -0
  84. package/dist/mjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.d.ts +0 -17
  85. package/dist/mjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.d.ts.map +1 -1
  86. package/dist/mjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.js +0 -7
  87. package/dist/mjs/types/Interface/api/authentification/ReadAuthenticateCollaborater.js.map +1 -1
  88. package/dist/mjs/types/Interface/api/authentification/SetMobileApprovalDto.d.ts +5 -0
  89. package/dist/mjs/types/Interface/api/authentification/SetMobileApprovalDto.d.ts.map +1 -0
  90. package/dist/mjs/types/Interface/api/authentification/SetMobileApprovalDto.js +25 -0
  91. package/dist/mjs/types/Interface/api/authentification/SetMobileApprovalDto.js.map +1 -0
  92. package/dist/mjs/types/Interface/api/authentification/loginApproval.d.ts +66 -0
  93. package/dist/mjs/types/Interface/api/authentification/loginApproval.d.ts.map +1 -0
  94. package/dist/mjs/types/Interface/api/authentification/loginApproval.js +23 -0
  95. package/dist/mjs/types/Interface/api/authentification/loginApproval.js.map +1 -0
  96. package/dist/mjs/types/Interface/models/ILoginApproval.d.ts +31 -0
  97. package/dist/mjs/types/Interface/models/ILoginApproval.d.ts.map +1 -0
  98. package/dist/mjs/types/Interface/models/ILoginApproval.js +2 -0
  99. package/dist/mjs/types/Interface/models/ILoginApproval.js.map +1 -0
  100. package/dist/mjs/types/Interface/models/IUser.d.ts +2 -0
  101. package/dist/mjs/types/Interface/models/IUser.d.ts.map +1 -1
  102. package/dist/mjs/types/Interface/models/IUser.js.map +1 -1
  103. package/dist/mjs/types/index.d.ts +6 -0
  104. package/dist/mjs/types/index.d.ts.map +1 -1
  105. package/dist/mjs/types/index.js +6 -0
  106. package/dist/mjs/types/index.js.map +1 -1
  107. package/package.json +1 -1
  108. package/ts/api/resources/LoginApproval.ts +20 -0
  109. package/ts/api/resources/Mfa.ts +6 -0
  110. package/ts/api/resources/Society.ts +0 -5
  111. package/ts/types/Enum/LoginApprovalStatus.ts +13 -0
  112. package/ts/types/Enum/MfaMode.ts +11 -0
  113. package/ts/types/Enum/PriceGridClementine.ts +474 -487
  114. package/ts/types/Interface/api/authentification/AuthenticationResponse.ts +10 -0
  115. package/ts/types/Interface/api/authentification/FinalizeMobileApprovalDto.ts +6 -0
  116. package/ts/types/Interface/api/authentification/ReadAuthenticateCollaborater.ts +0 -18
  117. package/ts/types/Interface/api/authentification/SetMobileApprovalDto.ts +11 -0
  118. package/ts/types/Interface/api/authentification/loginApproval.ts +75 -0
  119. package/ts/types/Interface/models/ILoginApproval.ts +31 -0
  120. package/ts/types/Interface/models/IUser.ts +2 -0
  121. 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
+ }
@@ -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
+ }