@silexpert/core 1.0.146 → 1.0.148

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 (234) hide show
  1. package/es/api/resources/Acceptance.d.ts +6 -0
  2. package/es/api/resources/Acceptance.d.ts.map +1 -0
  3. package/es/api/resources/Acceptance.js +7 -0
  4. package/es/api/resources/Acceptance.js.map +1 -0
  5. package/es/api/resources/CustomerActivity.d.ts +2 -1
  6. package/es/api/resources/CustomerActivity.d.ts.map +1 -1
  7. package/es/api/resources/CustomerActivity.js +3 -0
  8. package/es/api/resources/CustomerActivity.js.map +1 -1
  9. package/es/api/resources/Partner.d.ts +3 -1
  10. package/es/api/resources/Partner.d.ts.map +1 -1
  11. package/es/api/resources/Partner.js +6 -0
  12. package/es/api/resources/Partner.js.map +1 -1
  13. package/es/api/resources/Registration.d.ts +3 -1
  14. package/es/api/resources/Registration.d.ts.map +1 -1
  15. package/es/api/resources/Registration.js +6 -0
  16. package/es/api/resources/Registration.js.map +1 -1
  17. package/es/api/resources/Wallet.d.ts +2 -1
  18. package/es/api/resources/Wallet.d.ts.map +1 -1
  19. package/es/api/resources/Wallet.js +3 -0
  20. package/es/api/resources/Wallet.js.map +1 -1
  21. package/es/api/resources.d.ts +2 -0
  22. package/es/api/resources.d.ts.map +1 -1
  23. package/es/api/resources.js +2 -0
  24. package/es/api/resources.js.map +1 -1
  25. package/es/types/Enum/Acceptance.d.ts +5 -0
  26. package/es/types/Enum/Acceptance.d.ts.map +1 -0
  27. package/es/types/Enum/Acceptance.js +6 -0
  28. package/es/types/Enum/Acceptance.js.map +1 -0
  29. package/es/types/Enum/CerfaType.d.ts +5 -1
  30. package/es/types/Enum/CerfaType.d.ts.map +1 -1
  31. package/es/types/Enum/CerfaType.js +4 -0
  32. package/es/types/Enum/CerfaType.js.map +1 -1
  33. package/es/types/Enum/MailAuto.d.ts +2 -1
  34. package/es/types/Enum/MailAuto.d.ts.map +1 -1
  35. package/es/types/Enum/MailAuto.js +1 -0
  36. package/es/types/Enum/MailAuto.js.map +1 -1
  37. package/es/types/Enum/Notification.d.ts +5 -1
  38. package/es/types/Enum/Notification.d.ts.map +1 -1
  39. package/es/types/Enum/Notification.js +5 -0
  40. package/es/types/Enum/Notification.js.map +1 -1
  41. package/es/types/Enum/PaymentReason.d.ts +17 -0
  42. package/es/types/Enum/PaymentReason.d.ts.map +1 -0
  43. package/es/types/Enum/PaymentReason.js +56 -0
  44. package/es/types/Enum/PaymentReason.js.map +1 -0
  45. package/es/types/Enum/TaskResponseType.js +1 -1
  46. package/es/types/Enum/TaskResponseType.js.map +1 -1
  47. package/es/types/Interface/api/BasePaginate.d.ts +4 -0
  48. package/es/types/Interface/api/BasePaginate.d.ts.map +1 -1
  49. package/es/types/Interface/api/BasePaginate.js +15 -1
  50. package/es/types/Interface/api/BasePaginate.js.map +1 -1
  51. package/es/types/Interface/api/acceptance/CreateAcceptance.d.ts +7 -0
  52. package/es/types/Interface/api/acceptance/CreateAcceptance.d.ts.map +1 -0
  53. package/es/types/Interface/api/acceptance/CreateAcceptance.js +29 -0
  54. package/es/types/Interface/api/acceptance/CreateAcceptance.js.map +1 -0
  55. package/es/types/Interface/api/cerfa/2571.d.ts +92 -0
  56. package/es/types/Interface/api/cerfa/2571.d.ts.map +1 -0
  57. package/es/types/Interface/api/cerfa/2571.js +3 -0
  58. package/es/types/Interface/api/cerfa/2571.js.map +1 -0
  59. package/es/types/Interface/api/cerfa/CreateCerfa.d.ts +1 -0
  60. package/es/types/Interface/api/cerfa/CreateCerfa.d.ts.map +1 -1
  61. package/es/types/Interface/api/cerfa/CreateCerfa.js +1 -0
  62. package/es/types/Interface/api/cerfa/CreateCerfa.js.map +1 -1
  63. package/es/types/Interface/api/mail/CreateMailParams.d.ts +1 -0
  64. package/es/types/Interface/api/mail/CreateMailParams.d.ts.map +1 -1
  65. package/es/types/Interface/api/mail/CreateMailParams.js.map +1 -1
  66. package/es/types/Interface/api/partner/CreatePartner.d.ts +1 -0
  67. package/es/types/Interface/api/partner/CreatePartner.d.ts.map +1 -1
  68. package/es/types/Interface/api/partner/CreatePartner.js +4 -0
  69. package/es/types/Interface/api/partner/CreatePartner.js.map +1 -1
  70. package/es/types/Interface/api/partner/Query.d.ts +13 -0
  71. package/es/types/Interface/api/partner/Query.d.ts.map +1 -0
  72. package/es/types/Interface/api/partner/{GetPartners.js → Query.js} +26 -2
  73. package/es/types/Interface/api/partner/Query.js.map +1 -0
  74. package/es/types/Interface/api/partner/Read.d.ts +29 -0
  75. package/es/types/Interface/api/partner/Read.d.ts.map +1 -0
  76. package/es/types/Interface/api/partner/Read.js +7 -0
  77. package/es/types/Interface/api/partner/Read.js.map +1 -0
  78. package/es/types/Interface/api/partner/UpdatePartner.d.ts +1 -0
  79. package/es/types/Interface/api/partner/UpdatePartner.d.ts.map +1 -1
  80. package/es/types/Interface/api/partner/UpdatePartner.js +4 -0
  81. package/es/types/Interface/api/partner/UpdatePartner.js.map +1 -1
  82. package/es/types/Interface/api/registration/CreateRegistration.d.ts +24 -0
  83. package/es/types/Interface/api/registration/CreateRegistration.d.ts.map +1 -1
  84. package/es/types/Interface/api/registration/CreateRegistration.js +62 -1
  85. package/es/types/Interface/api/registration/CreateRegistration.js.map +1 -1
  86. package/es/types/Interface/api/tax/CreateTax.d.ts +1 -0
  87. package/es/types/Interface/api/tax/CreateTax.d.ts.map +1 -1
  88. package/es/types/Interface/api/tax/CreateTax.js +7 -1
  89. package/es/types/Interface/api/tax/CreateTax.js.map +1 -1
  90. package/es/types/Interface/api/tax/ReadTax.d.ts +6 -0
  91. package/es/types/Interface/api/tax/ReadTax.d.ts.map +1 -1
  92. package/es/types/Interface/api/tax/ReadTax.js.map +1 -1
  93. package/es/types/Interface/api/taxDeadline/QueryTaxDeadline.d.ts +6 -0
  94. package/es/types/Interface/api/taxDeadline/QueryTaxDeadline.d.ts.map +1 -1
  95. package/es/types/Interface/api/taxDeadline/QueryTaxDeadline.js +24 -1
  96. package/es/types/Interface/api/taxDeadline/QueryTaxDeadline.js.map +1 -1
  97. package/es/types/Interface/models/IAccountingStatementHistory.d.ts +18 -0
  98. package/es/types/Interface/models/IAccountingStatementHistory.d.ts.map +1 -0
  99. package/es/types/Interface/models/IAccountingStatementHistory.js +2 -0
  100. package/es/types/Interface/models/IAccountingStatementHistory.js.map +1 -0
  101. package/es/types/Interface/models/ICustomerAcceptance.d.ts +13 -0
  102. package/es/types/Interface/models/ICustomerAcceptance.d.ts.map +1 -0
  103. package/es/types/Interface/models/ICustomerAcceptance.js +2 -0
  104. package/es/types/Interface/models/ICustomerAcceptance.js.map +1 -0
  105. package/es/types/Interface/models/ICustomerIsRegime.d.ts +6 -1
  106. package/es/types/Interface/models/ICustomerIsRegime.d.ts.map +1 -1
  107. package/es/types/Interface/models/ICustomerIsRegime.js.map +1 -1
  108. package/es/types/Interface/models/IExercice.d.ts +1 -0
  109. package/es/types/Interface/models/IExercice.d.ts.map +1 -1
  110. package/es/types/Interface/models/IExercice.js.map +1 -1
  111. package/es/types/Interface/models/IRegistration.d.ts +3 -0
  112. package/es/types/Interface/models/IRegistration.d.ts.map +1 -1
  113. package/es/types/Interface/models/IRegistration.js.map +1 -1
  114. package/es/types/Interface/models/ISocietyPartner.d.ts +1 -0
  115. package/es/types/Interface/models/ISocietyPartner.d.ts.map +1 -1
  116. package/es/types/Interface/models/ISocietyPartner.js.map +1 -1
  117. package/es/types/Interface/models/IVatDeclarationSocietyDetail.d.ts +3 -1
  118. package/es/types/Interface/models/IVatDeclarationSocietyDetail.d.ts.map +1 -1
  119. package/es/types/Interface/models/IVatDeclarationSocietyDetail.js.map +1 -1
  120. package/es/types/index.d.ts +7 -3
  121. package/es/types/index.d.ts.map +1 -1
  122. package/es/types/index.js +7 -3
  123. package/es/types/index.js.map +1 -1
  124. package/js/api/resources/Acceptance.js +14 -0
  125. package/js/api/resources/Acceptance.js.map +1 -0
  126. package/js/api/resources/CustomerActivity.js +3 -0
  127. package/js/api/resources/CustomerActivity.js.map +1 -1
  128. package/js/api/resources/Partner.js +10 -0
  129. package/js/api/resources/Partner.js.map +1 -1
  130. package/js/api/resources/Registration.js +6 -0
  131. package/js/api/resources/Registration.js.map +1 -1
  132. package/js/api/resources/Wallet.js +7 -0
  133. package/js/api/resources/Wallet.js.map +1 -1
  134. package/js/api/resources.js +3 -1
  135. package/js/api/resources.js.map +1 -1
  136. package/js/types/Enum/Acceptance.js +11 -0
  137. package/js/types/Enum/Acceptance.js.map +1 -0
  138. package/js/types/Enum/CerfaType.js +4 -0
  139. package/js/types/Enum/CerfaType.js.map +1 -1
  140. package/js/types/Enum/MailAuto.js +1 -0
  141. package/js/types/Enum/MailAuto.js.map +1 -1
  142. package/js/types/Enum/Notification.js +5 -0
  143. package/js/types/Enum/Notification.js.map +1 -1
  144. package/js/types/Enum/PaymentReason.js +50 -0
  145. package/js/types/Enum/PaymentReason.js.map +1 -0
  146. package/js/types/Enum/TaskResponseType.js +1 -1
  147. package/js/types/Enum/TaskResponseType.js.map +1 -1
  148. package/js/types/Interface/api/BasePaginate.js +5 -1
  149. package/js/types/Interface/api/BasePaginate.js.map +1 -1
  150. package/js/types/Interface/api/acceptance/CreateAcceptance.js +25 -0
  151. package/js/types/Interface/api/acceptance/CreateAcceptance.js.map +1 -0
  152. package/js/types/Interface/api/cerfa/2571.js +8 -0
  153. package/js/types/Interface/api/cerfa/2571.js.map +1 -0
  154. package/js/types/Interface/api/cerfa/CreateCerfa.js +11 -1
  155. package/js/types/Interface/api/cerfa/CreateCerfa.js.map +1 -1
  156. package/js/types/Interface/api/mail/CreateMailParams.js.map +1 -1
  157. package/js/types/Interface/api/partner/CreatePartner.js +1 -0
  158. package/js/types/Interface/api/partner/CreatePartner.js.map +1 -1
  159. package/js/types/Interface/api/partner/{GetPartners.js → Query.js} +11 -2
  160. package/js/types/Interface/api/partner/Query.js.map +1 -0
  161. package/js/types/Interface/api/partner/Read.js +12 -0
  162. package/js/types/Interface/api/partner/Read.js.map +1 -0
  163. package/js/types/Interface/api/partner/UpdatePartner.js +1 -0
  164. package/js/types/Interface/api/partner/UpdatePartner.js.map +1 -1
  165. package/js/types/Interface/api/registration/CreateRegistration.js +19 -1
  166. package/js/types/Interface/api/registration/CreateRegistration.js.map +1 -1
  167. package/js/types/Interface/api/tax/CreateTax.js +3 -0
  168. package/js/types/Interface/api/tax/CreateTax.js.map +1 -1
  169. package/js/types/Interface/api/tax/ReadTax.js.map +1 -1
  170. package/js/types/Interface/api/taxDeadline/QueryTaxDeadline.js +11 -1
  171. package/js/types/Interface/api/taxDeadline/QueryTaxDeadline.js.map +1 -1
  172. package/js/types/Interface/models/IAccountingStatementHistory.js +6 -0
  173. package/js/types/Interface/models/IAccountingStatementHistory.js.map +1 -0
  174. package/js/types/Interface/models/{IBalanceSheetHistory.js → ICustomerAcceptance.js} +1 -1
  175. package/js/types/Interface/models/ICustomerAcceptance.js.map +1 -0
  176. package/js/types/Interface/models/ICustomerIsRegime.js.map +1 -1
  177. package/js/types/Interface/models/IExercice.js.map +1 -1
  178. package/js/types/Interface/models/IRegistration.js.map +1 -1
  179. package/js/types/Interface/models/ISocietyPartner.js.map +1 -1
  180. package/js/types/Interface/models/IVatDeclarationSocietyDetail.js.map +1 -1
  181. package/js/types/index.js +79 -39
  182. package/js/types/index.js.map +1 -1
  183. package/package.json +1 -1
  184. package/ts/api/resources/Acceptance.ts +8 -0
  185. package/ts/api/resources/CustomerActivity.ts +7 -1
  186. package/ts/api/resources/Partner.ts +13 -0
  187. package/ts/api/resources/Registration.ts +9 -0
  188. package/ts/api/resources/Wallet.ts +10 -1
  189. package/ts/api/resources.ts +2 -0
  190. package/ts/types/Enum/Acceptance.ts +4 -0
  191. package/ts/types/Enum/CerfaType.ts +4 -0
  192. package/ts/types/Enum/MailAuto.ts +1 -0
  193. package/ts/types/Enum/Notification.ts +5 -0
  194. package/ts/types/Enum/PaymentReason.ts +56 -0
  195. package/ts/types/Enum/TaskResponseType.ts +1 -1
  196. package/ts/types/Interface/api/BasePaginate.ts +13 -1
  197. package/ts/types/Interface/api/acceptance/CreateAcceptance.ts +16 -0
  198. package/ts/types/Interface/api/cerfa/2571.ts +97 -0
  199. package/ts/types/Interface/api/cerfa/CreateCerfa.ts +1 -0
  200. package/ts/types/Interface/api/mail/CreateMailParams.ts +1 -0
  201. package/ts/types/Interface/api/partner/CreatePartner.ts +2 -0
  202. package/ts/types/Interface/api/partner/Query.ts +30 -0
  203. package/ts/types/Interface/api/partner/Read.ts +31 -0
  204. package/ts/types/Interface/api/partner/UpdatePartner.ts +2 -0
  205. package/ts/types/Interface/api/registration/CreateRegistration.ts +58 -1
  206. package/ts/types/Interface/api/tax/CreateTax.ts +6 -1
  207. package/ts/types/Interface/api/tax/ReadTax.ts +8 -1
  208. package/ts/types/Interface/api/taxDeadline/QueryTaxDeadline.ts +22 -1
  209. package/ts/types/Interface/models/IAccountingStatementHistory.ts +20 -0
  210. package/ts/types/Interface/models/ICustomerAcceptance.ts +14 -0
  211. package/ts/types/Interface/models/ICustomerIsRegime.ts +8 -1
  212. package/ts/types/Interface/models/IExercice.ts +1 -0
  213. package/ts/types/Interface/models/IRegistration.ts +3 -0
  214. package/ts/types/Interface/models/ISocietyPartner.ts +1 -0
  215. package/ts/types/Interface/models/IVatDeclarationSocietyDetail.ts +3 -1
  216. package/ts/types/index.ts +7 -3
  217. package/es/types/Enum/Reason.d.ts +0 -4
  218. package/es/types/Enum/Reason.d.ts.map +0 -1
  219. package/es/types/Enum/Reason.js +0 -5
  220. package/es/types/Enum/Reason.js.map +0 -1
  221. package/es/types/Interface/api/partner/GetPartners.d.ts +0 -4
  222. package/es/types/Interface/api/partner/GetPartners.d.ts.map +0 -1
  223. package/es/types/Interface/api/partner/GetPartners.js.map +0 -1
  224. package/es/types/Interface/models/IBalanceSheetHistory.d.ts +0 -10
  225. package/es/types/Interface/models/IBalanceSheetHistory.d.ts.map +0 -1
  226. package/es/types/Interface/models/IBalanceSheetHistory.js +0 -2
  227. package/es/types/Interface/models/IBalanceSheetHistory.js.map +0 -1
  228. package/js/types/Enum/Reason.js +0 -10
  229. package/js/types/Enum/Reason.js.map +0 -1
  230. package/js/types/Interface/api/partner/GetPartners.js.map +0 -1
  231. package/js/types/Interface/models/IBalanceSheetHistory.js.map +0 -1
  232. package/ts/types/Enum/Reason.ts +0 -3
  233. package/ts/types/Interface/api/partner/GetPartners.ts +0 -11
  234. package/ts/types/Interface/models/IBalanceSheetHistory.ts +0 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "1.0.146",
3
+ "version": "1.0.148",
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": "js/index.js",
@@ -0,0 +1,8 @@
1
+ import { Resource } from '../Resource';
2
+ import { CreateCustomerAcceptance, ICustomerAcceptance } from '../../types';
3
+
4
+ export class Acceptance extends Resource {
5
+ create(payload: CreateCustomerAcceptance): Promise<ICustomerAcceptance> {
6
+ return this.axios.$post('/customers-acceptances', payload);
7
+ }
8
+ }
@@ -1,4 +1,6 @@
1
- import { CreateContactRequest, IRecontactHistory, QueryContactRequest } from '../../types';
1
+ import {
2
+ CreateContactRequest, CreateCustomerAcceptance, ICustomerAcceptance, IRecontactHistory, QueryContactRequest,
3
+ } from '../../types';
2
4
  import { Resource } from '../Resource';
3
5
 
4
6
  export class CustomerActivity extends Resource {
@@ -13,4 +15,8 @@ export class CustomerActivity extends Resource {
13
15
  createContactRequests(idUser: number, params: CreateContactRequest): Promise<IRecontactHistory> {
14
16
  return this.axios.$post(`/users/${idUser}/contact-requests`, params);
15
17
  }
18
+
19
+ createAcceptance(params: CreateCustomerAcceptance): Promise<ICustomerAcceptance> {
20
+ return this.axios.$post('/customers-acceptances', params);
21
+ }
16
22
  }
@@ -4,6 +4,11 @@ import {
4
4
  CreatePartner,
5
5
  UpdatePartner,
6
6
  GetPartners,
7
+ GetPartnersCurrentAccounts,
8
+ ReadPartnersCurrentAccounts,
9
+ GetPartnerSolde,
10
+ ReadPartnerSolde,
11
+ BasePaginate,
7
12
  } from '../../types';
8
13
 
9
14
  export class Partner extends Resource {
@@ -20,4 +25,12 @@ export class Partner extends Resource {
20
25
  delete(idPartner: number): Promise<number> {
21
26
  return this.axios.$delete(`partners/${idPartner}`);
22
27
  }
28
+
29
+ getCurrentAccounts(idPartner: number, params: GetPartnersCurrentAccounts): Promise<ReadPartnersCurrentAccounts> {
30
+ return this.axios.$get(`partners/${idPartner}/current-accounts`, { params });
31
+ }
32
+
33
+ getSolde(params: GetPartnerSolde): Promise<BasePaginate<ReadPartnerSolde>> {
34
+ return this.axios.$get('partners/solde', { params });
35
+ }
23
36
  }
@@ -6,6 +6,7 @@ import {
6
6
  IVatDeclarationSocietyDetail,
7
7
  QueryRegistration,
8
8
  DeclareRegistration,
9
+ CreateRegistrationSettingFromSociety,
9
10
  } from '../../types';
10
11
 
11
12
  export class Registration extends Resource {
@@ -31,4 +32,12 @@ export class Registration extends Resource {
31
32
  declare(id: number, params: DeclareRegistration): Promise<ReadRegistration> {
32
33
  return this.axios.$post(`/registrations/${id}/declare`, params);
33
34
  }
35
+
36
+ getSettingsFromSociety(idSociety: number): Promise<IVatDeclarationSocietyDetail | null> {
37
+ return this.axios.$get(`/societies/${idSociety}/registrations/settings`);
38
+ }
39
+
40
+ updateOrCreateSettingsFromSociety(idSociety: number, params: CreateRegistrationSettingFromSociety): Promise<IVatDeclarationSocietyDetail> {
41
+ return this.axios.$post(`/societies/${idSociety}/registrations/settings`, params);
42
+ }
34
43
  }
@@ -1,7 +1,9 @@
1
1
  import { CancelToken } from 'axios';
2
2
  import { Resource } from '../Resource';
3
3
  import { UpdateAttribution } from '../../types/Interface/api/wallet/UpdateAttribution';
4
- import { BasePaginate, ISociety, QueryPaginate } from '../../types';
4
+ import {
5
+ BasePaginate, ISociety, QueryCompanyTaxesByCollaborater, QueryPaginate, ReadCompanyTaxWallet,
6
+ } from '../../types';
5
7
 
6
8
  export class Wallet extends Resource {
7
9
  get(pagination?: QueryPaginate, cancelToken?: CancelToken): Promise<(BasePaginate<ISociety>)> {
@@ -16,4 +18,11 @@ export class Wallet extends Resource {
16
18
  update(idUser: number, payload: UpdateAttribution): Promise<{ message: string }> {
17
19
  return this.axios.$put(`/users/${idUser}/wallets`, payload);
18
20
  }
21
+
22
+ getPaginatedCompanyTaxes(query: QueryCompanyTaxesByCollaborater, cancelToken?: CancelToken): Promise<BasePaginate<ReadCompanyTaxWallet>> {
23
+ return this.axios.$get('/wallets/company-taxes', {
24
+ ...(cancelToken ? { cancelToken } : {}),
25
+ params: query,
26
+ });
27
+ }
19
28
  }
@@ -116,6 +116,7 @@ import { SocietyConfigBalanceSheet } from './resources/SocietyConfigBalanceSheet
116
116
  import { SignFile } from './resources/SignFile';
117
117
  import { Rule } from './resources/Rule';
118
118
  import { VatRegimeHistory } from './resources/VatRegimeHistory';
119
+ import { Acceptance } from './resources/Acceptance';
119
120
 
120
121
  export const resources = {
121
122
  simulation: Simulation,
@@ -236,4 +237,5 @@ export const resources = {
236
237
  societyConfigBalanceSheet: SocietyConfigBalanceSheet,
237
238
  signFile: SignFile,
238
239
  rule: Rule,
240
+ acceptance: Acceptance,
239
241
  };
@@ -0,0 +1,4 @@
1
+ export enum AcceptanceType {
2
+ REFUSED = 0,
3
+ ACCEPTED = 1,
4
+ }
@@ -13,4 +13,8 @@ export enum CerfaType {
13
13
  CERFA_2072 = 12,
14
14
  CERFA_2572_2022 = 13,
15
15
  CERFA_2572_2023 = 14,
16
+ CERFA_2571_2023_A = 15,
17
+ CERFA_2571_2023_B = 16,
18
+ CERFA_2571_2023_C = 17,
19
+ CERFA_2571_2023_D = 18,
16
20
  }
@@ -112,6 +112,7 @@ export enum MailAuto {
112
112
  CLEMENTINE_ADVENTURE_DOES_NOT_END = 137,
113
113
  ASK_DOCUMENTS_FOR_BALANCE_SHEET = 138,
114
114
  ASK_SIGNED_DOCUMENTS_FOR_BALANCE_SHEET = 139,
115
+ CUSTOMER_ACCEPTANCE_COMPANY_TAX = 140,
115
116
  }
116
117
 
117
118
  export const MailAutoList = [
@@ -1,4 +1,9 @@
1
1
  export enum NotificationCode {
2
2
  UNPAID_OR_WAITING_END = 9,
3
3
  ASK_TO_CHANGE_COMPTA_TYPE = 33,
4
+ ACCEPANCE = 38,
5
+ }
6
+
7
+ export enum TypeNotificationType {
8
+ ACTION = 1,
4
9
  }
@@ -0,0 +1,56 @@
1
+ export enum PaymentReason {
2
+ FIRST_PAYMENT = 1,
3
+ REGULATES_SAMPLING_REJECTION = 2,
4
+ ANNONCE_LEGALE = 3,
5
+ FORECAST = 4,
6
+ ACCOUNTING = 5,
7
+ JURIDIC = 6,
8
+ EXCEPTIONAL = 7,
9
+ ADDITIONAL_PRESTA = 8,
10
+ ATTESTATIONS = 9,
11
+ UNPAID = 10,
12
+ }
13
+
14
+ export const PaymentReasonList: Array<{ value: PaymentReason; text: string }> =
15
+ [
16
+ {
17
+ value: PaymentReason.FIRST_PAYMENT,
18
+ text: 'Premier paiement',
19
+ },
20
+ {
21
+ value: PaymentReason.REGULATES_SAMPLING_REJECTION,
22
+ text: 'Régule rejet de prélévement 1',
23
+ },
24
+ {
25
+ value: PaymentReason.ANNONCE_LEGALE,
26
+ text: 'Annonces Légales',
27
+ },
28
+ {
29
+ value: PaymentReason.FORECAST,
30
+ text: 'Prévisionnel',
31
+ },
32
+ {
33
+ value: PaymentReason.ACCOUNTING,
34
+ text: 'Compta',
35
+ },
36
+ {
37
+ value: PaymentReason.JURIDIC,
38
+ text: 'Juridique',
39
+ },
40
+ {
41
+ value: PaymentReason.EXCEPTIONAL,
42
+ text: 'Exceptionnel',
43
+ },
44
+ {
45
+ value: PaymentReason.ADDITIONAL_PRESTA,
46
+ text: 'Prestation complémentaire',
47
+ },
48
+ {
49
+ value: PaymentReason.ATTESTATIONS,
50
+ text: 'Attestations',
51
+ },
52
+ {
53
+ value: PaymentReason.UNPAID,
54
+ text: 'Impayé',
55
+ },
56
+ ];
@@ -341,7 +341,7 @@ export const TaskResponseType = {
341
341
  backToClient: false,
342
342
  goToCalendar: false,
343
343
  responseType: null,
344
- description: 'Rendez-vous Clémentine',
344
+ description: 'Rendez-vous Clementine',
345
345
  },
346
346
  ],
347
347
 
@@ -1,5 +1,5 @@
1
1
  import { IsInt, IsOptional, Min } from 'class-validator';
2
- import { ApiPropertyOptional } from '../../..';
2
+ import { ApiProperty, ApiPropertyOptional } from '../../..';
3
3
 
4
4
  export interface BasePaginate<T> {
5
5
  maxPages: number;
@@ -33,3 +33,15 @@ export class OptionalQueryPaginate implements QueryPaginate {
33
33
  @IsOptional()
34
34
  limit: number;
35
35
  }
36
+
37
+ export class RequiredQueryPaginate implements QueryPaginate {
38
+ @ApiProperty()
39
+ @IsInt()
40
+ @Min(1)
41
+ page: number;
42
+
43
+ @ApiProperty()
44
+ @IsInt()
45
+ @Min(1)
46
+ limit: number;
47
+ }
@@ -0,0 +1,16 @@
1
+ import { IsEnum, IsString } from 'class-validator';
2
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
+ import { AcceptanceType } from '../../../Enum/Acceptance';
4
+
5
+ export class CreateCustomerAcceptance {
6
+ @ApiProperty()
7
+ @IsString()
8
+ token: string;
9
+
10
+ @ApiProperty()
11
+ @IsEnum(AcceptanceType)
12
+ state: AcceptanceType;
13
+
14
+ @ApiPropertyOptional()
15
+ comment?: string;
16
+ }
@@ -0,0 +1,97 @@
1
+ import { CerfaType } from '../../../Enum/CerfaType';
2
+ import { CerfaAddress } from './ReadCerfa';
3
+
4
+ type Exercice = {
5
+ startDate: string;
6
+ endDate: string;
7
+ };
8
+
9
+ type Society = {
10
+ name: string;
11
+ address: string;
12
+ addressObject: CerfaAddress;
13
+ };
14
+
15
+ type Payment = {
16
+ date: number;
17
+ phone: string;
18
+ isTransfer: boolean;
19
+ isCheck: boolean;
20
+ isElectronicPayment: boolean;
21
+ contribution: number;
22
+ limitDate: number;
23
+ amountToInpute: number;
24
+ };
25
+
26
+ type Administration = {
27
+ amount: number;
28
+ date: string;
29
+ operationNumber: number;
30
+ receptionDate: string;
31
+ };
32
+
33
+ type BaseRateAndAmount = {
34
+ base: number;
35
+ rate: number;
36
+ amount: number;
37
+ };
38
+
39
+ export class Cerfa2571_2023 {
40
+ siren: string;
41
+ exercice: Exercice;
42
+ society: Society;
43
+ companyTax: {
44
+ imputations: {
45
+ default: number;
46
+ job: number;
47
+ deficit: number;
48
+ corse: number;
49
+ search: number;
50
+ patronage: number;
51
+ outerSea: number;
52
+ collaborativeSearch: number;
53
+ overage: number;
54
+ };
55
+ toPay: {
56
+ default: number;
57
+ rent: number;
58
+ social: number;
59
+ tax: number;
60
+ capitalGain: number;
61
+ total: number;
62
+ };
63
+ reductions: {
64
+ hasDefault: boolean;
65
+ hasSocial: boolean;
66
+ }
67
+ };
68
+ payment: Payment;
69
+ administration?: Administration;
70
+ advances: {
71
+ normalRate: BaseRateAndAmount;
72
+ reducedRate: BaseRateAndAmount;
73
+ onResult: BaseRateAndAmount;
74
+ subTotal: number;
75
+ regulation: number;
76
+ total: number;
77
+ };
78
+ credit: {
79
+ job: number;
80
+ deficit: number;
81
+ corse: number;
82
+ search: number;
83
+ patronage: number;
84
+ outerSea: number;
85
+ collaborativeSearch: number;
86
+ overage: number;
87
+ default: number;
88
+ toPay: number;
89
+ };
90
+ }
91
+
92
+ export type Prepare2571Params = {
93
+ idSociety: number;
94
+ idExercice: number;
95
+ values: Cerfa2571_2023,
96
+ idCerfaType: CerfaType.CERFA_2571_2023_A | CerfaType.CERFA_2571_2023_B | CerfaType.CERFA_2571_2023_C | CerfaType.CERFA_2571_2023_D
97
+ };
@@ -6,6 +6,7 @@ export * from './2033';
6
6
  export * from './2035';
7
7
  export * from './2050';
8
8
  export * from './2065';
9
+ export * from './2571';
9
10
  export * from './2572';
10
11
  export * from './Utils';
11
12
 
@@ -17,6 +17,7 @@ export interface CreateMailParams extends IMail{
17
17
  idChecklist?: number;
18
18
  idLetter?: number;
19
19
  filesToken?: string[];
20
+ idCustomerIsRegime?: number;
20
21
  }
21
22
 
22
23
  export interface ExtendedIMailAddress extends IMailAddress { idMailAddressType?: number }
@@ -12,6 +12,8 @@ export class CreatePartner implements Omit<BaseEntity<ISocietyPartner>, 'idAccou
12
12
  siret?: string;
13
13
  @ApiProperty()
14
14
  fonction: string;
15
+ @ApiProperty()
16
+ soldeInit: number;
15
17
  @ApiProperty({
16
18
  default: PartnerType.PHYSICAL_PARTNER,
17
19
  description: 'You can retrieve the enum Partner Type in @core',
@@ -0,0 +1,30 @@
1
+ import { IsBoolean, IsOptional } from 'class-validator';
2
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
+ import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
4
+
5
+ export class GetPartners {
6
+ @ApiPropertyOptional()
7
+ @IsBoolean()
8
+ @ToBoolean()
9
+ @IsOptional()
10
+ includeDeletedPartner?: boolean;
11
+ }
12
+
13
+ export class GetPartnersCurrentAccounts {
14
+ @ApiProperty()
15
+ startDate!: Date;
16
+
17
+ @ApiProperty()
18
+ endDate!: Date;
19
+ }
20
+
21
+ export class GetPartnerSolde {
22
+ @ApiProperty()
23
+ endDate!: Date;
24
+
25
+ @ApiProperty()
26
+ page: number;
27
+
28
+ @ApiProperty()
29
+ limit: number;
30
+ }
@@ -0,0 +1,31 @@
1
+ import { PartnerType } from '../../../Enum/PartnerType';
2
+ import { IAccountingEntry } from '../../models/IAccountingEntry';
3
+ import { ISocietyPartner } from '../../models/ISocietyPartner';
4
+
5
+ export class ReadPartnersCurrentAccounts {
6
+ id: number;
7
+ firstname: string;
8
+ lastname: string;
9
+ company: string;
10
+ idPartnerType: PartnerType;
11
+ solde: number;
12
+ creditSolde: number;
13
+ debitSolde: number;
14
+ transactions: ReadPartnersCurrentAccountsTransaction[];
15
+ }
16
+
17
+ export class ReadPartnersCurrentAccountsTransaction {
18
+ id: number;
19
+ amount: number;
20
+ solde: number;
21
+ dateValue: string;
22
+ designation: string;
23
+ entries: IAccountingEntry[];
24
+ }
25
+
26
+ export class ReadPartnerSolde {
27
+ partner: ISocietyPartner;
28
+ solde: number;
29
+ creditSolde: number;
30
+ debitSolde: number;
31
+ }
@@ -12,6 +12,8 @@ export class UpdatePartner implements Omit<BaseEntity<ISocietyPartner>, 'idAccou
12
12
  siret?: string;
13
13
  @ApiProperty()
14
14
  fonction: string;
15
+ @ApiProperty()
16
+ soldeInit: number;
15
17
  @ApiProperty({
16
18
  default: PartnerType.PHYSICAL_PARTNER,
17
19
  description: 'You can retrieve the enum Partner Type in @core',
@@ -1,9 +1,10 @@
1
1
  import {
2
- IsEnum, IsOptional, IsBoolean, IsNumber, Min,
2
+ IsEnum, IsOptional, IsBoolean, IsNumber, Min, IsDateString,
3
3
  } from 'class-validator';
4
4
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
5
5
  import { CerfaType } from '../../../Enum/CerfaType';
6
6
  import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
7
+ import { Rof } from '../../../Enum/Aspone';
7
8
 
8
9
  export class CreateRegistrationSetting {
9
10
  @ApiPropertyOptional()
@@ -13,6 +14,53 @@ export class CreateRegistrationSetting {
13
14
  bic?: string | null;
14
15
  }
15
16
 
17
+ export class CreateRegistrationSettingFromSociety {
18
+ @ApiPropertyOptional()
19
+ rof: Rof | null;
20
+
21
+ @ApiPropertyOptional()
22
+ companyTaxRof: Rof | null;
23
+
24
+ @ApiPropertyOptional()
25
+ ogaName: string | null;
26
+
27
+ @ApiPropertyOptional()
28
+ ogaId: string | null;
29
+
30
+ @ApiPropertyOptional()
31
+ ogaAddressNumero: string | null;
32
+
33
+ @ApiPropertyOptional()
34
+ ogaAddressType: string | null;
35
+
36
+ @ApiPropertyOptional()
37
+ ogaAddressVoie: string | null;
38
+
39
+ @ApiPropertyOptional()
40
+ ogaAddressZipCode: string | null;
41
+
42
+ @ApiPropertyOptional()
43
+ ogaAddressCity: string | null;
44
+
45
+ @ApiPropertyOptional()
46
+ ogaReference: string | null;
47
+
48
+ @ApiPropertyOptional()
49
+ iban: string | null;
50
+
51
+ @ApiPropertyOptional()
52
+ bic: string | null;
53
+ }
54
+
55
+ export type ForcedValues_2571 = {
56
+ base?: number;
57
+ regularisation?: number;
58
+ };
59
+
60
+ export type ForcedValues = {
61
+ cerfa2571?: ForcedValues_2571;
62
+ };
63
+
16
64
  export class CreateRegistration {
17
65
  @ApiProperty()
18
66
  @IsEnum(CerfaType)
@@ -24,11 +72,20 @@ export class CreateRegistration {
24
72
  @IsOptional()
25
73
  amountToPay?: number;
26
74
 
75
+ @ApiPropertyOptional()
76
+ @IsDateString()
77
+ @IsOptional()
78
+ date?: string;
79
+
27
80
  @ApiPropertyOptional()
28
81
  @IsBoolean()
29
82
  @ToBoolean()
30
83
  @IsOptional()
31
84
  isTest?: boolean;
85
+
86
+ @ApiPropertyOptional({ description: 'Set values manually (not available for all cerfa)' })
87
+ @IsOptional()
88
+ forcedValues?: ForcedValues;
32
89
  }
33
90
 
34
91
  export class CreateRegistrationSynchronization {
@@ -1,4 +1,4 @@
1
- import { IsBoolean } from 'class-validator';
1
+ import { IsBoolean, IsNumber, IsOptional } from 'class-validator';
2
2
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
3
  import { TaxType, TaxState, TaxCredit } from '../../../Enum/Tax';
4
4
  import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
@@ -31,4 +31,9 @@ export class CreateTax {
31
31
  @IsBoolean()
32
32
  @ToBoolean()
33
33
  isOrphan?: boolean;
34
+
35
+ @ApiPropertyOptional({ description: 'Acceptance id mail' })
36
+ @IsNumber()
37
+ @IsOptional()
38
+ idMail?: number | null;
34
39
  }
@@ -1,3 +1,4 @@
1
+ import { BasePaginate, IExercice, ISociety } from '../../..';
1
2
  import { ICustomerIsRegime } from '../../models/ICustomerIsRegime';
2
3
 
3
4
  export interface ReadAmountBase {
@@ -31,4 +32,10 @@ export type ReadVatAmountDetail = { idVat: number; real: number; collected: numb
31
32
  export type ReadVatAmount = {
32
33
  isBalanced: boolean;
33
34
  details: ReadVatAmountDetail[];
34
- };
35
+ };
36
+
37
+ export type ReadCompanyTaxWallet = BasePaginate<IExercice & {
38
+ society: ISociety;
39
+ taxes: ReadTaxAndData[];
40
+ amountBase: ReadAmountBase;
41
+ }>;
@@ -1,4 +1,6 @@
1
- import { IsOptional, IsEnum, IsArray, IsString } from 'class-validator';
1
+ import {
2
+ IsOptional, IsEnum, IsNumber, IsDateString, IsString, IsArray,
3
+ } from 'class-validator';
2
4
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
5
  import {
4
6
  VatRegime, ToDoOrDone, BankCollectingState,
@@ -101,4 +103,23 @@ export class QueryTaxDeadlineStatistics {
101
103
 
102
104
  @ApiPropertyOptional({ description: 'Récupérer les exercices qui ont une date de fin inférieure à X mois à partir d\'aujourd\'hui' })
103
105
  additionalMonths?: string;
106
+ }
107
+
108
+ export class QueryCompanyTaxesByCollaborater {
109
+ @ApiProperty({ description: 'Id collaborater' })
110
+ @IsNumber()
111
+ idUser: number;
112
+
113
+ @ApiProperty()
114
+ @IsDateString()
115
+ startDate: string;
116
+
117
+ @ApiProperty()
118
+ @IsDateString()
119
+ endDate: string;
120
+
121
+ @ApiPropertyOptional({ description: 'Company key word' })
122
+ @IsString()
123
+ @IsOptional()
124
+ search?: string;
104
125
  }
@@ -0,0 +1,20 @@
1
+ import { IUser } from '../..';
2
+ import { IBalanceSheet } from './IBalanceSheet';
3
+ import { ICustomerIsRegime } from './ICustomerIsRegime';
4
+
5
+ export interface IAccountingStatementHistory {
6
+ id?: number;
7
+ idState: number;
8
+ idUser: number | null;
9
+ idBalanceSheet: number | null;
10
+ idCustomerIsRegime: number | null;
11
+ createdAt?: Date | null;
12
+ updatedAt?: Date | null;
13
+
14
+ // Associations
15
+ balanceSheet?: IBalanceSheet | null;
16
+ balanceSheetLiquidation?: IBalanceSheet | null;
17
+ balanceSheetPartial?: IBalanceSheet | null;
18
+ customerIsRegime?: ICustomerIsRegime | null;
19
+ user?: IUser | null;
20
+ }
@@ -0,0 +1,14 @@
1
+ import { ICustomerIsRegime } from './ICustomerIsRegime';
2
+
3
+ export interface ICustomerAcceptance {
4
+ id?: number;
5
+ state: number;
6
+ comment: string | null;
7
+ idCustomerIsRegime?: number | null;
8
+ idCustomerVat?: number | null;
9
+ idBalanceSheet?: number | null;
10
+ createdAt?: Date | null;
11
+ updatedAt?: Date | null;
12
+
13
+ customerIsRegime?: ICustomerIsRegime | null;
14
+ }
@@ -1,5 +1,7 @@
1
1
  import { IExercice } from './IExercice';
2
- import { TaxState, TaxType } from '../..';
2
+ import {
3
+ IAccountingStatementHistory, IMail, IRegistration, TaxState, TaxType,
4
+ } from '../..';
3
5
 
4
6
  // customersIsRegimes
5
7
  export interface ICustomerIsRegime {
@@ -13,10 +15,15 @@ export interface ICustomerIsRegime {
13
15
  solde: number;
14
16
  idExercice: number;
15
17
  dateIs: Date | null;
18
+ token?: string | null;
16
19
  isOrphan: boolean;
20
+ idMail?: number | null;
17
21
  createdAt?: Date | null;
18
22
  updatedAt?: Date | null;
19
23
 
20
24
  // Associations
21
25
  exercice?: IExercice;
26
+ mail?: IMail | null;
27
+ registrations?: IRegistration[];
28
+ accountingStatementHistory?: IAccountingStatementHistory[];
22
29
  }