@silexpert/core 1.3.165-1 → 1.3.167-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 (207) hide show
  1. package/dist/cjs/api/resources/AutomaticRegistration.d.ts +6 -0
  2. package/dist/cjs/api/resources/AutomaticRegistration.d.ts.map +1 -0
  3. package/dist/cjs/api/resources/AutomaticRegistration.js +22 -0
  4. package/dist/cjs/api/resources/AutomaticRegistration.js.map +1 -0
  5. package/dist/cjs/api/resources/LoginApproval.d.ts +18 -0
  6. package/dist/cjs/api/resources/LoginApproval.d.ts.map +1 -0
  7. package/dist/cjs/api/resources/LoginApproval.js +20 -0
  8. package/dist/cjs/api/resources/LoginApproval.js.map +1 -0
  9. package/dist/cjs/api/resources/Mfa.d.ts +1 -0
  10. package/dist/cjs/api/resources/Mfa.d.ts.map +1 -1
  11. package/dist/cjs/api/resources/Mfa.js +4 -0
  12. package/dist/cjs/api/resources/Mfa.js.map +1 -1
  13. package/dist/cjs/api/resources/Revenue.d.ts +8 -0
  14. package/dist/cjs/api/resources/Revenue.d.ts.map +1 -1
  15. package/dist/cjs/api/resources/Revenue.js +6 -0
  16. package/dist/cjs/api/resources/Revenue.js.map +1 -1
  17. package/dist/cjs/api/resources/User.d.ts +1 -3
  18. package/dist/cjs/api/resources/User.d.ts.map +1 -1
  19. package/dist/cjs/api/resources/User.js +0 -6
  20. package/dist/cjs/api/resources/User.js.map +1 -1
  21. package/dist/cjs/api/resources.d.ts +2 -0
  22. package/dist/cjs/api/resources.d.ts.map +1 -1
  23. package/dist/cjs/api/resources.js +2 -0
  24. package/dist/cjs/api/resources.js.map +1 -1
  25. package/dist/cjs/types/Enum/AutomaticRegistration.d.ts +7 -0
  26. package/dist/cjs/types/Enum/AutomaticRegistration.d.ts.map +1 -1
  27. package/dist/cjs/types/Enum/AutomaticRegistration.js +39 -1
  28. package/dist/cjs/types/Enum/AutomaticRegistration.js.map +1 -1
  29. package/dist/cjs/types/Enum/BrandClementine.d.ts.map +1 -1
  30. package/dist/cjs/types/Enum/BrandClementine.js +6 -0
  31. package/dist/cjs/types/Enum/BrandClementine.js.map +1 -1
  32. package/dist/cjs/types/Enum/LoginApprovalStatus.d.ts +14 -0
  33. package/dist/cjs/types/Enum/LoginApprovalStatus.d.ts.map +1 -0
  34. package/dist/cjs/types/Enum/LoginApprovalStatus.js +18 -0
  35. package/dist/cjs/types/Enum/LoginApprovalStatus.js.map +1 -0
  36. package/dist/cjs/types/Enum/MfaMode.d.ts +12 -0
  37. package/dist/cjs/types/Enum/MfaMode.d.ts.map +1 -0
  38. package/dist/cjs/types/Enum/MfaMode.js +16 -0
  39. package/dist/cjs/types/Enum/MfaMode.js.map +1 -0
  40. package/dist/cjs/types/Interface/api/authentification/AuthenticationResponse.d.ts +10 -0
  41. package/dist/cjs/types/Interface/api/authentification/AuthenticationResponse.d.ts.map +1 -1
  42. package/dist/cjs/types/Interface/api/authentification/AuthenticationResponse.js.map +1 -1
  43. package/dist/cjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.d.ts +4 -0
  44. package/dist/cjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.d.ts.map +1 -0
  45. package/dist/cjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.js +21 -0
  46. package/dist/cjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.js.map +1 -0
  47. package/dist/cjs/types/Interface/api/authentification/SetMobileApprovalDto.d.ts +5 -0
  48. package/dist/cjs/types/Interface/api/authentification/SetMobileApprovalDto.d.ts.map +1 -0
  49. package/dist/cjs/types/Interface/api/authentification/SetMobileApprovalDto.js +25 -0
  50. package/dist/cjs/types/Interface/api/authentification/SetMobileApprovalDto.js.map +1 -0
  51. package/dist/cjs/types/Interface/api/authentification/loginApproval.d.ts +66 -0
  52. package/dist/cjs/types/Interface/api/authentification/loginApproval.d.ts.map +1 -0
  53. package/dist/cjs/types/Interface/api/authentification/loginApproval.js +26 -0
  54. package/dist/cjs/types/Interface/api/authentification/loginApproval.js.map +1 -0
  55. package/dist/cjs/types/Interface/api/automaticRegistration/Query.d.ts +6 -0
  56. package/dist/cjs/types/Interface/api/automaticRegistration/Query.d.ts.map +1 -0
  57. package/dist/cjs/types/Interface/api/automaticRegistration/Query.js +36 -0
  58. package/dist/cjs/types/Interface/api/automaticRegistration/Query.js.map +1 -0
  59. package/dist/cjs/types/Interface/api/automaticRegistration/Read.d.ts +9 -0
  60. package/dist/cjs/types/Interface/api/automaticRegistration/Read.d.ts.map +1 -0
  61. package/dist/cjs/types/Interface/api/automaticRegistration/Read.js +3 -0
  62. package/dist/cjs/types/Interface/api/automaticRegistration/Read.js.map +1 -0
  63. package/dist/cjs/types/Interface/api/cashAndExpense/Create.d.ts +1 -1
  64. package/dist/cjs/types/Interface/api/cashAndExpense/Create.d.ts.map +1 -1
  65. package/dist/cjs/types/Interface/api/cashAndExpense/Create.js +1 -1
  66. package/dist/cjs/types/Interface/api/cashAndExpense/Create.js.map +1 -1
  67. package/dist/cjs/types/Interface/api/payment/Params.d.ts +2 -1
  68. package/dist/cjs/types/Interface/api/payment/Params.d.ts.map +1 -1
  69. package/dist/cjs/types/Interface/api/payment/Params.js +9 -1
  70. package/dist/cjs/types/Interface/api/payment/Params.js.map +1 -1
  71. package/dist/cjs/types/Interface/api/user/RegisterProspect.d.ts +4 -0
  72. package/dist/cjs/types/Interface/api/user/RegisterProspect.d.ts.map +1 -1
  73. package/dist/cjs/types/Interface/api/user/RegisterProspect.js.map +1 -1
  74. package/dist/cjs/types/Interface/api/user/RegisterWebhook.d.ts +6 -0
  75. package/dist/cjs/types/Interface/api/user/RegisterWebhook.d.ts.map +1 -1
  76. package/dist/cjs/types/Interface/api/user/RegisterWebhook.js +22 -0
  77. package/dist/cjs/types/Interface/api/user/RegisterWebhook.js.map +1 -1
  78. package/dist/cjs/types/Interface/models/ILoginApproval.d.ts +31 -0
  79. package/dist/cjs/types/Interface/models/ILoginApproval.d.ts.map +1 -0
  80. package/dist/cjs/types/Interface/models/ILoginApproval.js +3 -0
  81. package/dist/cjs/types/Interface/models/ILoginApproval.js.map +1 -0
  82. package/dist/cjs/types/Interface/models/ISociety.d.ts +1 -1
  83. package/dist/cjs/types/Interface/models/ISociety.d.ts.map +1 -1
  84. package/dist/cjs/types/Interface/models/ISociety.js.map +1 -1
  85. package/dist/cjs/types/Interface/models/IUser.d.ts +2 -0
  86. package/dist/cjs/types/Interface/models/IUser.d.ts.map +1 -1
  87. package/dist/cjs/types/Interface/models/IUser.js.map +1 -1
  88. package/dist/cjs/types/index.d.ts +8 -0
  89. package/dist/cjs/types/index.d.ts.map +1 -1
  90. package/dist/cjs/types/index.js +8 -0
  91. package/dist/cjs/types/index.js.map +1 -1
  92. package/dist/mjs/api/resources/AutomaticRegistration.d.ts +6 -0
  93. package/dist/mjs/api/resources/AutomaticRegistration.d.ts.map +1 -0
  94. package/dist/mjs/api/resources/AutomaticRegistration.js +7 -0
  95. package/dist/mjs/api/resources/AutomaticRegistration.js.map +1 -0
  96. package/dist/mjs/api/resources/LoginApproval.d.ts +18 -0
  97. package/dist/mjs/api/resources/LoginApproval.d.ts.map +1 -0
  98. package/dist/mjs/api/resources/LoginApproval.js +16 -0
  99. package/dist/mjs/api/resources/LoginApproval.js.map +1 -0
  100. package/dist/mjs/api/resources/Mfa.d.ts +1 -0
  101. package/dist/mjs/api/resources/Mfa.d.ts.map +1 -1
  102. package/dist/mjs/api/resources/Mfa.js +4 -0
  103. package/dist/mjs/api/resources/Mfa.js.map +1 -1
  104. package/dist/mjs/api/resources/Revenue.d.ts +8 -0
  105. package/dist/mjs/api/resources/Revenue.d.ts.map +1 -1
  106. package/dist/mjs/api/resources/Revenue.js +6 -0
  107. package/dist/mjs/api/resources/Revenue.js.map +1 -1
  108. package/dist/mjs/api/resources/User.d.ts +1 -3
  109. package/dist/mjs/api/resources/User.d.ts.map +1 -1
  110. package/dist/mjs/api/resources/User.js +0 -6
  111. package/dist/mjs/api/resources/User.js.map +1 -1
  112. package/dist/mjs/api/resources.d.ts +2 -0
  113. package/dist/mjs/api/resources.d.ts.map +1 -1
  114. package/dist/mjs/api/resources.js +2 -0
  115. package/dist/mjs/api/resources.js.map +1 -1
  116. package/dist/mjs/types/Enum/AutomaticRegistration.d.ts +7 -0
  117. package/dist/mjs/types/Enum/AutomaticRegistration.d.ts.map +1 -1
  118. package/dist/mjs/types/Enum/AutomaticRegistration.js +38 -0
  119. package/dist/mjs/types/Enum/AutomaticRegistration.js.map +1 -1
  120. package/dist/mjs/types/Enum/BrandClementine.d.ts.map +1 -1
  121. package/dist/mjs/types/Enum/BrandClementine.js +6 -0
  122. package/dist/mjs/types/Enum/BrandClementine.js.map +1 -1
  123. package/dist/mjs/types/Enum/LoginApprovalStatus.d.ts +14 -0
  124. package/dist/mjs/types/Enum/LoginApprovalStatus.d.ts.map +1 -0
  125. package/dist/mjs/types/Enum/LoginApprovalStatus.js +15 -0
  126. package/dist/mjs/types/Enum/LoginApprovalStatus.js.map +1 -0
  127. package/dist/mjs/types/Enum/MfaMode.d.ts +12 -0
  128. package/dist/mjs/types/Enum/MfaMode.d.ts.map +1 -0
  129. package/dist/mjs/types/Enum/MfaMode.js +13 -0
  130. package/dist/mjs/types/Enum/MfaMode.js.map +1 -0
  131. package/dist/mjs/types/Interface/api/authentification/AuthenticationResponse.d.ts +10 -0
  132. package/dist/mjs/types/Interface/api/authentification/AuthenticationResponse.d.ts.map +1 -1
  133. package/dist/mjs/types/Interface/api/authentification/AuthenticationResponse.js.map +1 -1
  134. package/dist/mjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.d.ts +4 -0
  135. package/dist/mjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.d.ts.map +1 -0
  136. package/dist/mjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.js +18 -0
  137. package/dist/mjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.js.map +1 -0
  138. package/dist/mjs/types/Interface/api/authentification/SetMobileApprovalDto.d.ts +5 -0
  139. package/dist/mjs/types/Interface/api/authentification/SetMobileApprovalDto.d.ts.map +1 -0
  140. package/dist/mjs/types/Interface/api/authentification/SetMobileApprovalDto.js +23 -0
  141. package/dist/mjs/types/Interface/api/authentification/SetMobileApprovalDto.js.map +1 -0
  142. package/dist/mjs/types/Interface/api/authentification/loginApproval.d.ts +66 -0
  143. package/dist/mjs/types/Interface/api/authentification/loginApproval.d.ts.map +1 -0
  144. package/dist/mjs/types/Interface/api/authentification/loginApproval.js +23 -0
  145. package/dist/mjs/types/Interface/api/authentification/loginApproval.js.map +1 -0
  146. package/dist/mjs/types/Interface/api/automaticRegistration/Query.d.ts +6 -0
  147. package/dist/mjs/types/Interface/api/automaticRegistration/Query.d.ts.map +1 -0
  148. package/dist/mjs/types/Interface/api/automaticRegistration/Query.js +35 -0
  149. package/dist/mjs/types/Interface/api/automaticRegistration/Query.js.map +1 -0
  150. package/dist/mjs/types/Interface/api/automaticRegistration/Read.d.ts +9 -0
  151. package/dist/mjs/types/Interface/api/automaticRegistration/Read.d.ts.map +1 -0
  152. package/dist/mjs/types/Interface/api/automaticRegistration/Read.js +2 -0
  153. package/dist/mjs/types/Interface/api/automaticRegistration/Read.js.map +1 -0
  154. package/dist/mjs/types/Interface/api/cashAndExpense/Create.d.ts +1 -1
  155. package/dist/mjs/types/Interface/api/cashAndExpense/Create.d.ts.map +1 -1
  156. package/dist/mjs/types/Interface/api/cashAndExpense/Create.js +1 -1
  157. package/dist/mjs/types/Interface/api/cashAndExpense/Create.js.map +1 -1
  158. package/dist/mjs/types/Interface/api/payment/Params.d.ts +2 -1
  159. package/dist/mjs/types/Interface/api/payment/Params.d.ts.map +1 -1
  160. package/dist/mjs/types/Interface/api/payment/Params.js +10 -2
  161. package/dist/mjs/types/Interface/api/payment/Params.js.map +1 -1
  162. package/dist/mjs/types/Interface/api/user/RegisterProspect.d.ts +4 -0
  163. package/dist/mjs/types/Interface/api/user/RegisterProspect.d.ts.map +1 -1
  164. package/dist/mjs/types/Interface/api/user/RegisterProspect.js.map +1 -1
  165. package/dist/mjs/types/Interface/api/user/RegisterWebhook.d.ts +6 -0
  166. package/dist/mjs/types/Interface/api/user/RegisterWebhook.d.ts.map +1 -1
  167. package/dist/mjs/types/Interface/api/user/RegisterWebhook.js +26 -1
  168. package/dist/mjs/types/Interface/api/user/RegisterWebhook.js.map +1 -1
  169. package/dist/mjs/types/Interface/models/ILoginApproval.d.ts +31 -0
  170. package/dist/mjs/types/Interface/models/ILoginApproval.d.ts.map +1 -0
  171. package/dist/mjs/types/Interface/models/ILoginApproval.js +2 -0
  172. package/dist/mjs/types/Interface/models/ILoginApproval.js.map +1 -0
  173. package/dist/mjs/types/Interface/models/ISociety.d.ts +1 -1
  174. package/dist/mjs/types/Interface/models/ISociety.d.ts.map +1 -1
  175. package/dist/mjs/types/Interface/models/ISociety.js.map +1 -1
  176. package/dist/mjs/types/Interface/models/IUser.d.ts +2 -0
  177. package/dist/mjs/types/Interface/models/IUser.d.ts.map +1 -1
  178. package/dist/mjs/types/Interface/models/IUser.js.map +1 -1
  179. package/dist/mjs/types/index.d.ts +8 -0
  180. package/dist/mjs/types/index.d.ts.map +1 -1
  181. package/dist/mjs/types/index.js +8 -0
  182. package/dist/mjs/types/index.js.map +1 -1
  183. package/package.json +17 -17
  184. package/ts/api/resources/AutomaticRegistration.ts +8 -0
  185. package/ts/api/resources/LoginApproval.ts +20 -0
  186. package/ts/api/resources/Mfa.ts +6 -0
  187. package/ts/api/resources/Revenue.ts +8 -0
  188. package/ts/api/resources/User.ts +0 -9
  189. package/ts/api/resources.ts +2 -0
  190. package/ts/types/Enum/AutomaticRegistration.ts +45 -0
  191. package/ts/types/Enum/BrandClementine.ts +6 -0
  192. package/ts/types/Enum/LoginApprovalStatus.ts +13 -0
  193. package/ts/types/Enum/MfaMode.ts +11 -0
  194. package/ts/types/Interface/api/authentification/AuthenticationResponse.ts +10 -0
  195. package/ts/types/Interface/api/authentification/FinalizeMobileApprovalDto.ts +6 -0
  196. package/ts/types/Interface/api/authentification/SetMobileApprovalDto.ts +9 -0
  197. package/ts/types/Interface/api/authentification/loginApproval.ts +75 -0
  198. package/ts/types/Interface/api/automaticRegistration/Query.ts +19 -0
  199. package/ts/types/Interface/api/automaticRegistration/Read.ts +8 -0
  200. package/ts/types/Interface/api/cashAndExpense/Create.ts +2 -2
  201. package/ts/types/Interface/api/payment/Params.ts +9 -3
  202. package/ts/types/Interface/api/user/RegisterProspect.ts +4 -0
  203. package/ts/types/Interface/api/user/RegisterWebhook.ts +19 -1
  204. package/ts/types/Interface/models/ILoginApproval.ts +31 -0
  205. package/ts/types/Interface/models/ISociety.ts +1 -1
  206. package/ts/types/Interface/models/IUser.ts +2 -0
  207. package/ts/types/index.ts +8 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "1.3.165-1",
3
+ "version": "1.3.167-1",
4
4
  "description": "Silex Core perform HTTP Request and object binding. Silex core helps developers to retrieve and return formatted object",
5
5
  "homepage": "https://gitlab.compta-clementine.fr/dev/silex-api",
6
6
  "main": "dist/cjs/index.js",
@@ -32,29 +32,29 @@
32
32
  "author": "Silex",
33
33
  "license": "ISC",
34
34
  "devDependencies": {
35
- "@babel/cli": "^7.26.4",
36
- "@babel/core": "^7.22.11",
37
- "@babel/plugin-transform-runtime": "^7.22.10",
38
- "@babel/preset-env": "^7.22.10",
39
- "@babel/runtime": "^7.22.11",
35
+ "@babel/cli": "^7.28.3",
36
+ "@babel/core": "^7.28.5",
37
+ "@babel/plugin-transform-runtime": "^7.28.5",
38
+ "@babel/preset-env": "^7.28.5",
39
+ "@babel/runtime": "^7.28.4",
40
40
  "@types/bluebird": "^3.5.34",
41
41
  "@types/browser-or-node": "^1.3.0",
42
42
  "@types/ejs": "^3.0.6",
43
- "@types/node": "^22.10.5",
44
- "@types/validator": "^13.11.1",
43
+ "@types/node": "^24.10.1",
44
+ "@types/validator": "^13.15.10",
45
45
  "babel-plugin-replace-import-extension": "^1.1.3",
46
46
  "babel-preset-env": "^1.7.0",
47
- "eslint": "^9.17.0",
47
+ "eslint": "^9.39.1",
48
48
  "eslint-config-airbnb-typescript": "^18.0.0",
49
49
  "eslint-config-prettier": "^9.1.0",
50
50
  "husky": "^9.1.7",
51
- "prettier": "^3.4.2",
51
+ "prettier": "^3.7.3",
52
52
  "reflect-metadata": "^0.2.2",
53
- "rimraf": "^6.0.1",
53
+ "rimraf": "^6.1.2",
54
54
  "standard-version": "^9.3.0",
55
55
  "ts-node": "^10.9.2",
56
- "typescript": "5.8.2",
57
- "typescript-eslint": "^8.19.1"
56
+ "typescript": "5.9.3",
57
+ "typescript-eslint": "^8.48.1"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "@babel/runtime": "^7.6.3",
@@ -68,14 +68,14 @@
68
68
  "axios": "0.22.0",
69
69
  "browser-or-node": "^3.0.0",
70
70
  "class-transformer": "^0.5.1",
71
- "class-validator": "^0.14.0",
71
+ "class-validator": "^0.14.3",
72
72
  "dayjs": "^1.11.11",
73
73
  "ejs": "^3.1.9",
74
- "libphonenumber-js": "^1.12.10",
75
- "mailparser": "^3.4.0",
74
+ "libphonenumber-js": "^1.12.30",
75
+ "mailparser": "^3.9.0",
76
76
  "rxjs": "^7.8.2",
77
77
  "sms-segments-calculator": "^1.2.0",
78
- "stripe": "^18.1.1",
78
+ "stripe": "18.1.1",
79
79
  "ts-enum-util": "^4.0.2"
80
80
  }
81
81
  }
@@ -0,0 +1,8 @@
1
+ import { QueryAutomaticRegistrationStatistics, ReadAutomaticRegistrationStatistic } from '../../types';
2
+ import { Resource } from '../Resource';
3
+
4
+ export class AutomaticRegistration extends Resource {
5
+ async getStatistics(query: QueryAutomaticRegistrationStatistics): Promise<ReadAutomaticRegistrationStatistic[]> {
6
+ return this.axios.$get('/vat-declarations/generated-automatically/statistics', { params: query });
7
+ }
8
+ }
@@ -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
  }
@@ -31,6 +31,10 @@ export class Revenue extends Resource {
31
31
  delete: (id: number) => {
32
32
  return this.axios.$delete(`/revenue/movements/${id}`);
33
33
  },
34
+
35
+ generateRetroactive: (idSociety: number, params: { startDate?: string; endDate?: string }) => {
36
+ return this.axios.$post(`/revenue/societies/${idSociety}/retroactivity`, params);
37
+ },
34
38
  };
35
39
 
36
40
  /**
@@ -52,6 +56,10 @@ export class Revenue extends Resource {
52
56
  generateAll: (data: { date?: string }) => {
53
57
  return this.axios.$post('/revenue/snapshots/generate-all', data);
54
58
  },
59
+
60
+ generateRetroactiveSnapshots: (idSociety: number) => {
61
+ return this.axios.$post(`/revenue/societies/${idSociety}/snapshots/generate-retroactive`);
62
+ },
55
63
  };
56
64
 
57
65
  /**
@@ -23,7 +23,6 @@ import {
23
23
  BasePaginate,
24
24
  QueryGetAllUsersPaginated,
25
25
  QueryUpdatePassword,
26
- IWorkingSchedule,
27
26
  } from '../../types';
28
27
 
29
28
  export class User extends Resource {
@@ -145,12 +144,4 @@ export class User extends Resource {
145
144
  registerProspect(body: RegisterProspectBody): Promise<RegisterProspectResponse> {
146
145
  return this.axios.$post('users/prospect', body);
147
146
  }
148
-
149
- updateCoworkerWorkingSchedules(idUser: number, workingSchedules: IWorkingSchedule[]): Promise<IWorkingSchedule[]> {
150
- return this.axios.$put(`users/coworker/${idUser}/working-schedules`, workingSchedules);
151
- }
152
-
153
- createCoworkerWorkingSchedules(idUser: number, workingSchedules: Omit<IWorkingSchedule, 'id'>[]): Promise<IWorkingSchedule[]> {
154
- return this.axios.$post(`users/coworker/${idUser}/working-schedules`, workingSchedules);
155
- }
156
147
  }
@@ -186,6 +186,7 @@ import { DashboardLayout } from './resources/DashboardLayout';
186
186
  import { DocumentRequest } from './resources/DocumentRequest';
187
187
  import { BalanceSheetReport } from './resources/BalanceSheetReport';
188
188
  import { Revenue } from './resources/Revenue';
189
+ import { AutomaticRegistration } from './resources/AutomaticRegistration';
189
190
 
190
191
  export const resources = {
191
192
  budgetInsight: BudgetInsight,
@@ -376,4 +377,5 @@ export const resources = {
376
377
  documentRequest: DocumentRequest,
377
378
  balanceSheetReport: BalanceSheetReport,
378
379
  revenue: Revenue,
380
+ automaticRegistration: AutomaticRegistration,
379
381
  };
@@ -6,3 +6,48 @@ export enum AutomaticRegistrationType {
6
6
  SEND_TO_SIE = 5,
7
7
  FAILED_TO_SEND_TO_SIE = 6,
8
8
  }
9
+
10
+ export const AutomaticRegistrationTypeStatistics: Array<{
11
+ label: string;
12
+ /** types included for this statistic (automatic registration state is updated at every step so we need to include more) */
13
+ types: AutomaticRegistrationType[];
14
+ /** specific state type (last state) */
15
+ type: AutomaticRegistrationType;
16
+ }> = [
17
+ { label: 'Non généré', types: [AutomaticRegistrationType.INVALID], type: AutomaticRegistrationType.INVALID },
18
+ {
19
+ label: 'Généré',
20
+ types: [
21
+ AutomaticRegistrationType.GENERATED,
22
+ AutomaticRegistrationType.EMAIL_SEND,
23
+ AutomaticRegistrationType.EMAIL_ERROR,
24
+ AutomaticRegistrationType.SEND_TO_SIE,
25
+ AutomaticRegistrationType.FAILED_TO_SEND_TO_SIE,
26
+ ],
27
+ type: AutomaticRegistrationType.GENERATED,
28
+ },
29
+ {
30
+ label: 'Envoyé par e-mail',
31
+ types: [
32
+ AutomaticRegistrationType.EMAIL_SEND,
33
+ AutomaticRegistrationType.SEND_TO_SIE,
34
+ AutomaticRegistrationType.FAILED_TO_SEND_TO_SIE,
35
+ ],
36
+ type: AutomaticRegistrationType.EMAIL_SEND,
37
+ },
38
+ {
39
+ label: 'Échec envoi e-mail',
40
+ types: [AutomaticRegistrationType.EMAIL_ERROR],
41
+ type: AutomaticRegistrationType.EMAIL_ERROR,
42
+ },
43
+ {
44
+ label: 'Envoyé au SIE',
45
+ types: [AutomaticRegistrationType.SEND_TO_SIE],
46
+ type: AutomaticRegistrationType.SEND_TO_SIE,
47
+ },
48
+ {
49
+ label: 'Échec envoi au SIE',
50
+ types: [AutomaticRegistrationType.FAILED_TO_SEND_TO_SIE],
51
+ type: AutomaticRegistrationType.FAILED_TO_SEND_TO_SIE,
52
+ },
53
+ ];
@@ -278,6 +278,12 @@ export const BrandClementine: Brand[] = [
278
278
  statut: 'SAS',
279
279
  zipCode: '54 521',
280
280
  },
281
+ caarl: {
282
+ subscriptionNumber: {
283
+ sandbox: 'S-2412-3945851',
284
+ production: 'S-2412-5088901',
285
+ },
286
+ },
281
287
  },
282
288
  {
283
289
  idTypeBrand: 6,
@@ -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,6 @@
1
+ import { IsString } from 'class-validator';
2
+
3
+ export class FinalizeMobileApprovalDto {
4
+ @IsString()
5
+ requestId: string;
6
+ }
@@ -0,0 +1,9 @@
1
+ import { IsBoolean, IsInt } from 'class-validator';
2
+
3
+ export class SetMobileApprovalDto {
4
+ @IsInt()
5
+ userId: number;
6
+
7
+ @IsBoolean()
8
+ enable: boolean;
9
+ }
@@ -0,0 +1,75 @@
1
+ import { LoginApprovalStatus } from '../../../Enum/LoginApprovalStatus';
2
+ import { IsString } from 'class-validator';
3
+ import { ApiProperty } from '../../../../';
4
+
5
+ /**
6
+ * Payload de l'événement socket envoyé au mobile lors d'une demande de connexion
7
+ */
8
+ export interface ILoginApprovalRequestEvent {
9
+ /** ID unique de la demande */
10
+ requestId: string;
11
+ /** Date d'expiration */
12
+ expiresAt: Date;
13
+ /** ID de l'utilisateur */
14
+ userId: number;
15
+ /** Métadonnées (IP, navigateur, localisation) */
16
+ metadata?: {
17
+ ip?: string;
18
+ userAgent?: string;
19
+ location?: string;
20
+ };
21
+ }
22
+
23
+ export interface IApproveOrDenyResponse {
24
+ message: string;
25
+ status: LoginApprovalStatus;
26
+ }
27
+
28
+ /**
29
+ * Payload de l'événement socket envoyé au Web lors d'un changement de statut
30
+ */
31
+ export interface ILoginApprovalStatusEvent {
32
+ /** ID de la demande */
33
+ requestId: string;
34
+ /** Nouveau statut */
35
+ status: LoginApprovalStatus;
36
+ /** Date de la transition */
37
+ timestamp: Date;
38
+ }
39
+
40
+ /**
41
+ * Réponse renvoyée au Web lorsque mobile MFA est requis
42
+ */
43
+ export interface ILoginApprovalResponse {
44
+ /** Indique qu'une validation mobile est nécessaire */
45
+ requiresMobileApproval: true;
46
+ /** ID de la demande pour polling/tracking */
47
+ requestId: string;
48
+ /** Date d'expiration de la demande */
49
+ expiresAt: Date;
50
+ /** ID utilisateur */
51
+ userId: number;
52
+ }
53
+
54
+ /**
55
+ * Réponse du statut d'une demande d'approbation
56
+ */
57
+ export interface ILoginApprovalStatusResponse {
58
+ /** ID de la demande */
59
+ requestId: string;
60
+ /** Statut actuel */
61
+ status: LoginApprovalStatus;
62
+ /** Date d'expiration */
63
+ expiresAt: Date;
64
+ /** Token JWT si status = approved */
65
+ token?: string;
66
+ }
67
+
68
+ /**
69
+ * DTO pour approuver/refuser une demande depuis le mobile
70
+ */
71
+ export class IApproveOrDenyRequest {
72
+ @ApiProperty()
73
+ @IsString()
74
+ deviceId: string;
75
+ }
@@ -0,0 +1,19 @@
1
+ import { IsBoolean, IsDateString, IsOptional } from 'class-validator';
2
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
+ import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
4
+
5
+ export class QueryAutomaticRegistrationStatistics {
6
+ @ApiProperty()
7
+ @IsDateString()
8
+ startDate: string;
9
+
10
+ @ApiProperty()
11
+ @IsDateString()
12
+ endDate: string;
13
+
14
+ @ApiPropertyOptional()
15
+ @IsBoolean()
16
+ @ToBoolean()
17
+ @IsOptional()
18
+ withCauses?: boolean;
19
+ }
@@ -0,0 +1,8 @@
1
+ export type ReadAutomaticRegistrationStatistic = {
2
+ label: string;
3
+ count: number;
4
+ causes?: Array<{
5
+ label: string;
6
+ count: number;
7
+ }>;
8
+ };
@@ -62,6 +62,6 @@ export class CreateKilometricAllowance {
62
62
  @ApiProperty()
63
63
  arrivalCity: string;
64
64
 
65
- @ApiPropertyOptional()
66
- idSocietyPartner?: number;
65
+ @ApiProperty()
66
+ idSocietyPartner: number;
67
67
  }
@@ -1,4 +1,4 @@
1
- import { IsBoolean, IsDate, IsInt, IsNumber, IsOptional, IsString, Matches } from 'class-validator';
1
+ import { IsBoolean, IsDate, IsInt, IsNumber, IsOptional, IsString, Matches, Min } from 'class-validator';
2
2
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
3
  import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
4
4
 
@@ -9,9 +9,10 @@ export class CreatePaymentsAutoBilling {
9
9
  idSociety?: number;
10
10
  }
11
11
  export class CreatePaymentsRebilling {
12
- @ApiProperty()
12
+ @ApiPropertyOptional()
13
+ @IsOptional()
13
14
  @IsInt()
14
- idSociety: number;
15
+ idSociety?: number;
15
16
 
16
17
  @ApiPropertyOptional()
17
18
  @IsOptional()
@@ -25,6 +26,11 @@ export class CreatePaymentsRebilling {
25
26
  @IsOptional()
26
27
  @IsInt()
27
28
  nbExercicesToGenerate?: number = 1;
29
+
30
+ @ApiProperty({ default: 10 })
31
+ @IsInt()
32
+ @Min(1)
33
+ limit?: number = 10;
28
34
  }
29
35
 
30
36
  export class UpdateCollectable {
@@ -15,6 +15,7 @@ import { Civility } from '../../../Enum/Civility';
15
15
  import { IAnalyticsUtm } from '../../models/IAnalyticsUtm';
16
16
  import { LegalFormTypeEnum } from '../../../Enum/LegalForm';
17
17
  import { UpdateOrCreateVisualizedInformation } from '../visualizedInformation/Update';
18
+ import { IPermission } from '../../models/IPermission';
18
19
 
19
20
  /**
20
21
  * Response of the register prospect endpoint
@@ -44,6 +45,8 @@ export interface ProspectSocietyInfo {
44
45
  idLegalForm?: LegalFormTypeEnum;
45
46
  zipCode?: string;
46
47
  turnover?: number;
48
+ siret?: string;
49
+ idNafCode?: number;
47
50
  }
48
51
 
49
52
  export interface ReferalProgram {
@@ -61,6 +64,7 @@ export interface RegisterProspect {
61
64
  idSource?: number;
62
65
  sourceAlias?: string;
63
66
  idTypeBrand: number;
67
+ permissions?: IPermission;
64
68
  analyticsUtm?: Omit<Partial<IAnalyticsUtm>, 'idSociety'>;
65
69
  comment?: string;
66
70
  }
@@ -1,6 +1,20 @@
1
- import { IsEmail, IsOptional, IsPhoneNumber, IsString } from 'class-validator';
1
+ import { IsBoolean, IsEmail, IsOptional, IsPhoneNumber, IsString, ValidateNested } from 'class-validator';
2
2
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
+ import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
3
4
 
5
+ class RegisterReadablePermission {
6
+ @ApiPropertyOptional()
7
+ @IsOptional()
8
+ @IsBoolean()
9
+ @ToBoolean()
10
+ social?: boolean;
11
+
12
+ @ApiPropertyOptional()
13
+ @IsOptional()
14
+ @IsBoolean()
15
+ @ToBoolean()
16
+ vat?: boolean;
17
+ }
4
18
  export class RegisterWebhookBody {
5
19
  @ApiProperty()
6
20
  @IsEmail()
@@ -37,4 +51,8 @@ export class RegisterWebhookBody {
37
51
  @IsOptional()
38
52
  @IsString()
39
53
  nafCode?: string;
54
+
55
+ @ApiPropertyOptional()
56
+ @ValidateNested()
57
+ permissions?: RegisterReadablePermission;
40
58
  }
@@ -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
+ }
@@ -181,7 +181,7 @@ export interface ISociety {
181
181
  /** @deprecated */
182
182
  hidePartneredAccountantsBubbleLink?: boolean | null;
183
183
  cancelCompleteCreationModal?: Date | null;
184
- isCreatedInApp?: boolean;
184
+ isCreatedInApp?: number;
185
185
  passwordIsuite?: string | null;
186
186
  unpaidState?: number | null;
187
187
 
@@ -23,6 +23,7 @@ import { IUserBrand } from './IUserBrand';
23
23
  import { ICollaboraterDetail } from './ICollaboraterDetail';
24
24
  import { IUserTimeSlot } from './IUserTimeSlot';
25
25
  import { IUserTeam } from './IUserTeam';
26
+ import { MfaMode } from '../../Enum/MfaMode';
26
27
 
27
28
  // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
28
29
  type isAny<T> = T | any;
@@ -52,6 +53,7 @@ export interface IUser {
52
53
  prefix?: string | null;
53
54
  tokenLostPassword?: string | null;
54
55
  twoFactorEnabled?: boolean | null;
56
+ mfaMode?: MfaMode | null;
55
57
  tokenApi?: string | null;
56
58
  tokenNotification?: string | null;
57
59
  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';
@@ -289,6 +290,7 @@ export * from './Interface/models/ILoanFile';
289
290
  export * from './Interface/models/ICommercialMail';
290
291
  export * from './Interface/models/ICommercialOffer';
291
292
  export * from './Interface/models/IRegistration';
293
+ export * from './Interface/api/mfa/mfa';
292
294
  export * from './Interface/models/IVatRegimeHistory';
293
295
  export * from './Interface/models/ICustomerAcceptance';
294
296
  export * from './Interface/models/IUnpaidCallHistory';
@@ -338,6 +340,8 @@ export * from './Enum/Feature';
338
340
  export * from './Enum/AutomaticRegistration';
339
341
  export * from './Enum/IntermediateManagementRebate';
340
342
  export * from './Enum/Das';
343
+ export * from './Enum/LoginApprovalStatus';
344
+ export * from './Enum/MfaMode';
341
345
  export * from './Enum/ChangeLog';
342
346
  export * from './Enum/VisualizedInformation';
343
347
  export * from './Enum/NafCode';
@@ -559,6 +563,7 @@ export * from './Enum/PaymentAttempt';
559
563
  // Interfaces API
560
564
  export * from './Interface/api/authentification/AuthenticationResponse';
561
565
  export * from './Interface/api/exercice/ReadExercice';
566
+ export * from './Interface/api/authentification/AuthenticationResponse';
562
567
  export * from './Interface/api/balanceSheet/consistency/Read';
563
568
  export * from './Interface/api/kilometricAllowance/ReadKilometricAllowance';
564
569
  export * from './Interface/api/cashAndExpense/Query';
@@ -876,7 +881,6 @@ export * from './Interface/api/humanResourceLibrary/CreateHumanResourceLibrary';
876
881
  export * from './Interface/api/humanResourceLibrary/CreateUserHumanResourceLibrary';
877
882
  export * from './Interface/api/report/ExternalReport';
878
883
  export * from './Interface/api/collaboraterDetail/CreateCollaboraterDetail';
879
-
880
884
  export * from './Interface/api/library/QueryLibrary';
881
885
  export * from './Interface/api/library/ReadLibraryFile';
882
886
  export * from './Interface/api/taxDeadline/QueryTaxDeadline';
@@ -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';
@@ -1141,6 +1146,8 @@ export * from './Interface/api/recurrence/Query';
1141
1146
  export * from './Interface/api/recurrence/Read';
1142
1147
  export * from './Interface/api/documentRequest/Query';
1143
1148
  export * from './Interface/api/documentRequest/Create';
1149
+ export * from './Interface/api/automaticRegistration/Query';
1150
+ export * from './Interface/api/automaticRegistration/Read';
1144
1151
 
1145
1152
  // Enums types
1146
1153
  export * from './Interface/enum/Util';