@silexpert/core 0.4.114 → 0.4.117

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 (180) hide show
  1. package/es/api/resources/BalanceSheetQuestion.d.ts +6 -0
  2. package/es/api/resources/BalanceSheetQuestion.d.ts.map +1 -0
  3. package/es/api/resources/BalanceSheetQuestion.js +7 -0
  4. package/es/api/resources/BalanceSheetQuestion.js.map +1 -0
  5. package/es/api/resources/Cerfa.d.ts +8 -1
  6. package/es/api/resources/Cerfa.d.ts.map +1 -1
  7. package/es/api/resources/Cerfa.js +5 -0
  8. package/es/api/resources/Cerfa.js.map +1 -1
  9. package/es/api/resources/ExerciceQuestion.d.ts +8 -0
  10. package/es/api/resources/ExerciceQuestion.d.ts.map +1 -0
  11. package/es/api/resources/ExerciceQuestion.js +13 -0
  12. package/es/api/resources/ExerciceQuestion.js.map +1 -0
  13. package/es/api/resources/PartneredAccountant.d.ts +3 -1
  14. package/es/api/resources/PartneredAccountant.d.ts.map +1 -1
  15. package/es/api/resources/PartneredAccountant.js +6 -0
  16. package/es/api/resources/PartneredAccountant.js.map +1 -1
  17. package/es/api/resources/VatControl.d.ts +10 -0
  18. package/es/api/resources/VatControl.d.ts.map +1 -0
  19. package/es/api/resources/VatControl.js +20 -0
  20. package/es/api/resources/VatControl.js.map +1 -0
  21. package/es/api/resources.d.ts +6 -0
  22. package/es/api/resources.d.ts.map +1 -1
  23. package/es/api/resources.js +6 -0
  24. package/es/api/resources.js.map +1 -1
  25. package/es/types/Enum/AnswerTypeValue.d.ts +10 -0
  26. package/es/types/Enum/AnswerTypeValue.d.ts.map +1 -0
  27. package/es/types/Enum/AnswerTypeValue.js +12 -0
  28. package/es/types/Enum/AnswerTypeValue.js.map +1 -0
  29. package/es/types/Enum/BalanceSheetQuestion.d.ts +12 -0
  30. package/es/types/Enum/BalanceSheetQuestion.d.ts.map +1 -0
  31. package/es/types/Enum/BalanceSheetQuestion.js +14 -0
  32. package/es/types/Enum/BalanceSheetQuestion.js.map +1 -0
  33. package/es/types/Enum/PartneredAccountantServiceType.d.ts +11 -0
  34. package/es/types/Enum/PartneredAccountantServiceType.d.ts.map +1 -0
  35. package/es/types/Enum/PartneredAccountantServiceType.js +40 -0
  36. package/es/types/Enum/PartneredAccountantServiceType.js.map +1 -0
  37. package/es/types/Enum/PartneredAccountantServiceTypeId.d.ts +9 -0
  38. package/es/types/Enum/PartneredAccountantServiceTypeId.d.ts.map +1 -0
  39. package/es/types/Enum/PartneredAccountantServiceTypeId.js +10 -0
  40. package/es/types/Enum/PartneredAccountantServiceTypeId.js.map +1 -0
  41. package/es/types/Interface/api/balanceSheetModule/CreateBalanceSheetModule.d.ts +1 -0
  42. package/es/types/Interface/api/balanceSheetModule/CreateBalanceSheetModule.d.ts.map +1 -1
  43. package/es/types/Interface/api/balanceSheetModule/CreateBalanceSheetModule.js +7 -0
  44. package/es/types/Interface/api/balanceSheetModule/CreateBalanceSheetModule.js.map +1 -1
  45. package/es/types/Interface/api/balanceSheetModule/UpdateBalanceSheetModule.d.ts +1 -0
  46. package/es/types/Interface/api/balanceSheetModule/UpdateBalanceSheetModule.d.ts.map +1 -1
  47. package/es/types/Interface/api/balanceSheetModule/UpdateBalanceSheetModule.js +7 -0
  48. package/es/types/Interface/api/balanceSheetModule/UpdateBalanceSheetModule.js.map +1 -1
  49. package/es/types/Interface/api/cerfa/ReadCerfa.d.ts +6 -0
  50. package/es/types/Interface/api/cerfa/ReadCerfa.d.ts.map +1 -0
  51. package/es/types/Interface/api/cerfa/ReadCerfa.js +2 -0
  52. package/es/types/Interface/api/cerfa/ReadCerfa.js.map +1 -0
  53. package/es/types/Interface/api/exerciceQuestion/CreateExerciceQuestion.d.ts +10 -0
  54. package/es/types/Interface/api/exerciceQuestion/CreateExerciceQuestion.d.ts.map +1 -0
  55. package/es/types/Interface/api/exerciceQuestion/CreateExerciceQuestion.js +43 -0
  56. package/es/types/Interface/api/exerciceQuestion/CreateExerciceQuestion.js.map +1 -0
  57. package/es/types/Interface/api/exerciceQuestion/QueryQuestion.d.ts +5 -0
  58. package/es/types/Interface/api/exerciceQuestion/QueryQuestion.d.ts.map +1 -0
  59. package/es/types/Interface/api/exerciceQuestion/QueryQuestion.js +23 -0
  60. package/es/types/Interface/api/exerciceQuestion/QueryQuestion.js.map +1 -0
  61. package/es/types/Interface/api/partneredAccountant/CreatePartneredAccountantRequestedService.d.ts +1 -0
  62. package/es/types/Interface/api/partneredAccountant/CreatePartneredAccountantRequestedService.d.ts.map +1 -1
  63. package/es/types/Interface/api/partneredAccountant/CreatePartneredAccountantRequestedService.js +4 -0
  64. package/es/types/Interface/api/partneredAccountant/CreatePartneredAccountantRequestedService.js.map +1 -1
  65. package/es/types/Interface/api/partneredAccountant/CreatePartneredAccountantRequestedServiceExpress.d.ts +7 -0
  66. package/es/types/Interface/api/partneredAccountant/CreatePartneredAccountantRequestedServiceExpress.d.ts.map +1 -0
  67. package/es/types/Interface/api/partneredAccountant/CreatePartneredAccountantRequestedServiceExpress.js +32 -0
  68. package/es/types/Interface/api/partneredAccountant/CreatePartneredAccountantRequestedServiceExpress.js.map +1 -0
  69. package/es/types/Interface/api/partneredAccountant/UpdatePartneredAccountantSoldService.d.ts +2 -0
  70. package/es/types/Interface/api/partneredAccountant/UpdatePartneredAccountantSoldService.d.ts.map +1 -1
  71. package/es/types/Interface/api/partneredAccountant/UpdatePartneredAccountantSoldService.js +8 -0
  72. package/es/types/Interface/api/partneredAccountant/UpdatePartneredAccountantSoldService.js.map +1 -1
  73. package/es/types/Interface/models/IAnswerType.d.ts +9 -0
  74. package/es/types/Interface/models/IAnswerType.d.ts.map +1 -0
  75. package/es/types/Interface/models/IAnswerType.js +2 -0
  76. package/es/types/Interface/models/IAnswerType.js.map +1 -0
  77. package/es/types/Interface/models/IAnswerTypeValue.d.ts +10 -0
  78. package/es/types/Interface/models/IAnswerTypeValue.d.ts.map +1 -0
  79. package/es/types/Interface/models/IAnswerTypeValue.js +2 -0
  80. package/es/types/Interface/models/IAnswerTypeValue.js.map +1 -0
  81. package/es/types/Interface/models/IApiError.d.ts +3 -1
  82. package/es/types/Interface/models/IApiError.d.ts.map +1 -1
  83. package/es/types/Interface/models/IApiError.js +3 -0
  84. package/es/types/Interface/models/IApiError.js.map +1 -1
  85. package/es/types/Interface/models/IBalanceSheetModule.d.ts +1 -0
  86. package/es/types/Interface/models/IBalanceSheetModule.d.ts.map +1 -1
  87. package/es/types/Interface/models/IBalanceSheetModule.js.map +1 -1
  88. package/es/types/Interface/models/IBalanceSheetQuestion.d.ts +11 -0
  89. package/es/types/Interface/models/IBalanceSheetQuestion.d.ts.map +1 -0
  90. package/es/types/Interface/models/IBalanceSheetQuestion.js +2 -0
  91. package/es/types/Interface/models/IBalanceSheetQuestion.js.map +1 -0
  92. package/es/types/Interface/models/IExerciceQuestion.d.ts +16 -0
  93. package/es/types/Interface/models/IExerciceQuestion.d.ts.map +1 -0
  94. package/es/types/Interface/models/IExerciceQuestion.js +2 -0
  95. package/es/types/Interface/models/IExerciceQuestion.js.map +1 -0
  96. package/es/types/index.d.ts +12 -0
  97. package/es/types/index.d.ts.map +1 -1
  98. package/es/types/index.js +12 -0
  99. package/es/types/index.js.map +1 -1
  100. package/es/utils/cerfa.d.ts +6 -0
  101. package/es/utils/cerfa.d.ts.map +1 -0
  102. package/es/utils/cerfa.js +20 -0
  103. package/es/utils/cerfa.js.map +1 -0
  104. package/js/api/resources/BalanceSheetQuestion.js +20 -0
  105. package/js/api/resources/BalanceSheetQuestion.js.map +1 -0
  106. package/js/api/resources/Cerfa.js +12 -0
  107. package/js/api/resources/Cerfa.js.map +1 -1
  108. package/js/api/resources/ExerciceQuestion.js +28 -0
  109. package/js/api/resources/ExerciceQuestion.js.map +1 -0
  110. package/js/api/resources/PartneredAccountant.js +8 -0
  111. package/js/api/resources/PartneredAccountant.js.map +1 -1
  112. package/js/api/resources/VatControl.js +46 -0
  113. package/js/api/resources/VatControl.js.map +1 -0
  114. package/js/api/resources.js +10 -1
  115. package/js/api/resources.js.map +1 -1
  116. package/js/types/Enum/AnswerTypeValue.js +20 -0
  117. package/js/types/Enum/AnswerTypeValue.js.map +1 -0
  118. package/js/types/Enum/BalanceSheetQuestion.js +22 -0
  119. package/js/types/Enum/BalanceSheetQuestion.js.map +1 -0
  120. package/js/types/Enum/PartneredAccountantServiceType.js +48 -0
  121. package/js/types/Enum/PartneredAccountantServiceType.js.map +1 -0
  122. package/js/types/Enum/PartneredAccountantServiceTypeId.js +16 -0
  123. package/js/types/Enum/PartneredAccountantServiceTypeId.js.map +1 -0
  124. package/js/types/Interface/api/balanceSheetModule/CreateBalanceSheetModule.js +2 -0
  125. package/js/types/Interface/api/balanceSheetModule/CreateBalanceSheetModule.js.map +1 -1
  126. package/js/types/Interface/api/balanceSheetModule/UpdateBalanceSheetModule.js +2 -0
  127. package/js/types/Interface/api/balanceSheetModule/UpdateBalanceSheetModule.js.map +1 -1
  128. package/js/types/Interface/api/cerfa/ReadCerfa.js +6 -0
  129. package/js/types/Interface/api/cerfa/ReadCerfa.js.map +1 -0
  130. package/js/types/Interface/api/exerciceQuestion/CreateExerciceQuestion.js +39 -0
  131. package/js/types/Interface/api/exerciceQuestion/CreateExerciceQuestion.js.map +1 -0
  132. package/js/types/Interface/api/exerciceQuestion/QueryQuestion.js +33 -0
  133. package/js/types/Interface/api/exerciceQuestion/QueryQuestion.js.map +1 -0
  134. package/js/types/Interface/api/partneredAccountant/CreatePartneredAccountantRequestedService.js +2 -0
  135. package/js/types/Interface/api/partneredAccountant/CreatePartneredAccountantRequestedService.js.map +1 -1
  136. package/js/types/Interface/api/partneredAccountant/CreatePartneredAccountantRequestedServiceExpress.js +37 -0
  137. package/js/types/Interface/api/partneredAccountant/CreatePartneredAccountantRequestedServiceExpress.js.map +1 -0
  138. package/js/types/Interface/api/partneredAccountant/UpdatePartneredAccountantSoldService.js +4 -0
  139. package/js/types/Interface/api/partneredAccountant/UpdatePartneredAccountantSoldService.js.map +1 -1
  140. package/js/types/Interface/models/IAnswerType.js +6 -0
  141. package/js/types/Interface/models/IAnswerType.js.map +1 -0
  142. package/js/types/Interface/models/IAnswerTypeValue.js +6 -0
  143. package/js/types/Interface/models/IAnswerTypeValue.js.map +1 -0
  144. package/js/types/Interface/models/IApiError.js +4 -1
  145. package/js/types/Interface/models/IApiError.js.map +1 -1
  146. package/js/types/Interface/models/IBalanceSheetQuestion.js +6 -0
  147. package/js/types/Interface/models/IBalanceSheetQuestion.js.map +1 -0
  148. package/js/types/Interface/models/IExerciceQuestion.js +6 -0
  149. package/js/types/Interface/models/IExerciceQuestion.js.map +1 -0
  150. package/js/types/index.js +144 -0
  151. package/js/types/index.js.map +1 -1
  152. package/js/utils/cerfa.js +33 -0
  153. package/js/utils/cerfa.js.map +1 -0
  154. package/package.json +1 -1
  155. package/ts/api/resources/BalanceSheetQuestion.ts +8 -0
  156. package/ts/api/resources/Cerfa.ts +11 -1
  157. package/ts/api/resources/ExerciceQuestion.ts +16 -0
  158. package/ts/api/resources/PartneredAccountant.ts +9 -0
  159. package/ts/api/resources/VatControl.ts +26 -0
  160. package/ts/api/resources.ts +6 -0
  161. package/ts/types/Enum/AnswerTypeValue.ts +10 -0
  162. package/ts/types/Enum/BalanceSheetQuestion.ts +12 -0
  163. package/ts/types/Enum/PartneredAccountantServiceType.ts +52 -0
  164. package/ts/types/Enum/PartneredAccountantServiceTypeId.ts +8 -0
  165. package/ts/types/Interface/api/balanceSheetModule/CreateBalanceSheetModule.ts +6 -0
  166. package/ts/types/Interface/api/balanceSheetModule/UpdateBalanceSheetModule.ts +6 -0
  167. package/ts/types/Interface/api/cerfa/ReadCerfa.ts +6 -0
  168. package/ts/types/Interface/api/exerciceQuestion/CreateExerciceQuestion.ts +33 -0
  169. package/ts/types/Interface/api/exerciceQuestion/QueryQuestion.ts +12 -0
  170. package/ts/types/Interface/api/partneredAccountant/CreatePartneredAccountantRequestedService.ts +3 -0
  171. package/ts/types/Interface/api/partneredAccountant/CreatePartneredAccountantRequestedServiceExpress.ts +18 -0
  172. package/ts/types/Interface/api/partneredAccountant/UpdatePartneredAccountantSoldService.ts +6 -0
  173. package/ts/types/Interface/models/IAnswerType.ts +12 -0
  174. package/ts/types/Interface/models/IAnswerTypeValue.ts +13 -0
  175. package/ts/types/Interface/models/IApiError.ts +4 -0
  176. package/ts/types/Interface/models/IBalanceSheetModule.ts +1 -0
  177. package/ts/types/Interface/models/IBalanceSheetQuestion.ts +14 -0
  178. package/ts/types/Interface/models/IExerciceQuestion.ts +19 -0
  179. package/ts/types/index.ts +12 -0
  180. package/ts/utils/cerfa.ts +26 -0
@@ -18,6 +18,7 @@ import {
18
18
  QueryPartneredAccountantSocieties,
19
19
  CreatedPartneredAccountantSociety,
20
20
  ReadPartneredAccountantInvoice,
21
+ CreatePartneredAccountantRequestedServiceExpress,
21
22
  } from '../../types';
22
23
  import { Resource } from '../Resource';
23
24
  import { ReadPartneredAccountantSociety } from '../../types/Interface/api/partneredAccountant/ReadPartneredAccountantSociety';
@@ -66,6 +67,14 @@ export class PartneredAccountant extends Resource {
66
67
  return this.axios.$post(`/partnered-accountants/${idPartneredAccountant}/requested-services`, payload);
67
68
  }
68
69
 
70
+ createRequestedServicesExpress(payload: Array<CreatePartneredAccountantRequestedServiceExpress>): Promise<Array<IPartneredAccountantCompanyService>> {
71
+ return this.axios.$post('/partnered-accountants/requested-services/express', payload);
72
+ }
73
+
74
+ duplicateRequestedService(idRequest: number): Promise<Array<IPartneredAccountantCompanyService>> {
75
+ return this.axios.$post(`/partnered-accountants/requested-service/${idRequest}/duplicate`);
76
+ }
77
+
69
78
  getPaginatedSocieties(params: QueryPaginate & QueryPartneredAccountantSocieties, cancelToken?: CancelToken): Promise<BasePaginate<ReadPartneredAccountantSociety>> {
70
79
  return this.axios.$get('/partnered-accountants/societies', {
71
80
  ...(cancelToken ? { cancelToken } : {}),
@@ -0,0 +1,26 @@
1
+ import {
2
+ CreateExerciceQuestions, IBalanceSheetQuestion, IExerciceQuestion, QueryVat, QuestionTheme, ReadVat,
3
+ } from '../..';
4
+ import { Resource } from '../Resource';
5
+
6
+ export class VatControl extends Resource {
7
+ getComputedVatValues(params: QueryVat): Promise<ReadVat> {
8
+ return this.axios.$get('/dashboard/vat', { params });
9
+ }
10
+
11
+ getQuestions(): Promise<Array<IBalanceSheetQuestion>> {
12
+ return this.axios.$get('/balance-sheets/questions', { params: { themes: [QuestionTheme.VAT_CONTROL] } });
13
+ }
14
+
15
+ getExerciceQuestions(idExercice: number): Promise<Array<IExerciceQuestion>> {
16
+ return this.axios.$get(`/balance-sheets/exercices/${idExercice}/questions`, { params: { themes: [QuestionTheme.VAT_CONTROL] } });
17
+ }
18
+
19
+ bulkCreate(idExercice: number, payload: CreateExerciceQuestions): Promise<Array<IExerciceQuestion>> {
20
+ return this.axios.$post(`/balance-sheets/exercices/${idExercice}/questions/batch-create`, payload);
21
+ }
22
+
23
+ bulkUpdate(idExercice: number, payload: CreateExerciceQuestions): Promise<void> {
24
+ return this.axios.$post(`/balance-sheets/exercices/${idExercice}/questions/batch-update`, payload);
25
+ }
26
+ }
@@ -47,6 +47,9 @@ import { Journal } from './resources/Journal';
47
47
  import { Product } from './resources/Product';
48
48
  import { MealExpense } from './resources/MealExpense';
49
49
  import { InternalInvoicing } from './resources/InternalInvoicing';
50
+ import { BalanceSheetQuestion } from './resources/BalanceSheetQuestion';
51
+ import { ExerciceQuestion } from './resources/ExerciceQuestion';
52
+ import { VatControl } from './resources/VatControl';
50
53
 
51
54
  export const resources = {
52
55
  simulation: Simulation,
@@ -98,4 +101,7 @@ export const resources = {
98
101
  journal: Journal,
99
102
  product: Product,
100
103
  mealExpense: MealExpense,
104
+ balanceSheetQuestion: BalanceSheetQuestion,
105
+ exerciceQuestion: ExerciceQuestion,
106
+ vatControl: VatControl,
101
107
  };
@@ -0,0 +1,10 @@
1
+ export enum AnswerType {
2
+ YES_NO_ENUM = 'YES_NO_ENUM',
3
+ FREE_TEXT = 'FREE_TEXT',
4
+ PRICE = 'PRICE',
5
+ }
6
+
7
+ export enum AnswerTypeValue {
8
+ YES = 'Oui',
9
+ NO = 'Non',
10
+ }
@@ -0,0 +1,12 @@
1
+ export enum QuestionTheme {
2
+ CAPITAL = 'CAPITAL',
3
+ VAT_CONTROL = 'VAT_CONTROL',
4
+ }
5
+
6
+ export enum Question {
7
+ CAPITAL_FULLY_REPAID = 'Est ce que le capital a été entièrement reversé et est détenu à au moins 75 % par des personnes physiques ?',
8
+ CAPITAL_FULLY_PAID_UP = 'Est ce que le capital social est entièrement libéré ?',
9
+ VERIFIED_DEDUCTIBLE_VAT = 'TVA déductible',
10
+ VERIFIED_COLLECTED_VAT = 'TVA collectée',
11
+ VERIFIED_DEDUCTIBLE_VAT_FROM_RETROCESSION_FEES = 'Dont TVA déductible afférente aux honoraires retrocédés',
12
+ }
@@ -0,0 +1,52 @@
1
+ import { PartneredAccountantServiceTypeId } from './PartneredAccountantServiceTypeId';
2
+
3
+ export type PartneredAccountantServiceTypeTypeContent = {
4
+ id: number;
5
+ name: string;
6
+ imageSVG: string;
7
+ imagePNG: string;
8
+ };
9
+
10
+ export type PartneredAccountantServiceTypeType = {
11
+ [key: string]: PartneredAccountantServiceTypeTypeContent
12
+ };
13
+
14
+ export const PartneredAccountantServiceType: PartneredAccountantServiceTypeType = {
15
+ CERTIFICATION: {
16
+ id: PartneredAccountantServiceTypeId.CERTIFICATION,
17
+ name: 'Certification du bilan',
18
+ imageSVG: 'certificationDuBilan.svg',
19
+ imagePNG: 'Icon_3.png',
20
+ },
21
+ FOLLOW_UP: {
22
+ id: PartneredAccountantServiceTypeId.FOLLOW_UP,
23
+ name: 'Suivi comptable',
24
+ imageSVG: 'suiviMensuel.svg',
25
+ imagePNG: 'Icon_1.png',
26
+ },
27
+ FORECAST: {
28
+ id: PartneredAccountantServiceTypeId.FORECAST,
29
+ name: 'Bilan prévisionnel',
30
+ imageSVG: 'bilanPrevisionnel.svg',
31
+ imagePNG: 'Icon_2.png',
32
+ },
33
+ CREATION_DISSOLUTION: {
34
+ id: PartneredAccountantServiceTypeId.CREATION_DISSOLUTION,
35
+ name: 'Constitution/ dissolution',
36
+ imageSVG: 'dissolution.svg',
37
+ imagePNG: 'Icon_8.png',
38
+ },
39
+ LIQUIDATION: {
40
+ id: PartneredAccountantServiceTypeId.LIQUIDATION,
41
+ name: 'Bilan de liquidation',
42
+ imageSVG: 'bilanLiquidation.svg',
43
+ imagePNG: 'Icon_7.png',
44
+ },
45
+ OTHER: {
46
+ id: PartneredAccountantServiceTypeId.OTHER,
47
+ name: 'Conseils et autres',
48
+ imageSVG: 'prestationGenerique.svg',
49
+ imagePNG: 'Icon_9.png',
50
+ },
51
+
52
+ };
@@ -0,0 +1,8 @@
1
+ export enum PartneredAccountantServiceTypeId {
2
+ CERTIFICATION = 1,
3
+ FOLLOW_UP = 2,
4
+ FORECAST = 3,
5
+ CREATION_DISSOLUTION = 4,
6
+ LIQUIDATION = 5,
7
+ OTHER = 6,
8
+ }
@@ -51,6 +51,12 @@ export class CreateBalanceSheetModuleForm {
51
51
  @IsOptional()
52
52
  hasMealExpenses?: boolean | null;
53
53
 
54
+ @ApiPropertyOptional()
55
+ @IsBoolean()
56
+ @ToBoolean()
57
+ @IsOptional()
58
+ hasCheckedVAT?: boolean | null;
59
+
54
60
  @ApiProperty()
55
61
  idExercice: number;
56
62
  }
@@ -51,6 +51,12 @@ export class UpdateBalanceSheetModuleForm {
51
51
  @IsOptional()
52
52
  hasMealExpenses?: boolean | null;
53
53
 
54
+ @ApiPropertyOptional()
55
+ @IsBoolean()
56
+ @ToBoolean()
57
+ @IsOptional()
58
+ hasCheckedVAT?: boolean | null;
59
+
54
60
  @ApiPropertyOptional()
55
61
  idExercice?: number;
56
62
  }
@@ -0,0 +1,6 @@
1
+ import { CerfaType } from '../../../Enum/CerfaType';
2
+
3
+ export interface ReadCerfaToComplete {
4
+ declaration: CerfaType;
5
+ annex: CerfaType | null
6
+ }
@@ -0,0 +1,33 @@
1
+ import {
2
+ ArrayUnique,
3
+ IsArray,
4
+ IsInt, IsOptional, IsPositive, IsString, ValidateNested,
5
+ } from 'class-validator';
6
+ import { ApiProperty, ApiPropertyOptional } from '../../../..';
7
+
8
+ class ExerciceQuestion {
9
+ @ApiProperty()
10
+ @IsInt()
11
+ @IsPositive()
12
+ idQuestion: number;
13
+
14
+ @ApiPropertyOptional()
15
+ @IsOptional()
16
+ @IsInt()
17
+ @IsPositive()
18
+ idAnswerTypeValue?: number;
19
+
20
+ @ApiPropertyOptional()
21
+ @IsOptional()
22
+ @IsString()
23
+ answer?: string;
24
+ }
25
+
26
+ export class CreateExerciceQuestions {
27
+ @IsArray()
28
+ @ArrayUnique((q) => q.idQuestion)
29
+ @ValidateNested({
30
+ each: true,
31
+ })
32
+ exerciceQuestions: Array<ExerciceQuestion>;
33
+ }
@@ -0,0 +1,12 @@
1
+ import { IsEnum, IsOptional } from 'class-validator';
2
+ import { QuestionTheme } from '../../..';
3
+ import { ApiPropertyOptional } from '../../../..';
4
+
5
+ export class QueryQuestion {
6
+ @ApiPropertyOptional()
7
+ @IsOptional()
8
+ @IsEnum(QuestionTheme, {
9
+ each: true,
10
+ })
11
+ themes?: Array<QuestionTheme>;
12
+ }
@@ -9,4 +9,7 @@ export class CreatePartneredAccountantRequestedService {
9
9
 
10
10
  @ApiPropertyOptional()
11
11
  preTaxPrice?: number;
12
+
13
+ @ApiPropertyOptional()
14
+ idServiceType?: number;
12
15
  }
@@ -0,0 +1,18 @@
1
+ import { IsEnum } from 'class-validator';
2
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
+ import { PartneredAccountantServiceTypeId } from '../../../Enum/PartneredAccountantServiceTypeId';
4
+
5
+ export class CreatePartneredAccountantRequestedServiceExpress {
6
+ @ApiPropertyOptional()
7
+ idPartneredAccountantService?: number;
8
+
9
+ @ApiProperty()
10
+ notes: string;
11
+
12
+ @ApiPropertyOptional()
13
+ preTaxPrice?: number;
14
+
15
+ @ApiPropertyOptional()
16
+ @IsEnum(PartneredAccountantServiceTypeId)
17
+ idServiceType?: number;
18
+ }
@@ -14,4 +14,10 @@ export class UpdatePartneredAccountantSoldService {
14
14
 
15
15
  @ApiPropertyOptional()
16
16
  preTaxPrice?: number;
17
+
18
+ @ApiPropertyOptional()
19
+ idPartneredAccountantService?: number;
20
+
21
+ @ApiPropertyOptional()
22
+ idServiceType?: number;
17
23
  }
@@ -0,0 +1,12 @@
1
+ import { IAnswerTypeValue } from '../..';
2
+
3
+ export interface IAnswerType {
4
+ id: number;
5
+ type: string;
6
+
7
+ createdAt?: Date | null;
8
+ updatedAt?: Date | null;
9
+
10
+ // Associations
11
+ answerTypeValues?: Array<IAnswerTypeValue>;
12
+ }
@@ -0,0 +1,13 @@
1
+ import { IAnswerType } from '../..';
2
+
3
+ export interface IAnswerTypeValue {
4
+ id: number;
5
+ idAnswerType: number;
6
+ value: string;
7
+
8
+ createdAt?: Date | null;
9
+ updatedAt?: Date | null;
10
+
11
+ // Associations
12
+ answerType?: IAnswerType;
13
+ }
@@ -138,6 +138,10 @@ export enum Code {
138
138
 
139
139
  // Accounts
140
140
  GENERIC_ACCOUNT_NOT_FOUND = 'GENERIC_ACCOUNT_NOT_FOUND',
141
+
142
+ // Balance Sheet Questions
143
+ UNKNOWN_ANSWER_VALUE = 'UNKNOWN_ANSWER_VALUE',
144
+ QUESTION_ALREADY_EXISTS_IN_EXERCICE = 'QUESTION_ALREADY_EXISTS_IN_EXERCICE',
141
145
  }
142
146
 
143
147
  export interface IApiError {
@@ -14,6 +14,7 @@ export interface IBalanceSheetModule {
14
14
  hasManualEntryToDeclare?: boolean | null;
15
15
  hasLaundryFees?: boolean | null;
16
16
  hasMealExpenses?: boolean | null;
17
+ hasCheckedVAT?: boolean | null;
17
18
  idSociety: number;
18
19
  idExercice: number;
19
20
  createdAt?: Date | null;
@@ -0,0 +1,14 @@
1
+ import { IAnswerType } from './IAnswerType';
2
+
3
+ export interface IBalanceSheetQuestion {
4
+ id: number;
5
+ name: string;
6
+ theme: string;
7
+ idAnswerType: number;
8
+
9
+ createdAt?: Date | null;
10
+ updatedAt?: Date | null;
11
+
12
+ // Associations
13
+ answerType?: IAnswerType;
14
+ }
@@ -0,0 +1,19 @@
1
+ import { IAnswerTypeValue } from './IAnswerTypeValue';
2
+ import { IBalanceSheetQuestion } from './IBalanceSheetQuestion';
3
+ import { IExercice } from './IExercice';
4
+
5
+ export interface IExerciceQuestion {
6
+ id: number;
7
+ idExercice: number;
8
+ idQuestion: number;
9
+ idAnswerTypeValue?: number;
10
+ answer?: string;
11
+
12
+ createdAt?: Date | null;
13
+ updatedAt?: Date | null;
14
+
15
+ // Associations
16
+ exercice?: IExercice;
17
+ question?: IBalanceSheetQuestion;
18
+ answerTypeValue?: IAnswerTypeValue;
19
+ }
package/ts/types/index.ts CHANGED
@@ -291,6 +291,10 @@ export * from './Interface/models/IRevisionGuide';
291
291
  export * from './Interface/models/ISponsorshipWithSponsorInfo';
292
292
  export * from './Interface/models/ILastUpdateConnection';
293
293
  export * from './Interface/models/IAccountsSectors';
294
+ export * from './Interface/models/IAnswerType';
295
+ export * from './Interface/models/IAnswerTypeValue';
296
+ export * from './Interface/models/IBalanceSheetQuestion';
297
+ export * from './Interface/models/IExerciceQuestion';
294
298
 
295
299
  // Forms
296
300
  export * from './Form/FormAuthenticate';
@@ -298,6 +302,7 @@ export * from './Form/FormConnector';
298
302
 
299
303
  // Enums
300
304
  export * from './Enum/Tax';
305
+ export * from './Enum/ProfitsType';
301
306
  export * from './Enum/RegistrationSource';
302
307
  export * from './Enum/Log';
303
308
  export * from './Enum/Quality';
@@ -370,10 +375,14 @@ export * from './Enum/ProductType';
370
375
  export * from './Enum/Unit';
371
376
  export * from './Enum/MealExpenseTresholds';
372
377
  export * from './Enum/MimeType';
378
+ export * from './Enum/BalanceSheetQuestion';
379
+ export * from './Enum/AnswerTypeValue';
380
+ export * from './Enum/PartneredAccountantServiceType';
373
381
 
374
382
  // Interfaces API
375
383
  export * from './Interface/api/businessPartner/ReadBusinessPartner';
376
384
  export * from './Interface/api/simulation/CreateSimulation';
385
+ export * from './Interface/api/cerfa/ReadCerfa';
377
386
  export * from './Interface/api/accountingEntry/AnnotateAccountingTransaction';
378
387
  export * from './Interface/api/accountingEntry/CreateManualEntry';
379
388
  export * from './Interface/api/immobilization/ReadFormattedImmobilization';
@@ -534,6 +543,7 @@ export * from './Interface/api/partneredAccountant/QueryParteneredAccountantSold
534
543
  export * from './Interface/api/partneredAccountant/ReadPartneredAccountantSoldServicesPaginated';
535
544
  export * from './Interface/api/partneredAccountant/ReadPartneredAccountantRequestedService';
536
545
  export * from './Interface/api/partneredAccountant/CreatePartneredAccountantRequestedService';
546
+ export * from './Interface/api/partneredAccountant/CreatePartneredAccountantRequestedServiceExpress';
537
547
  export * from './Interface/api/partneredAccountant/CreatePartneredAccountantSociety';
538
548
  export * from './Interface/api/partneredAccountant/ReadPartneredAccountantSociety';
539
549
  export * from './Interface/api/partneredAccountant/UpdatePartneredAccountantSoldService';
@@ -556,3 +566,5 @@ export * from './Interface/api/journal/QueryJournal';
556
566
  export * from './Interface/api/balanceSheet/ReadBalanceSheetTransaction';
557
567
  export * from './Interface/api/mealExpense/CreateMealExpense';
558
568
  export * from './Interface/api/mealExpense/ReadMealExpense';
569
+ export * from './Interface/api/exerciceQuestion/QueryQuestion';
570
+ export * from './Interface/api/exerciceQuestion/CreateExerciceQuestion';
@@ -0,0 +1,26 @@
1
+ import { ReadCerfaToComplete } from '../types/Interface/api/cerfa/ReadCerfa';
2
+ import { GlobalRegime, GlobalRegimeTypeContent } from '../types/Enum/GlobalRegime';
3
+ import { ProfitsType, FiscalRegime, TaxSystem } from '../types';
4
+
5
+ export function retrieveCerfaFromSocietyInformations(idLegalForm: number, idTaxSystem: TaxSystem, idFiscalRegime: FiscalRegime, profitsType: ProfitsType):ReadCerfaToComplete {
6
+ const globalRegimes = Object.values(GlobalRegime);
7
+ const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));
8
+
9
+ if (!selectedGlobalRegime) throw Error('Missing informations to retrieve CERFA informations');
10
+
11
+ const choiceIndex = selectedGlobalRegime.choices.findIndex((sgr) => sgr.idFiscalRegime === idFiscalRegime && sgr.profitsType === profitsType && sgr.idTaxSystem === idTaxSystem);
12
+
13
+ if (choiceIndex < 0) throw Error('Missing informations to retrieve CERFA informations');
14
+
15
+ const { declaration, annexe } = selectedGlobalRegime.choices[choiceIndex];
16
+
17
+ return { declaration, annex: annexe ?? null };
18
+ }
19
+
20
+ export function retreiveChoicesDependingLegalForm(idLegalForm: number): GlobalRegimeTypeContent {
21
+ const globalRegimes = Object.values(GlobalRegime);
22
+ const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));
23
+
24
+ if (!selectedGlobalRegime) throw Error(`LegalForm #${idLegalForm} not implemented`);
25
+ return selectedGlobalRegime;
26
+ }