@silexpert/core 2.0.0 → 2.0.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.
Files changed (77) hide show
  1. package/dist/api/resources/InformationRequest.d.ts +0 -6
  2. package/dist/api/resources/InformationRequest.d.ts.map +1 -1
  3. package/dist/api/resources/InformationRequest.js +0 -10
  4. package/dist/api/resources/InformationRequest.js.map +1 -1
  5. package/dist/types/Enum/Feature.d.ts +10 -1
  6. package/dist/types/Enum/Feature.d.ts.map +1 -1
  7. package/dist/types/Enum/Feature.js +10 -1
  8. package/dist/types/Enum/Feature.js.map +1 -1
  9. package/dist/types/Interface/api/OnBoarding.d.ts +3 -3
  10. package/dist/types/Interface/api/OnBoarding.d.ts.map +1 -1
  11. package/dist/types/Interface/api/OnBoarding.js +3 -3
  12. package/dist/types/Interface/api/OnBoarding.js.map +1 -1
  13. package/dist/types/Interface/api/cerfa/2571.d.ts +2 -53
  14. package/dist/types/Interface/api/cerfa/2571.d.ts.map +1 -1
  15. package/dist/types/Interface/api/cerfa/2571.js +0 -10
  16. package/dist/types/Interface/api/cerfa/2571.js.map +1 -1
  17. package/dist/types/Interface/api/cerfa/2572.d.ts +9 -150
  18. package/dist/types/Interface/api/cerfa/2572.d.ts.map +1 -1
  19. package/dist/types/Interface/api/cerfa/2572.js +3 -17
  20. package/dist/types/Interface/api/cerfa/2572.js.map +1 -1
  21. package/dist/types/Interface/api/cerfa/2573.d.ts +2 -1
  22. package/dist/types/Interface/api/cerfa/2573.d.ts.map +1 -1
  23. package/dist/types/Interface/api/cerfa/2573.js.map +1 -1
  24. package/dist/types/Interface/api/commercialManagement/Query.d.ts +1 -1
  25. package/dist/types/Interface/api/commercialManagement/Query.d.ts.map +1 -1
  26. package/dist/types/Interface/api/commercialManagement/Query.js +1 -1
  27. package/dist/types/Interface/api/commercialManagement/Query.js.map +1 -1
  28. package/dist/types/Interface/api/equipment/Query.d.ts +1 -1
  29. package/dist/types/Interface/api/equipment/Query.d.ts.map +1 -1
  30. package/dist/types/Interface/api/equipment/Query.js +1 -1
  31. package/dist/types/Interface/api/equipment/Query.js.map +1 -1
  32. package/dist/types/Interface/api/gedFile/createFileAndGed.d.ts +3 -3
  33. package/dist/types/Interface/api/gedFile/createFileAndGed.d.ts.map +1 -1
  34. package/dist/types/Interface/api/gedFile/createFileAndGed.js +3 -3
  35. package/dist/types/Interface/api/gedFile/createFileAndGed.js.map +1 -1
  36. package/dist/types/Interface/api/legalNotice/QueryLegalNotice.d.ts +2 -2
  37. package/dist/types/Interface/api/legalNotice/QueryLegalNotice.d.ts.map +1 -1
  38. package/dist/types/Interface/api/legalNotice/QueryLegalNotice.js +2 -2
  39. package/dist/types/Interface/api/legalNotice/QueryLegalNotice.js.map +1 -1
  40. package/dist/types/Interface/api/letter/Query.d.ts +5 -5
  41. package/dist/types/Interface/api/letter/Query.d.ts.map +1 -1
  42. package/dist/types/Interface/api/letter/Query.js +5 -5
  43. package/dist/types/Interface/api/letter/Query.js.map +1 -1
  44. package/dist/types/Interface/api/societyFollow/Query.d.ts +2 -2
  45. package/dist/types/Interface/api/societyFollow/Query.d.ts.map +1 -1
  46. package/dist/types/Interface/api/societyFollow/Query.js +2 -2
  47. package/dist/types/Interface/api/societyFollow/Query.js.map +1 -1
  48. package/dist/types/Interface/api/supervision/Query.d.ts +8 -8
  49. package/dist/types/Interface/api/supervision/Query.d.ts.map +1 -1
  50. package/dist/types/Interface/api/supervision/Query.js +8 -8
  51. package/dist/types/Interface/api/supervision/Query.js.map +1 -1
  52. package/dist/types/Interface/api/terminationList/QueryPaginateTerminationList.d.ts +3 -3
  53. package/dist/types/Interface/api/terminationList/QueryPaginateTerminationList.d.ts.map +1 -1
  54. package/dist/types/Interface/api/terminationList/QueryPaginateTerminationList.js +3 -3
  55. package/dist/types/Interface/api/terminationList/QueryPaginateTerminationList.js.map +1 -1
  56. package/dist/types/Interface/api/user/RegisterWebhook.d.ts +8 -0
  57. package/dist/types/Interface/api/user/RegisterWebhook.d.ts.map +1 -1
  58. package/dist/types/Interface/api/user/RegisterWebhook.js +43 -1
  59. package/dist/types/Interface/api/user/RegisterWebhook.js.map +1 -1
  60. package/dist/utils/vat/registration.js.map +1 -1
  61. package/package.json +1 -1
  62. package/ts/api/resources/InformationRequest.ts +0 -10
  63. package/ts/types/Enum/Feature.ts +10 -1
  64. package/ts/types/Interface/api/OnBoarding.ts +3 -3
  65. package/ts/types/Interface/api/cerfa/2571.ts +3 -54
  66. package/ts/types/Interface/api/cerfa/2572.ts +10 -148
  67. package/ts/types/Interface/api/cerfa/2573.ts +3 -1
  68. package/ts/types/Interface/api/commercialManagement/Query.ts +1 -1
  69. package/ts/types/Interface/api/equipment/Query.ts +1 -1
  70. package/ts/types/Interface/api/gedFile/createFileAndGed.ts +3 -3
  71. package/ts/types/Interface/api/legalNotice/QueryLegalNotice.ts +2 -2
  72. package/ts/types/Interface/api/letter/Query.ts +5 -5
  73. package/ts/types/Interface/api/societyFollow/Query.ts +2 -2
  74. package/ts/types/Interface/api/supervision/Query.ts +8 -8
  75. package/ts/types/Interface/api/terminationList/QueryPaginateTerminationList.ts +3 -3
  76. package/ts/types/Interface/api/user/RegisterWebhook.ts +31 -2
  77. package/ts/utils/vat/registration.ts +2 -2
@@ -7,12 +7,12 @@ export class QueryPaginatedLegalNotice extends RequiredQueryPaginate {
7
7
  @ApiPropertyOptional()
8
8
  @IsOptional()
9
9
  @IsInt()
10
- year?: number | null;
10
+ year?: number;
11
11
 
12
12
  @ApiPropertyOptional()
13
13
  @IsOptional()
14
14
  @IsInt()
15
- quarter?: number | null;
15
+ quarter?: number;
16
16
 
17
17
  @ApiPropertyOptional()
18
18
  @IsOptional()
@@ -6,7 +6,7 @@ export class QueryLetter {
6
6
  @ApiPropertyOptional()
7
7
  @IsOptional()
8
8
  @IsInt()
9
- idLetter?: number | null;
9
+ idLetter?: number;
10
10
 
11
11
  @ApiPropertyOptional()
12
12
  @IsOptional()
@@ -16,7 +16,7 @@ export class QueryLetter {
16
16
  @ApiPropertyOptional()
17
17
  @IsOptional()
18
18
  @IsInt()
19
- year?: number | null;
19
+ year?: number;
20
20
 
21
21
  @ApiPropertyOptional()
22
22
  @IsOptional()
@@ -31,12 +31,12 @@ export class QueryLetter {
31
31
  @ApiPropertyOptional()
32
32
  @IsOptional()
33
33
  @IsInt()
34
- reason?: number | null;
34
+ reason?: number;
35
35
 
36
36
  @ApiPropertyOptional()
37
37
  @IsOptional()
38
38
  @IsInt()
39
- idUser?: number | null;
39
+ idUser?: number;
40
40
 
41
41
  @ApiPropertyOptional()
42
42
  @IsOptional()
@@ -68,7 +68,7 @@ export class QueryLetter {
68
68
  @ApiPropertyOptional()
69
69
  @IsOptional()
70
70
  @IsInt()
71
- idSociety?: number | null;
71
+ idSociety?: number;
72
72
  }
73
73
 
74
74
  export class QueryLetterPaginate extends QueryLetter {
@@ -24,7 +24,7 @@ export class QueryCreateSocietyFollow {
24
24
  @ApiPropertyOptional()
25
25
  @IsOptional()
26
26
  @IsNumber()
27
- reason?: number | null;
27
+ reason?: number;
28
28
 
29
29
  @ApiPropertyOptional()
30
30
  @IsOptional()
@@ -35,5 +35,5 @@ export class QueryCreateSocietyFollow {
35
35
  @ApiPropertyOptional()
36
36
  @IsOptional()
37
37
  @IsNumber()
38
- idQualificationLead?: number | null;
38
+ idQualificationLead?: number;
39
39
  }
@@ -7,7 +7,7 @@ export class QueryPaginatedBalanceSheetSupervision extends RequiredQueryPaginate
7
7
  @ApiPropertyOptional()
8
8
  @IsOptional()
9
9
  @IsInt()
10
- idSupervision?: number | null;
10
+ idSupervision?: number;
11
11
 
12
12
  @ApiPropertyOptional()
13
13
  @IsOptional()
@@ -17,7 +17,7 @@ export class QueryPaginatedBalanceSheetSupervision extends RequiredQueryPaginate
17
17
  @ApiPropertyOptional()
18
18
  @IsOptional()
19
19
  @IsInt()
20
- state?: number | null;
20
+ state?: number;
21
21
 
22
22
  @ApiPropertyOptional()
23
23
  @IsOptional()
@@ -37,22 +37,22 @@ export class QueryPaginatedBalanceSheetSupervision extends RequiredQueryPaginate
37
37
  @ApiPropertyOptional()
38
38
  @IsOptional()
39
39
  @IsInt()
40
- totalRange?: number | null;
40
+ totalRange?: number;
41
41
 
42
42
  @ApiPropertyOptional()
43
43
  @IsOptional()
44
44
  @IsInt()
45
- month?: number | null;
45
+ month?: number;
46
46
 
47
47
  @ApiPropertyOptional()
48
48
  @IsOptional()
49
49
  @IsInt()
50
- endDate?: number | null;
50
+ endDate?: number;
51
51
 
52
52
  @ApiPropertyOptional()
53
53
  @IsOptional()
54
54
  @IsInt()
55
- year?: number | null;
55
+ year?: number;
56
56
 
57
57
  @ApiPropertyOptional()
58
58
  @IsOptional()
@@ -68,7 +68,7 @@ export class QueryPaginatedBalanceSheetSupervision extends RequiredQueryPaginate
68
68
  @ApiPropertyOptional()
69
69
  @IsOptional()
70
70
  @IsInt()
71
- expertSelected?: number | null;
71
+ expertSelected?: number;
72
72
 
73
73
  @ApiPropertyOptional()
74
74
  @IsOptional()
@@ -84,7 +84,7 @@ export class QueryPaginatedBalanceSheetSupervision extends RequiredQueryPaginate
84
84
  @ApiPropertyOptional()
85
85
  @IsOptional()
86
86
  @IsInt()
87
- labKeeping?: number | null;
87
+ labKeeping?: number;
88
88
 
89
89
  @ApiPropertyOptional()
90
90
  @IsOptional()
@@ -84,15 +84,15 @@ export class QueryPaginateTerminationList {
84
84
  @ApiPropertyOptional()
85
85
  @IsOptional()
86
86
  @IsInt()
87
- idType?: number | null;
87
+ idType?: number;
88
88
 
89
89
  @ApiPropertyOptional()
90
90
  @IsOptional()
91
91
  @IsInt()
92
- idState?: number | null;
92
+ idState?: number;
93
93
 
94
94
  @ApiPropertyOptional()
95
95
  @IsOptional()
96
96
  @IsInt()
97
- idTerminationConclusion?: number | null;
97
+ idTerminationConclusion?: number;
98
98
  }
@@ -1,7 +1,6 @@
1
- import { IsBoolean, IsEmail, IsOptional, IsPhoneNumber, IsString, ValidateNested } from 'class-validator';
1
+ import { IsBoolean, IsEmail, IsInt, IsOptional, IsPhoneNumber, IsString, ValidateNested } from 'class-validator';
2
2
  import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
3
3
  import { ToBoolean } from '../../../../utils/transforms/boolean.transform.js';
4
-
5
4
  class RegisterReadablePermission {
6
5
  @ApiPropertyOptional()
7
6
  @IsOptional()
@@ -56,3 +55,33 @@ export class RegisterWebhookBody {
56
55
  @ValidateNested()
57
56
  permissions?: RegisterReadablePermission;
58
57
  }
58
+
59
+ export class RegisterSocietyWebhookBody {
60
+ @ApiPropertyOptional()
61
+ @IsOptional()
62
+ @IsString()
63
+ companyName?: string;
64
+
65
+ @ApiPropertyOptional()
66
+ @IsOptional()
67
+ @IsString()
68
+ legalForm?: string;
69
+
70
+ @ApiPropertyOptional()
71
+ @IsOptional()
72
+ @IsString()
73
+ siret?: string;
74
+
75
+ @ApiPropertyOptional()
76
+ @IsOptional()
77
+ @IsString()
78
+ nafCode?: string;
79
+
80
+ @ApiPropertyOptional()
81
+ @ValidateNested()
82
+ permissions?: RegisterReadablePermission;
83
+
84
+ @ApiProperty()
85
+ @IsInt()
86
+ idUser: number;
87
+ }
@@ -2,8 +2,8 @@ import dayjs from 'dayjs';
2
2
  import { isDefined } from 'class-validator';
3
3
  import { sumBy, reverse } from 'lodash-es';
4
4
  import {
5
+ AnyCerfa2571Century,
5
6
  AnyCerfa3310_Century,
6
- Cerfa2571_2023,
7
7
  Cerfa2573_2024,
8
8
  Cerfa3514_2022,
9
9
  CerfaType,
@@ -206,7 +206,7 @@ export function getTypeAndAmountFromRegistration(registration: IRegistration): {
206
206
  CerfaType.CERFA_2571_2023_D,
207
207
  ].includes(registration.idCerfaType)
208
208
  ) {
209
- const payload = registration.payload.cerfa2571 as Cerfa2571_2023;
209
+ const payload = registration.payload.cerfa2571 as AnyCerfa2571Century;
210
210
 
211
211
  if (registration.customerIsRegime?.type === TaxType.TO_PAY) {
212
212
  return {