@silexpert/core 0.4.139 → 0.4.140

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 (177) hide show
  1. package/es/api/resources/InternalInvoicing.d.ts +2 -1
  2. package/es/api/resources/InternalInvoicing.d.ts.map +1 -1
  3. package/es/api/resources/InternalInvoicing.js +3 -0
  4. package/es/api/resources/InternalInvoicing.js.map +1 -1
  5. package/es/api/resources/Revision.d.ts +3 -2
  6. package/es/api/resources/Revision.d.ts.map +1 -1
  7. package/es/api/resources/Revision.js +4 -1
  8. package/es/api/resources/Revision.js.map +1 -1
  9. package/es/types/Enum/AnswerTypeValue.d.ts +22 -2
  10. package/es/types/Enum/AnswerTypeValue.d.ts.map +1 -1
  11. package/es/types/Enum/AnswerTypeValue.js +22 -0
  12. package/es/types/Enum/AnswerTypeValue.js.map +1 -1
  13. package/es/types/Enum/Aspone.d.ts +15 -0
  14. package/es/types/Enum/Aspone.d.ts.map +1 -1
  15. package/es/types/Enum/Aspone.js +18 -0
  16. package/es/types/Enum/Aspone.js.map +1 -1
  17. package/es/types/Enum/BalanceSheetQuestion.d.ts +98 -18
  18. package/es/types/Enum/BalanceSheetQuestion.d.ts.map +1 -1
  19. package/es/types/Enum/BalanceSheetQuestion.js +96 -16
  20. package/es/types/Enum/BalanceSheetQuestion.js.map +1 -1
  21. package/es/types/Enum/BalanceSheetQuestionWording.d.ts +113 -2
  22. package/es/types/Enum/BalanceSheetQuestionWording.d.ts.map +1 -1
  23. package/es/types/Enum/BalanceSheetQuestionWording.js +111 -0
  24. package/es/types/Enum/BalanceSheetQuestionWording.js.map +1 -1
  25. package/es/types/Enum/ImmobilizationType.d.ts +5 -0
  26. package/es/types/Enum/ImmobilizationType.d.ts.map +1 -1
  27. package/es/types/Enum/ImmobilizationType.js +6 -0
  28. package/es/types/Enum/ImmobilizationType.js.map +1 -1
  29. package/es/types/Enum/VehicleType.d.ts +7 -3
  30. package/es/types/Enum/VehicleType.d.ts.map +1 -1
  31. package/es/types/Enum/VehicleType.js +7 -3
  32. package/es/types/Enum/VehicleType.js.map +1 -1
  33. package/es/types/Form/FormAuthenticate.d.ts.map +1 -1
  34. package/es/types/Form/FormAuthenticate.js +31 -0
  35. package/es/types/Form/FormAuthenticate.js.map +1 -1
  36. package/es/types/Interface/api/aspone/ReadInterchange.d.ts +1 -1
  37. package/es/types/Interface/api/aspone/ReadInterchange.d.ts.map +1 -1
  38. package/es/types/Interface/api/aspone/ReadInterchange.js.map +1 -1
  39. package/es/types/Interface/api/cerfa/2031.d.ts +16 -4
  40. package/es/types/Interface/api/cerfa/2031.d.ts.map +1 -1
  41. package/es/types/Interface/api/cerfa/2031.js.map +1 -1
  42. package/es/types/Interface/api/cerfa/2033.d.ts +4 -1
  43. package/es/types/Interface/api/cerfa/2033.d.ts.map +1 -1
  44. package/es/types/Interface/api/cerfa/2033.js.map +1 -1
  45. package/es/types/Interface/api/cerfa/2035.d.ts +25 -5
  46. package/es/types/Interface/api/cerfa/2035.d.ts.map +1 -1
  47. package/es/types/Interface/api/cerfa/2035.js +1 -1
  48. package/es/types/Interface/api/cerfa/2035.js.map +1 -1
  49. package/es/types/Interface/api/cerfa/2065.d.ts +45 -30
  50. package/es/types/Interface/api/cerfa/2065.d.ts.map +1 -1
  51. package/es/types/Interface/api/cerfa/2065.js.map +1 -1
  52. package/es/types/Interface/api/cerfa/2572.d.ts +2 -0
  53. package/es/types/Interface/api/cerfa/2572.d.ts.map +1 -1
  54. package/es/types/Interface/api/cerfa/2572.js.map +1 -1
  55. package/es/types/Interface/api/cerfa/CreateCerfa.d.ts +3 -0
  56. package/es/types/Interface/api/cerfa/CreateCerfa.d.ts.map +1 -1
  57. package/es/types/Interface/api/cerfa/CreateCerfa.js.map +1 -1
  58. package/es/types/Interface/api/cerfa/ReadCerfa.d.ts +28 -0
  59. package/es/types/Interface/api/cerfa/ReadCerfa.d.ts.map +1 -1
  60. package/es/types/Interface/api/cerfa/ReadCerfa.js.map +1 -1
  61. package/es/types/Interface/api/cerfa/Utils.d.ts +21 -3
  62. package/es/types/Interface/api/cerfa/Utils.d.ts.map +1 -1
  63. package/es/types/Interface/api/cerfa/Utils.js.map +1 -1
  64. package/es/types/Interface/api/exerciceQuestion/CreateExerciceQuestion.js.map +1 -1
  65. package/es/types/Interface/api/internalInvoicing/RegenerateInternalInvoicing.d.ts +6 -0
  66. package/es/types/Interface/api/internalInvoicing/RegenerateInternalInvoicing.d.ts.map +1 -0
  67. package/es/types/Interface/api/internalInvoicing/RegenerateInternalInvoicing.js +30 -0
  68. package/es/types/Interface/api/internalInvoicing/RegenerateInternalInvoicing.js.map +1 -0
  69. package/es/types/Interface/api/jeDeclare/CreateDocumentsParams.d.ts +0 -2
  70. package/es/types/Interface/api/jeDeclare/CreateDocumentsParams.d.ts.map +1 -1
  71. package/es/types/Interface/api/jeDeclare/CreateDocumentsParams.js +3 -12
  72. package/es/types/Interface/api/jeDeclare/CreateDocumentsParams.js.map +1 -1
  73. package/es/types/Interface/api/jeDeclare/ReadJeDeclare.d.ts +6 -0
  74. package/es/types/Interface/api/jeDeclare/ReadJeDeclare.d.ts.map +1 -0
  75. package/es/types/Interface/api/jeDeclare/ReadJeDeclare.js +2 -0
  76. package/es/types/Interface/api/jeDeclare/ReadJeDeclare.js.map +1 -0
  77. package/es/types/Interface/api/jeDeclare/UtilCFONB.js +1 -1
  78. package/es/types/Interface/api/jeDeclare/UtilCFONB.js.map +1 -1
  79. package/es/types/Interface/api/ocr/OcrTypeTransactions.d.ts +1 -1
  80. package/es/types/Interface/api/ocr/OcrTypeTransactions.d.ts.map +1 -1
  81. package/es/types/Interface/api/ocr/OcrTypeTransactions.js.map +1 -1
  82. package/es/types/Interface/api/revision/QueryRevisionAccount.js +1 -1
  83. package/es/types/Interface/api/revision/QueryRevisionAccount.js.map +1 -1
  84. package/es/types/Interface/api/revision/QueryRevisionSearchEntries.d.ts +15 -0
  85. package/es/types/Interface/api/revision/QueryRevisionSearchEntries.d.ts.map +1 -0
  86. package/es/types/Interface/api/revision/QueryRevisionSearchEntries.js +87 -0
  87. package/es/types/Interface/api/revision/QueryRevisionSearchEntries.js.map +1 -0
  88. package/es/types/Interface/models/IBalanceSheetQuestion.d.ts +1 -0
  89. package/es/types/Interface/models/IBalanceSheetQuestion.d.ts.map +1 -1
  90. package/es/types/Interface/models/IBalanceSheetQuestion.js.map +1 -1
  91. package/es/types/index.d.ts +3 -0
  92. package/es/types/index.d.ts.map +1 -1
  93. package/es/types/index.js +3 -0
  94. package/es/types/index.js.map +1 -1
  95. package/es/utils/index.d.ts +1 -0
  96. package/es/utils/index.d.ts.map +1 -1
  97. package/es/utils/index.js +1 -0
  98. package/es/utils/index.js.map +1 -1
  99. package/es/utils/siretValidation.d.ts +2 -0
  100. package/es/utils/siretValidation.d.ts.map +1 -0
  101. package/es/utils/siretValidation.js +29 -0
  102. package/es/utils/siretValidation.js.map +1 -0
  103. package/js/api/resources/InternalInvoicing.js +4 -0
  104. package/js/api/resources/InternalInvoicing.js.map +1 -1
  105. package/js/api/resources/Revision.js +7 -1
  106. package/js/api/resources/Revision.js.map +1 -1
  107. package/js/types/Enum/AnswerTypeValue.js +26 -0
  108. package/js/types/Enum/AnswerTypeValue.js.map +1 -1
  109. package/js/types/Enum/Aspone.js +24 -0
  110. package/js/types/Enum/Aspone.js.map +1 -1
  111. package/js/types/Enum/BalanceSheetQuestion.js +98 -16
  112. package/js/types/Enum/BalanceSheetQuestion.js.map +1 -1
  113. package/js/types/Enum/BalanceSheetQuestionWording.js +112 -0
  114. package/js/types/Enum/BalanceSheetQuestionWording.js.map +1 -1
  115. package/js/types/Enum/ImmobilizationType.js +8 -0
  116. package/js/types/Enum/ImmobilizationType.js.map +1 -1
  117. package/js/types/Enum/VehicleType.js +10 -3
  118. package/js/types/Enum/VehicleType.js.map +1 -1
  119. package/js/types/Form/FormAuthenticate.js +25 -0
  120. package/js/types/Form/FormAuthenticate.js.map +1 -1
  121. package/js/types/Interface/api/aspone/ReadInterchange.js.map +1 -1
  122. package/js/types/Interface/api/cerfa/2031.js.map +1 -1
  123. package/js/types/Interface/api/cerfa/2033.js.map +1 -1
  124. package/js/types/Interface/api/cerfa/2035.js.map +1 -1
  125. package/js/types/Interface/api/cerfa/2065.js.map +1 -1
  126. package/js/types/Interface/api/cerfa/2572.js.map +1 -1
  127. package/js/types/Interface/api/cerfa/CreateCerfa.js.map +1 -1
  128. package/js/types/Interface/api/exerciceQuestion/CreateExerciceQuestion.js.map +1 -1
  129. package/js/types/Interface/api/internalInvoicing/RegenerateInternalInvoicing.js +33 -0
  130. package/js/types/Interface/api/internalInvoicing/RegenerateInternalInvoicing.js.map +1 -0
  131. package/js/types/Interface/api/jeDeclare/CreateDocumentsParams.js +3 -5
  132. package/js/types/Interface/api/jeDeclare/CreateDocumentsParams.js.map +1 -1
  133. package/js/types/Interface/api/jeDeclare/ReadJeDeclare.js +6 -0
  134. package/js/types/Interface/api/jeDeclare/ReadJeDeclare.js.map +1 -0
  135. package/js/types/Interface/api/jeDeclare/UtilCFONB.js +1 -1
  136. package/js/types/Interface/api/jeDeclare/UtilCFONB.js.map +1 -1
  137. package/js/types/Interface/api/revision/QueryRevisionAccount.js +3 -1
  138. package/js/types/Interface/api/revision/QueryRevisionAccount.js.map +1 -1
  139. package/js/types/Interface/api/revision/QueryRevisionSearchEntries.js +64 -0
  140. package/js/types/Interface/api/revision/QueryRevisionSearchEntries.js.map +1 -0
  141. package/js/types/index.js +36 -0
  142. package/js/types/index.js.map +1 -1
  143. package/js/utils/index.js +12 -0
  144. package/js/utils/index.js.map +1 -1
  145. package/js/utils/siretValidation.js +39 -0
  146. package/js/utils/siretValidation.js.map +1 -0
  147. package/package.json +1 -1
  148. package/ts/api/resources/InternalInvoicing.ts +4 -1
  149. package/ts/api/resources/Revision.ts +6 -1
  150. package/ts/types/Enum/AnswerTypeValue.ts +22 -0
  151. package/ts/types/Enum/Aspone.ts +18 -0
  152. package/ts/types/Enum/BalanceSheetQuestion.ts +103 -17
  153. package/ts/types/Enum/BalanceSheetQuestionWording.ts +113 -0
  154. package/ts/types/Enum/ImmobilizationType.ts +6 -0
  155. package/ts/types/Enum/VehicleType.ts +8 -3
  156. package/ts/types/Form/FormAuthenticate.ts +14 -0
  157. package/ts/types/Interface/api/aspone/ReadInterchange.ts +1 -1
  158. package/ts/types/Interface/api/cerfa/2031.ts +17 -7
  159. package/ts/types/Interface/api/cerfa/2033.ts +4 -1
  160. package/ts/types/Interface/api/cerfa/2035.ts +24 -5
  161. package/ts/types/Interface/api/cerfa/2065.ts +42 -23
  162. package/ts/types/Interface/api/cerfa/2572.ts +3 -0
  163. package/ts/types/Interface/api/cerfa/CreateCerfa.ts +3 -0
  164. package/ts/types/Interface/api/cerfa/ReadCerfa.ts +29 -1
  165. package/ts/types/Interface/api/cerfa/Utils.ts +26 -4
  166. package/ts/types/Interface/api/exerciceQuestion/CreateExerciceQuestion.ts +1 -1
  167. package/ts/types/Interface/api/internalInvoicing/RegenerateInternalInvoicing.ts +17 -0
  168. package/ts/types/Interface/api/jeDeclare/CreateDocumentsParams.ts +5 -10
  169. package/ts/types/Interface/api/jeDeclare/ReadJeDeclare.ts +6 -0
  170. package/ts/types/Interface/api/jeDeclare/UtilCFONB.ts +1 -1
  171. package/ts/types/Interface/api/ocr/OcrTypeTransactions.ts +1 -1
  172. package/ts/types/Interface/api/revision/QueryRevisionAccount.ts +1 -1
  173. package/ts/types/Interface/api/revision/QueryRevisionSearchEntries.ts +65 -0
  174. package/ts/types/Interface/models/IBalanceSheetQuestion.ts +1 -0
  175. package/ts/types/index.ts +3 -0
  176. package/ts/utils/index.ts +1 -0
  177. package/ts/utils/siretValidation.ts +28 -0
@@ -1,4 +1,8 @@
1
1
  import { ApiPropertyOptional } from '../../../..';
2
+ import {
3
+ CerfaAddress, ViewerDetails, Accountant, CouncilDetails, EcfDetails, Termination,
4
+ } from './ReadCerfa';
5
+ import { PartnersLegalEntity } from './Utils';
2
6
 
3
7
  export type BusinessPartnersValue = {
4
8
  idBusinessPartner: number,
@@ -14,19 +18,26 @@ export class ParamsGenerate2065 {
14
18
  isTest?: boolean;
15
19
  }
16
20
 
21
+ type LessValuesByRate = {
22
+ exonerated: number;
23
+ reduced: number;
24
+ normal: number;
25
+ };
26
+
17
27
  export class Cerfa2065Society {
18
28
  name: string;
19
29
  addressFormatted: string;
20
30
  siret: string;
21
31
  email: string;
22
32
  oldAddress: string | null;
33
+ oldAddressDetails: CerfaAddress;
23
34
  }
24
35
 
25
36
  export class Cerfa2065Remunerations {
26
37
  name: string;
27
- address: { country: string; address: string; countryCode: string | null; };
38
+ address: CerfaAddress;
28
39
  sharesHeld: number;
29
- year: string;
40
+ year: number;
30
41
  amount: number;
31
42
  indemnities: number;
32
43
  refund: number;
@@ -35,6 +46,7 @@ export class Cerfa2065Remunerations {
35
46
  reason: string;
36
47
  }
37
48
  export interface Cerfa2065 {
49
+ termination: Termination;
38
50
  isNil?: boolean;
39
51
  society: Cerfa2065Society;
40
52
  period: {
@@ -47,8 +59,17 @@ export interface Cerfa2065 {
47
59
  isRealRegime: boolean;
48
60
  isPME: boolean;
49
61
  fillialeText: string | null;
62
+ affiliateHead: PartnersLegalEntity & { countryCode: string; siret: string; }| null;
50
63
  isTonnageOption: boolean;
51
- headOffice: { addressFormatted: string; country: string; countryCode: string | null; street: string; zipCode: string; city: string; }
64
+ headOffice: {
65
+ number: string;
66
+ addressFormatted: string;
67
+ country: string;
68
+ countryCode: string | null;
69
+ street: string;
70
+ zipCode: string;
71
+ city: string;
72
+ };
52
73
  incomeDate: Date | null;
53
74
  siret: string | null;
54
75
  activity: string;
@@ -72,32 +93,25 @@ export interface Cerfa2065 {
72
93
  isOther: boolean;
73
94
  isPriorityZone: boolean;
74
95
  isInvestmentBusiness: boolean;
75
- benefitOrDeficit: string;
96
+ benefitOrDeficit: number;
76
97
  exoneration15: number;
77
98
  isImpositionDOMTOM: boolean;
78
99
  furnitureIncome: number;
79
100
  icomeOther: number;
80
101
  income2Dot5: number;
81
102
  isSocietyHead: boolean;
82
- otherSocietyHead: { name: string; number: string };
103
+ otherSocietyHead:{ name: string | null; has: boolean; address: CerfaAddress | null; number: string|null; };
83
104
  isSocietyDesigned: boolean;
84
- societyHead: { name: string; number: string };
105
+ societyHead: { name: string; number: string; fiscalNumber: string; } & CerfaAddress;
85
106
  hasAccountancyComputerized: boolean;
86
107
  hasNotAccountancyComputerized: boolean;
87
108
  accountancyComputerizedName: string;
88
- accountant: {
89
- name: string;
90
- phone: string;
91
- };
109
+ accountant: Accountant;
92
110
  hasOGA: boolean;
93
111
  hasViewer: boolean;
94
- OGA: { name: string; number: string };
95
- ecf: boolean;
96
- ecfName: string;
97
- council: {
98
- name: string;
99
- phone: string;
100
- };
112
+ viewer: ViewerDetails;
113
+ council: CouncilDetails;
114
+ ecf: EcfDetails;
101
115
  declarer: {
102
116
  date: string;
103
117
  place: string;
@@ -112,16 +126,21 @@ export interface Cerfa2065 {
112
126
  amountRemunerations: number;
113
127
  remunerations: Cerfa2065Remunerations[],
114
128
  diverse: {
115
- name: string;
129
+ funds: {
130
+ name: string;
131
+ address: string;
132
+ addressDetails: CerfaAddress;
133
+ },
116
134
  address: string;
117
- otherAddress: string;
135
+ otherAddresses: Array<{ name: string; address: CerfaAddress }>;
118
136
  }
119
137
  simplified: {
120
138
  amount: number;
121
139
  retrocessions: number;
122
- remainingExerciceStart: number;
123
- imputed: number;
124
- realized: number;
125
- remaining: number;
140
+ remainingExerciceStart: LessValuesByRate;
141
+ imputed: LessValuesByRate;
142
+ realized: LessValuesByRate;
143
+ remaining: LessValuesByRate;
126
144
  }
145
+ donation: { amount: number; number: number; }
127
146
  }
@@ -1,3 +1,5 @@
1
+ import { Termination } from './ReadCerfa';
2
+
1
3
  type BaseAndAmount = {
2
4
  base: number;
3
5
  amount: number;
@@ -143,6 +145,7 @@ export class Cerfa2572 {
143
145
  summary: Summary;
144
146
  payment: Payment;
145
147
  administration?: Administration;
148
+ termination: Termination;
146
149
  }
147
150
 
148
151
  export type Prepare2572Params = { idSociety: number; idExercice: number; values: Cerfa2572 };
@@ -1,4 +1,5 @@
1
1
  import { VehicleCerfaFuel } from '../../../Enum/Vehicle';
2
+ import { AsponeTTV, AsponeTTC } from '../../..';
2
3
 
3
4
  export * from './2031';
4
5
  export * from './2033';
@@ -26,10 +27,12 @@ export interface AccreditedOrganization {
26
27
  export interface Vehicle {
27
28
  name: string;
28
29
  type: string;
30
+ asponeType: AsponeTTV;
29
31
  fiscalPower: number;
30
32
  isBNCScale: boolean;
31
33
  isBICScale: boolean;
32
34
  fuel: VehicleCerfaFuel;
35
+ asponeFuel: AsponeTTC | null;
33
36
  professionalKilometers: number;
34
37
  deductible: number;
35
38
  depreciationPracticedAtReintegrate: number;
@@ -1,6 +1,7 @@
1
1
  import { CerfaType } from '../../../Enum/CerfaType';
2
2
  import { QuestionWording } from '../../..';
3
3
  import { Question } from '../../../Enum/BalanceSheetQuestion';
4
+ import { TerminationType } from '../../../Enum/AnswerTypeValue';
4
5
 
5
6
  export interface ReadCerfaToComplete {
6
7
  declaration: CerfaType;
@@ -10,7 +11,29 @@ export interface ReadCerfaDocument {
10
11
  file: any;
11
12
  payload: any;
12
13
  }
13
-
14
+ export interface Accountant {
15
+ has: boolean;
16
+ name: string | null;
17
+ phone: string | null;
18
+ address: CerfaAddress;
19
+ }
20
+ export interface CouncilDetails {
21
+ has: boolean;
22
+ name: string | null;
23
+ phone: string | null;
24
+ address: CerfaAddress;
25
+ }
26
+ export interface EcfDetails {
27
+ has: boolean;
28
+ name: string | null;
29
+ address: CerfaAddress;
30
+ }
31
+ export interface ViewerDetails {
32
+ has: boolean;
33
+ name: string;
34
+ address: CerfaAddress
35
+ number: string | null;
36
+ }
14
37
  export interface CerfaAddress {
15
38
  number: string;
16
39
  street: string;
@@ -25,4 +48,9 @@ export interface CerfaAddress {
25
48
 
26
49
  export type CerfaAnswers = {
27
50
  [key in keyof typeof QuestionWording | keyof typeof Question | 'OTHER_TAX_DEDUCTION_AMOUNT_1' | 'OTHER_TAX_DEDUCTION_AMOUNT_2'| 'OTHER_TAX_DEDUCTION_AMOUNT_3' | 'OTHER_TAX_DEDUCTION_AMOUNT_4'| 'OTHER_TAX_DEDUCTION_AMOUNT_5' | 'OTHER_ADDITION_AMOUNT_1' | 'OTHER_ADDITION_AMOUNT_2' | 'OTHER_ADDITION_AMOUNT_3' | 'OTHER_ADDITION_AMOUNT_4' | 'OTHER_ADDITION_AMOUNT_5' | '39_DECIES' | '39_DECIES_A' | '39_DECIES_B' | '39_DECIES_C' | '39_DECIES_D' | '39_DECIES_E' | '39_DECIES_F' | '39_DECIES_G']: any
51
+ };
52
+
53
+ export type Termination = {
54
+ type: TerminationType,
55
+ date: string | null
28
56
  };
@@ -1,10 +1,18 @@
1
1
  export interface PartnersLegalEntity {
2
2
  address: CerfaAddressFromQuestion;
3
3
  holdingPercent: number;
4
+ legalForm: string;
4
5
  name: string;
5
6
  shareNumber: number;
6
- siren: string;
7
- legalForm: string;
7
+ siret: string;
8
+ isParentCompany?: boolean;
9
+ }
10
+
11
+ export interface PartnersNaturalPersonPayment {
12
+ paymentYear: number;
13
+ emolumentsAndCompensations?: number;
14
+ fixedCompensations?: number;
15
+ reimbursements?: number;
8
16
  }
9
17
 
10
18
  export interface PartnersNaturalPerson {
@@ -14,12 +22,21 @@ export interface PartnersNaturalPerson {
14
22
  birthPlace: string;
15
23
  firstname: string;
16
24
  holdingPercent: number;
25
+
26
+ /**
27
+ * Should be an id from the country list
28
+ */
17
29
  idBirthCountry: number;
30
+
31
+ /**
32
+ * Should be an id from the civility list
33
+ */
18
34
  idCivility: number;
19
35
  individualProfessionalExpenses: number;
20
36
  isOwner: boolean;
21
37
  lastname: string;
22
38
  marriedName: string;
39
+ payments?: PartnersNaturalPersonPayment[];
23
40
  shareNumber: number;
24
41
  taxNumber: string;
25
42
  }
@@ -51,11 +68,16 @@ export interface Affiliate {
51
68
  holdingPercent: number;
52
69
  legalForm: string;
53
70
  name: string;
54
- siren: string;
71
+ siret: string;
55
72
  }
56
73
 
57
74
  export interface OtherActivity {
58
75
  legalForm: string;
59
76
  name: string;
60
77
  salary: number;
61
- }
78
+ }
79
+
80
+ export interface LabelAndAmount {
81
+ amount: number;
82
+ label: string;
83
+ }
@@ -30,4 +30,4 @@ export class CreateExerciceQuestions {
30
30
  each: true,
31
31
  })
32
32
  exerciceQuestions: Array<ExerciceQuestion>;
33
- }
33
+ }
@@ -0,0 +1,17 @@
1
+ import { IsArray, IsNumber, IsOptional } from 'class-validator';
2
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
+
4
+ export class RegenerateInternalInvoicing {
5
+ @ApiPropertyOptional()
6
+ @IsOptional()
7
+ @IsArray()
8
+ idSociety: Array<number>;
9
+
10
+ @ApiProperty()
11
+ @IsNumber()
12
+ month: number;
13
+
14
+ @ApiProperty()
15
+ @IsNumber()
16
+ year: number;
17
+ }
@@ -1,20 +1,15 @@
1
- import { IsBoolean, IsOptional, IsString } from 'class-validator';
1
+ import {
2
+ IsBoolean, IsOptional, IsEnum,
3
+ } from 'class-validator';
2
4
  import { ApiProperty, ApiPropertyOptional } from '../../../..';
3
5
  import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
6
+ import { ItemStatus } from '../../../Enum/JeDeclare';
4
7
 
5
8
  export class CreateDocumentsParams {
6
9
  @ApiProperty()
7
- @IsString()
10
+ @IsEnum(ItemStatus)
8
11
  itemStatus: string;
9
12
 
10
- @ApiProperty()
11
- @IsString()
12
- procedureType: string;
13
-
14
- @ApiProperty()
15
- @IsString()
16
- listType: string;
17
-
18
13
  @ApiPropertyOptional()
19
14
  @IsBoolean()
20
15
  @ToBoolean()
@@ -0,0 +1,6 @@
1
+ import { IAccountingTransaction } from '../../..';
2
+
3
+ export type ReadJeDeclareImport = {
4
+ transactions: IAccountingTransaction[];
5
+ missingIbans: string[]
6
+ };
@@ -183,7 +183,7 @@ export const CFONB_COMPLEMENTARY_LABEL: CFONBStructureObejct = {
183
183
  }],
184
184
  entryNumber: [{
185
185
  start: 82,
186
- length: 8,
186
+ length: 7,
187
187
  }],
188
188
  designatedArea2: [{
189
189
  start: 89,
@@ -1,7 +1,7 @@
1
1
  import { OcrType } from '../../../Enum/Ocr';
2
2
 
3
3
  export type OcrTransactionDetails = {
4
- dateValue: Date,
4
+ dateValue: string,
5
5
  label: string | null,
6
6
  debit: number,
7
7
  credit: number,
@@ -6,7 +6,7 @@ import { ApiPropertyOptional } from '../../../../utils';
6
6
  import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
7
7
 
8
8
  export class QueryRevisionAccount implements QueryPaginate {
9
- @ApiProperty()
9
+ @ApiProperty({ default: 1 })
10
10
  @IsNumber()
11
11
  page: number;
12
12
 
@@ -0,0 +1,65 @@
1
+ import {
2
+ IsDate, IsEnum, IsNumber, IsOptional, IsString,
3
+ } from 'class-validator';
4
+ import { AccountingJournal, ApiProperty } from '../../../..';
5
+ import { ApiPropertyOptional } from '../../../../utils';
6
+
7
+ export class QueryRevisionSearchEntries {
8
+ // Mandatory
9
+ @ApiProperty()
10
+ @IsNumber()
11
+ idSociety: number;
12
+
13
+ @ApiProperty()
14
+ @IsDate()
15
+ startDate: Date;
16
+
17
+ @ApiProperty()
18
+ @IsDate()
19
+ endDate: Date;
20
+
21
+ // Optional
22
+ @ApiPropertyOptional()
23
+ @IsNumber()
24
+ @IsOptional()
25
+ idThirdParty?: number;
26
+
27
+ @ApiPropertyOptional()
28
+ @IsNumber()
29
+ @IsOptional()
30
+ amount?: number;
31
+
32
+ @ApiPropertyOptional()
33
+ @IsNumber()
34
+ @IsOptional()
35
+ difference?: number;
36
+
37
+ @ApiPropertyOptional()
38
+ @IsString()
39
+ @IsOptional()
40
+ designation?: string;
41
+
42
+ @ApiPropertyOptional()
43
+ @IsString()
44
+ @IsOptional()
45
+ startAccountNumber?: string;
46
+
47
+ @ApiPropertyOptional()
48
+ @IsString()
49
+ @IsOptional()
50
+ endAccountNumber?: string;
51
+
52
+ @ApiPropertyOptional()
53
+ @IsEnum(AccountingJournal)
54
+ @IsOptional()
55
+ idAccountingJournal?: number;
56
+
57
+ // Interface paginate
58
+ @ApiProperty({ default: 25 })
59
+ @IsNumber()
60
+ limit?: number = 25;
61
+
62
+ @ApiProperty({ default: 1 })
63
+ @IsNumber()
64
+ page?: number = 1;
65
+ }
@@ -6,6 +6,7 @@ export interface IBalanceSheetQuestion {
6
6
  theme: string;
7
7
  category: string | null;
8
8
  idAnswerType: number;
9
+ jsonTypedef: any | null;
9
10
 
10
11
  createdAt?: Date | null;
11
12
  updatedAt?: Date | null;
package/ts/types/index.ts CHANGED
@@ -394,6 +394,7 @@ export * from './Enum/FuelType';
394
394
  export * from './Enum/KilometricAllowanceScale';
395
395
 
396
396
  // Interfaces API
397
+ export * from './Interface/api/jeDeclare/ReadJeDeclare';
397
398
  export * from './Interface/api/aspone/ReadInterchange';
398
399
  export * from './Interface/api/aspone/Util';
399
400
  export * from './Interface/api/businessPartner/ReadBusinessPartner';
@@ -469,6 +470,7 @@ export * from './Interface/api/quotes/CreateQuoteAccount';
469
470
  export * from './Interface/api/account/ReadQuoteAccount';
470
471
  export * from './Interface/api/internalInvoicing/CreateInternalInvoicing';
471
472
  export * from './Interface/api/internalInvoicing/CreateInternalInvoicing2in';
473
+ export * from './Interface/api/internalInvoicing/RegenerateInternalInvoicing';
472
474
  export * from './Interface/api/exercice/QueryExercice';
473
475
  export * from './Interface/api/exercice/CreateExercice';
474
476
  export * from './Interface/api/accountingIncome/ReadAccountingIncome';
@@ -487,6 +489,7 @@ export * from './Interface/api/revision/ReadRevisionAccount';
487
489
  export * from './Interface/api/revision/ReadRevisionTransactionDetail';
488
490
  export * from './Interface/api/revision/QueryRevisionMergeIntoAccount';
489
491
  export * from './Interface/api/revision/ReadRevisionMergeIntoAccount';
492
+ export * from './Interface/api/revision/QueryRevisionSearchEntries';
490
493
 
491
494
  // export * from './Interface/api/survey/QuerySurvey';
492
495
  export * from './Interface/api/survey/ReadSurvey';
package/ts/utils/index.ts CHANGED
@@ -3,3 +3,4 @@ export * from './stringUtils';
3
3
  export * from './brands';
4
4
  export * from './decorators';
5
5
  export * from './balanceSheetModule';
6
+ export * from './siretValidation';
@@ -0,0 +1,28 @@
1
+ export function validateSiret(siret: string) {
2
+ if (!/^\d{14}$/.test(siret)) throw new Error('Invalid SIRET format');
3
+
4
+ const siretArray = Array.from(siret).map(Number).reverse();
5
+ const luhnSum = siretArray.reduce((acc, v, i) => {
6
+ if (i % 2 === 1) {
7
+ const currentVal = v * 2;
8
+ if (currentVal > 9) {
9
+ const array = Array.from(currentVal.toString());
10
+ return acc + Number(array[0]) + Number(array[1]);
11
+ }
12
+ return acc + currentVal;
13
+ }
14
+ return acc + v;
15
+ }, 0);
16
+
17
+ if (luhnSum % 10 !== 0) {
18
+ // Specific rule for some La Poste SIRET
19
+ if (siret.startsWith('356000000')) {
20
+ const sum = siretArray.reduce((acc, v) => acc + v, 0);
21
+ if (sum % 5 !== 0) {
22
+ throw new Error('Invalid SIRET');
23
+ }
24
+ } else {
25
+ throw new Error('Invalid SIRET');
26
+ }
27
+ }
28
+ }