@silexpert/core 1.3.166 → 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 (137) 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/types/Enum/LoginApprovalStatus.d.ts +14 -0
  10. package/dist/cjs/types/Enum/LoginApprovalStatus.d.ts.map +1 -0
  11. package/dist/cjs/types/Enum/LoginApprovalStatus.js +18 -0
  12. package/dist/cjs/types/Enum/LoginApprovalStatus.js.map +1 -0
  13. package/dist/cjs/types/Enum/MfaMode.d.ts +12 -0
  14. package/dist/cjs/types/Enum/MfaMode.d.ts.map +1 -0
  15. package/dist/cjs/types/Enum/MfaMode.js +16 -0
  16. package/dist/cjs/types/Enum/MfaMode.js.map +1 -0
  17. package/dist/cjs/types/Interface/api/authentification/AuthenticationResponse.d.ts +10 -0
  18. package/dist/cjs/types/Interface/api/authentification/AuthenticationResponse.d.ts.map +1 -1
  19. package/dist/cjs/types/Interface/api/authentification/AuthenticationResponse.js.map +1 -1
  20. package/dist/cjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.d.ts +4 -0
  21. package/dist/cjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.d.ts.map +1 -0
  22. package/dist/cjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.js +21 -0
  23. package/dist/cjs/types/Interface/api/authentification/FinalizeMobileApprovalDto.js.map +1 -0
  24. package/dist/cjs/types/Interface/api/authentification/SetMobileApprovalDto.d.ts +5 -0
  25. package/dist/cjs/types/Interface/api/authentification/SetMobileApprovalDto.d.ts.map +1 -0
  26. package/dist/cjs/types/Interface/api/authentification/SetMobileApprovalDto.js +25 -0
  27. package/dist/cjs/types/Interface/api/authentification/SetMobileApprovalDto.js.map +1 -0
  28. package/dist/cjs/types/Interface/api/authentification/loginApproval.d.ts +66 -0
  29. package/dist/cjs/types/Interface/api/authentification/loginApproval.d.ts.map +1 -0
  30. package/dist/cjs/types/Interface/api/authentification/loginApproval.js +26 -0
  31. package/dist/cjs/types/Interface/api/authentification/loginApproval.js.map +1 -0
  32. package/dist/cjs/types/Interface/api/cashAndExpense/Create.d.ts +1 -1
  33. package/dist/cjs/types/Interface/api/cashAndExpense/Create.d.ts.map +1 -1
  34. package/dist/cjs/types/Interface/api/cashAndExpense/Create.js +1 -1
  35. package/dist/cjs/types/Interface/api/cashAndExpense/Create.js.map +1 -1
  36. package/dist/cjs/types/Interface/api/payment/Params.d.ts +2 -1
  37. package/dist/cjs/types/Interface/api/payment/Params.d.ts.map +1 -1
  38. package/dist/cjs/types/Interface/api/payment/Params.js +9 -1
  39. package/dist/cjs/types/Interface/api/payment/Params.js.map +1 -1
  40. package/dist/cjs/types/Interface/api/user/RegisterProspect.d.ts +4 -0
  41. package/dist/cjs/types/Interface/api/user/RegisterProspect.d.ts.map +1 -1
  42. package/dist/cjs/types/Interface/api/user/RegisterProspect.js.map +1 -1
  43. package/dist/cjs/types/Interface/api/user/RegisterWebhook.d.ts +6 -0
  44. package/dist/cjs/types/Interface/api/user/RegisterWebhook.d.ts.map +1 -1
  45. package/dist/cjs/types/Interface/api/user/RegisterWebhook.js +22 -0
  46. package/dist/cjs/types/Interface/api/user/RegisterWebhook.js.map +1 -1
  47. package/dist/cjs/types/Interface/models/ILoginApproval.d.ts +31 -0
  48. package/dist/cjs/types/Interface/models/ILoginApproval.d.ts.map +1 -0
  49. package/dist/cjs/types/Interface/models/ILoginApproval.js +3 -0
  50. package/dist/cjs/types/Interface/models/ILoginApproval.js.map +1 -0
  51. package/dist/cjs/types/Interface/models/ISociety.d.ts +1 -1
  52. package/dist/cjs/types/Interface/models/ISociety.d.ts.map +1 -1
  53. package/dist/cjs/types/Interface/models/ISociety.js.map +1 -1
  54. package/dist/cjs/types/Interface/models/IUser.d.ts +2 -0
  55. package/dist/cjs/types/Interface/models/IUser.d.ts.map +1 -1
  56. package/dist/cjs/types/Interface/models/IUser.js.map +1 -1
  57. package/dist/cjs/types/index.d.ts +6 -0
  58. package/dist/cjs/types/index.d.ts.map +1 -1
  59. package/dist/cjs/types/index.js +6 -0
  60. package/dist/cjs/types/index.js.map +1 -1
  61. package/dist/mjs/api/resources/LoginApproval.d.ts +18 -0
  62. package/dist/mjs/api/resources/LoginApproval.d.ts.map +1 -0
  63. package/dist/mjs/api/resources/LoginApproval.js +16 -0
  64. package/dist/mjs/api/resources/LoginApproval.js.map +1 -0
  65. package/dist/mjs/api/resources/Mfa.d.ts +1 -0
  66. package/dist/mjs/api/resources/Mfa.d.ts.map +1 -1
  67. package/dist/mjs/api/resources/Mfa.js +4 -0
  68. package/dist/mjs/api/resources/Mfa.js.map +1 -1
  69. package/dist/mjs/types/Enum/LoginApprovalStatus.d.ts +14 -0
  70. package/dist/mjs/types/Enum/LoginApprovalStatus.d.ts.map +1 -0
  71. package/dist/mjs/types/Enum/LoginApprovalStatus.js +15 -0
  72. package/dist/mjs/types/Enum/LoginApprovalStatus.js.map +1 -0
  73. package/dist/mjs/types/Enum/MfaMode.d.ts +12 -0
  74. package/dist/mjs/types/Enum/MfaMode.d.ts.map +1 -0
  75. package/dist/mjs/types/Enum/MfaMode.js +13 -0
  76. package/dist/mjs/types/Enum/MfaMode.js.map +1 -0
  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/SetMobileApprovalDto.d.ts +5 -0
  85. package/dist/mjs/types/Interface/api/authentification/SetMobileApprovalDto.d.ts.map +1 -0
  86. package/dist/mjs/types/Interface/api/authentification/SetMobileApprovalDto.js +23 -0
  87. package/dist/mjs/types/Interface/api/authentification/SetMobileApprovalDto.js.map +1 -0
  88. package/dist/mjs/types/Interface/api/authentification/loginApproval.d.ts +66 -0
  89. package/dist/mjs/types/Interface/api/authentification/loginApproval.d.ts.map +1 -0
  90. package/dist/mjs/types/Interface/api/authentification/loginApproval.js +23 -0
  91. package/dist/mjs/types/Interface/api/authentification/loginApproval.js.map +1 -0
  92. package/dist/mjs/types/Interface/api/cashAndExpense/Create.d.ts +1 -1
  93. package/dist/mjs/types/Interface/api/cashAndExpense/Create.d.ts.map +1 -1
  94. package/dist/mjs/types/Interface/api/cashAndExpense/Create.js +1 -1
  95. package/dist/mjs/types/Interface/api/cashAndExpense/Create.js.map +1 -1
  96. package/dist/mjs/types/Interface/api/payment/Params.d.ts +2 -1
  97. package/dist/mjs/types/Interface/api/payment/Params.d.ts.map +1 -1
  98. package/dist/mjs/types/Interface/api/payment/Params.js +10 -2
  99. package/dist/mjs/types/Interface/api/payment/Params.js.map +1 -1
  100. package/dist/mjs/types/Interface/api/user/RegisterProspect.d.ts +4 -0
  101. package/dist/mjs/types/Interface/api/user/RegisterProspect.d.ts.map +1 -1
  102. package/dist/mjs/types/Interface/api/user/RegisterProspect.js.map +1 -1
  103. package/dist/mjs/types/Interface/api/user/RegisterWebhook.d.ts +6 -0
  104. package/dist/mjs/types/Interface/api/user/RegisterWebhook.d.ts.map +1 -1
  105. package/dist/mjs/types/Interface/api/user/RegisterWebhook.js +26 -1
  106. package/dist/mjs/types/Interface/api/user/RegisterWebhook.js.map +1 -1
  107. package/dist/mjs/types/Interface/models/ILoginApproval.d.ts +31 -0
  108. package/dist/mjs/types/Interface/models/ILoginApproval.d.ts.map +1 -0
  109. package/dist/mjs/types/Interface/models/ILoginApproval.js +2 -0
  110. package/dist/mjs/types/Interface/models/ILoginApproval.js.map +1 -0
  111. package/dist/mjs/types/Interface/models/ISociety.d.ts +1 -1
  112. package/dist/mjs/types/Interface/models/ISociety.d.ts.map +1 -1
  113. package/dist/mjs/types/Interface/models/ISociety.js.map +1 -1
  114. package/dist/mjs/types/Interface/models/IUser.d.ts +2 -0
  115. package/dist/mjs/types/Interface/models/IUser.d.ts.map +1 -1
  116. package/dist/mjs/types/Interface/models/IUser.js.map +1 -1
  117. package/dist/mjs/types/index.d.ts +6 -0
  118. package/dist/mjs/types/index.d.ts.map +1 -1
  119. package/dist/mjs/types/index.js +6 -0
  120. package/dist/mjs/types/index.js.map +1 -1
  121. package/package.json +17 -17
  122. package/ts/api/resources/LoginApproval.ts +20 -0
  123. package/ts/api/resources/Mfa.ts +6 -0
  124. package/ts/types/Enum/LoginApprovalStatus.ts +13 -0
  125. package/ts/types/Enum/MfaMode.ts +11 -0
  126. package/ts/types/Interface/api/authentification/AuthenticationResponse.ts +10 -0
  127. package/ts/types/Interface/api/authentification/FinalizeMobileApprovalDto.ts +6 -0
  128. package/ts/types/Interface/api/authentification/SetMobileApprovalDto.ts +9 -0
  129. package/ts/types/Interface/api/authentification/loginApproval.ts +75 -0
  130. package/ts/types/Interface/api/cashAndExpense/Create.ts +2 -2
  131. package/ts/types/Interface/api/payment/Params.ts +9 -3
  132. package/ts/types/Interface/api/user/RegisterProspect.ts +4 -0
  133. package/ts/types/Interface/api/user/RegisterWebhook.ts +19 -1
  134. package/ts/types/Interface/models/ILoginApproval.ts +31 -0
  135. package/ts/types/Interface/models/ISociety.ts +1 -1
  136. package/ts/types/Interface/models/IUser.ts +2 -0
  137. package/ts/types/index.ts +6 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "1.3.166",
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,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
  }
@@ -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
+ }
@@ -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';
@@ -1052,6 +1057,7 @@ export * from './Interface/api/changelog/Create';
1052
1057
  export * from './Interface/api/authentification/ReadAuthenticateCollaborater';
1053
1058
  export * from './Interface/api/authentification/ResetPassword';
1054
1059
  export * from './Interface/api/authentification/ForgotPassword';
1060
+ export * from './Interface/api/authentification/loginApproval';
1055
1061
  export * from './Interface/api/society/Export';
1056
1062
  export * from './Interface/api/society/State';
1057
1063
  export * from './Interface/api/businessSector/Create';