@silexpert/core 1.3.101-2 → 1.3.101-3

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 (184) hide show
  1. package/dist/cjs/api/resources/BankDedup.d.ts +9 -0
  2. package/dist/cjs/api/resources/BankDedup.d.ts.map +1 -0
  3. package/dist/cjs/api/resources/BankDedup.js +20 -0
  4. package/dist/cjs/api/resources/BankDedup.js.map +1 -0
  5. package/dist/cjs/api/resources/CalendarEvent.d.ts +1 -0
  6. package/dist/cjs/api/resources/CalendarEvent.d.ts.map +1 -1
  7. package/dist/cjs/api/resources/CalendarEvent.js +3 -0
  8. package/dist/cjs/api/resources/CalendarEvent.js.map +1 -1
  9. package/dist/cjs/api/resources/Exercice.d.ts +1 -1
  10. package/dist/cjs/api/resources/Exercice.d.ts.map +1 -1
  11. package/dist/cjs/api/resources/Exercice.js.map +1 -1
  12. package/dist/cjs/api/resources/Inpi.d.ts +3 -3
  13. package/dist/cjs/api/resources/Inpi.d.ts.map +1 -1
  14. package/dist/cjs/api/resources/Inpi.js +1 -1
  15. package/dist/cjs/api/resources/Inpi.js.map +1 -1
  16. package/dist/cjs/api/resources/StripePurchase.d.ts +13 -0
  17. package/dist/cjs/api/resources/StripePurchase.d.ts.map +1 -0
  18. package/dist/cjs/api/resources/StripePurchase.js +17 -0
  19. package/dist/cjs/api/resources/StripePurchase.js.map +1 -0
  20. package/dist/cjs/api/resources.d.ts +4 -0
  21. package/dist/cjs/api/resources.d.ts.map +1 -1
  22. package/dist/cjs/api/resources.js +4 -0
  23. package/dist/cjs/api/resources.js.map +1 -1
  24. package/dist/cjs/types/Enum/ConstitutionState.d.ts +2 -1
  25. package/dist/cjs/types/Enum/ConstitutionState.d.ts.map +1 -1
  26. package/dist/cjs/types/Enum/ConstitutionState.js +7 -1
  27. package/dist/cjs/types/Enum/ConstitutionState.js.map +1 -1
  28. package/dist/cjs/types/Enum/InpiType.d.ts +10 -2
  29. package/dist/cjs/types/Enum/InpiType.d.ts.map +1 -1
  30. package/dist/cjs/types/Enum/InpiType.js +12 -4
  31. package/dist/cjs/types/Enum/InpiType.js.map +1 -1
  32. package/dist/cjs/types/Enum/Phone.d.ts +6 -0
  33. package/dist/cjs/types/Enum/Phone.d.ts.map +1 -1
  34. package/dist/cjs/types/Enum/Phone.js +6 -0
  35. package/dist/cjs/types/Enum/Phone.js.map +1 -1
  36. package/dist/cjs/types/Enum/PrestationType.d.ts +2 -1
  37. package/dist/cjs/types/Enum/PrestationType.d.ts.map +1 -1
  38. package/dist/cjs/types/Enum/PrestationType.js +20 -0
  39. package/dist/cjs/types/Enum/PrestationType.js.map +1 -1
  40. package/dist/cjs/types/Enum/ReasonTerminationType.d.ts +2 -1
  41. package/dist/cjs/types/Enum/ReasonTerminationType.d.ts.map +1 -1
  42. package/dist/cjs/types/Enum/ReasonTerminationType.js +8 -2
  43. package/dist/cjs/types/Enum/ReasonTerminationType.js.map +1 -1
  44. package/dist/cjs/types/Enum/RegistrationSource.d.ts +2 -1
  45. package/dist/cjs/types/Enum/RegistrationSource.d.ts.map +1 -1
  46. package/dist/cjs/types/Enum/RegistrationSource.js +1 -0
  47. package/dist/cjs/types/Enum/RegistrationSource.js.map +1 -1
  48. package/dist/cjs/types/Enum/Stripe.d.ts +4 -0
  49. package/dist/cjs/types/Enum/Stripe.d.ts.map +1 -0
  50. package/dist/cjs/types/Enum/Stripe.js +8 -0
  51. package/dist/cjs/types/Enum/Stripe.js.map +1 -0
  52. package/dist/cjs/types/Interface/api/accountingIncome/ReadAccountingIncome.d.ts +6 -0
  53. package/dist/cjs/types/Interface/api/accountingIncome/ReadAccountingIncome.d.ts.map +1 -1
  54. package/dist/cjs/types/Interface/api/accountingIncome/ReadAccountingIncome.js.map +1 -1
  55. package/dist/cjs/types/Interface/api/bankDedup/BankDedup.d.ts +104 -0
  56. package/dist/cjs/types/Interface/api/bankDedup/BankDedup.d.ts.map +1 -0
  57. package/dist/cjs/types/Interface/api/bankDedup/BankDedup.js +359 -0
  58. package/dist/cjs/types/Interface/api/bankDedup/BankDedup.js.map +1 -0
  59. package/dist/cjs/types/Interface/api/exercice/Create.d.ts +1 -0
  60. package/dist/cjs/types/Interface/api/exercice/Create.d.ts.map +1 -1
  61. package/dist/cjs/types/Interface/api/exercice/Create.js +7 -0
  62. package/dist/cjs/types/Interface/api/exercice/Create.js.map +1 -1
  63. package/dist/cjs/types/Interface/api/inpiPayment/Query.d.ts +14 -0
  64. package/dist/cjs/types/Interface/api/inpiPayment/Query.d.ts.map +1 -0
  65. package/dist/cjs/types/Interface/api/inpiPayment/Query.js +128 -0
  66. package/dist/cjs/types/Interface/api/inpiPayment/Query.js.map +1 -0
  67. package/dist/cjs/types/Interface/api/stripe/Create.d.ts +25 -0
  68. package/dist/cjs/types/Interface/api/stripe/Create.d.ts.map +1 -1
  69. package/dist/cjs/types/Interface/api/stripe/Create.js +97 -1
  70. package/dist/cjs/types/Interface/api/stripe/Create.js.map +1 -1
  71. package/dist/cjs/types/Interface/api/stripe/QueryStripe.d.ts +6 -0
  72. package/dist/cjs/types/Interface/api/stripe/QueryStripe.d.ts.map +1 -1
  73. package/dist/cjs/types/Interface/api/stripe/QueryStripe.js +19 -1
  74. package/dist/cjs/types/Interface/api/stripe/QueryStripe.js.map +1 -1
  75. package/dist/cjs/types/index.d.ts +2 -0
  76. package/dist/cjs/types/index.d.ts.map +1 -1
  77. package/dist/cjs/types/index.js +2 -0
  78. package/dist/cjs/types/index.js.map +1 -1
  79. package/dist/cjs/utils/vat/3517/century23.d.ts.map +1 -1
  80. package/dist/cjs/utils/vat/3517/century23.js +55 -55
  81. package/dist/cjs/utils/vat/3517/century23.js.map +1 -1
  82. package/dist/mjs/api/resources/BankDedup.d.ts +9 -0
  83. package/dist/mjs/api/resources/BankDedup.d.ts.map +1 -0
  84. package/dist/mjs/api/resources/BankDedup.js +16 -0
  85. package/dist/mjs/api/resources/BankDedup.js.map +1 -0
  86. package/dist/mjs/api/resources/CalendarEvent.d.ts +1 -0
  87. package/dist/mjs/api/resources/CalendarEvent.d.ts.map +1 -1
  88. package/dist/mjs/api/resources/CalendarEvent.js +3 -0
  89. package/dist/mjs/api/resources/CalendarEvent.js.map +1 -1
  90. package/dist/mjs/api/resources/Exercice.d.ts +1 -1
  91. package/dist/mjs/api/resources/Exercice.d.ts.map +1 -1
  92. package/dist/mjs/api/resources/Exercice.js.map +1 -1
  93. package/dist/mjs/api/resources/Inpi.d.ts +3 -3
  94. package/dist/mjs/api/resources/Inpi.d.ts.map +1 -1
  95. package/dist/mjs/api/resources/Inpi.js +1 -1
  96. package/dist/mjs/api/resources/Inpi.js.map +1 -1
  97. package/dist/mjs/api/resources/StripePurchase.d.ts +13 -0
  98. package/dist/mjs/api/resources/StripePurchase.d.ts.map +1 -0
  99. package/dist/mjs/api/resources/StripePurchase.js +16 -0
  100. package/dist/mjs/api/resources/StripePurchase.js.map +1 -0
  101. package/dist/mjs/api/resources.d.ts +4 -0
  102. package/dist/mjs/api/resources.d.ts.map +1 -1
  103. package/dist/mjs/api/resources.js +4 -0
  104. package/dist/mjs/api/resources.js.map +1 -1
  105. package/dist/mjs/types/Enum/ConstitutionState.d.ts +2 -1
  106. package/dist/mjs/types/Enum/ConstitutionState.d.ts.map +1 -1
  107. package/dist/mjs/types/Enum/ConstitutionState.js +7 -1
  108. package/dist/mjs/types/Enum/ConstitutionState.js.map +1 -1
  109. package/dist/mjs/types/Enum/InpiType.d.ts +10 -2
  110. package/dist/mjs/types/Enum/InpiType.d.ts.map +1 -1
  111. package/dist/mjs/types/Enum/InpiType.js +12 -4
  112. package/dist/mjs/types/Enum/InpiType.js.map +1 -1
  113. package/dist/mjs/types/Enum/Phone.d.ts +6 -0
  114. package/dist/mjs/types/Enum/Phone.d.ts.map +1 -1
  115. package/dist/mjs/types/Enum/Phone.js +6 -0
  116. package/dist/mjs/types/Enum/Phone.js.map +1 -1
  117. package/dist/mjs/types/Enum/PrestationType.d.ts +2 -1
  118. package/dist/mjs/types/Enum/PrestationType.d.ts.map +1 -1
  119. package/dist/mjs/types/Enum/PrestationType.js +20 -0
  120. package/dist/mjs/types/Enum/PrestationType.js.map +1 -1
  121. package/dist/mjs/types/Enum/ReasonTerminationType.d.ts +2 -1
  122. package/dist/mjs/types/Enum/ReasonTerminationType.d.ts.map +1 -1
  123. package/dist/mjs/types/Enum/ReasonTerminationType.js +8 -2
  124. package/dist/mjs/types/Enum/ReasonTerminationType.js.map +1 -1
  125. package/dist/mjs/types/Enum/RegistrationSource.d.ts +2 -1
  126. package/dist/mjs/types/Enum/RegistrationSource.d.ts.map +1 -1
  127. package/dist/mjs/types/Enum/RegistrationSource.js +1 -0
  128. package/dist/mjs/types/Enum/RegistrationSource.js.map +1 -1
  129. package/dist/mjs/types/Enum/Stripe.d.ts +4 -0
  130. package/dist/mjs/types/Enum/Stripe.d.ts.map +1 -0
  131. package/dist/mjs/types/Enum/Stripe.js +5 -0
  132. package/dist/mjs/types/Enum/Stripe.js.map +1 -0
  133. package/dist/mjs/types/Interface/api/accountingIncome/ReadAccountingIncome.d.ts +6 -0
  134. package/dist/mjs/types/Interface/api/accountingIncome/ReadAccountingIncome.d.ts.map +1 -1
  135. package/dist/mjs/types/Interface/api/accountingIncome/ReadAccountingIncome.js.map +1 -1
  136. package/dist/mjs/types/Interface/api/bankDedup/BankDedup.d.ts +104 -0
  137. package/dist/mjs/types/Interface/api/bankDedup/BankDedup.d.ts.map +1 -0
  138. package/dist/mjs/types/Interface/api/bankDedup/BankDedup.js +406 -0
  139. package/dist/mjs/types/Interface/api/bankDedup/BankDedup.js.map +1 -0
  140. package/dist/mjs/types/Interface/api/exercice/Create.d.ts +1 -0
  141. package/dist/mjs/types/Interface/api/exercice/Create.d.ts.map +1 -1
  142. package/dist/mjs/types/Interface/api/exercice/Create.js +8 -0
  143. package/dist/mjs/types/Interface/api/exercice/Create.js.map +1 -1
  144. package/dist/mjs/types/Interface/api/inpiPayment/Query.d.ts +14 -0
  145. package/dist/mjs/types/Interface/api/inpiPayment/Query.d.ts.map +1 -0
  146. package/dist/mjs/types/Interface/api/inpiPayment/Query.js +135 -0
  147. package/dist/mjs/types/Interface/api/inpiPayment/Query.js.map +1 -0
  148. package/dist/mjs/types/Interface/api/stripe/Create.d.ts +25 -0
  149. package/dist/mjs/types/Interface/api/stripe/Create.d.ts.map +1 -1
  150. package/dist/mjs/types/Interface/api/stripe/Create.js +110 -1
  151. package/dist/mjs/types/Interface/api/stripe/Create.js.map +1 -1
  152. package/dist/mjs/types/Interface/api/stripe/QueryStripe.d.ts +6 -0
  153. package/dist/mjs/types/Interface/api/stripe/QueryStripe.d.ts.map +1 -1
  154. package/dist/mjs/types/Interface/api/stripe/QueryStripe.js +18 -0
  155. package/dist/mjs/types/Interface/api/stripe/QueryStripe.js.map +1 -1
  156. package/dist/mjs/types/index.d.ts +2 -0
  157. package/dist/mjs/types/index.d.ts.map +1 -1
  158. package/dist/mjs/types/index.js +2 -0
  159. package/dist/mjs/types/index.js.map +1 -1
  160. package/dist/mjs/utils/vat/3517/century23.d.ts.map +1 -1
  161. package/dist/mjs/utils/vat/3517/century23.js +54 -54
  162. package/dist/mjs/utils/vat/3517/century23.js.map +1 -1
  163. package/package.json +1 -1
  164. package/ts/api/resources/BankDedup.ts +19 -0
  165. package/ts/api/resources/CalendarEvent.ts +4 -0
  166. package/ts/api/resources/Exercice.ts +1 -1
  167. package/ts/api/resources/Inpi.ts +3 -2
  168. package/ts/api/resources/StripePurchase.ts +22 -0
  169. package/ts/api/resources.ts +4 -0
  170. package/ts/types/Enum/ConstitutionState.ts +7 -1
  171. package/ts/types/Enum/InpiType.ts +13 -4
  172. package/ts/types/Enum/Phone.ts +6 -0
  173. package/ts/types/Enum/PrestationType.ts +20 -0
  174. package/ts/types/Enum/ReasonTerminationType.ts +8 -2
  175. package/ts/types/Enum/RegistrationSource.ts +3 -2
  176. package/ts/types/Enum/Stripe.ts +3 -0
  177. package/ts/types/Interface/api/accountingIncome/ReadAccountingIncome.ts +3 -0
  178. package/ts/types/Interface/api/bankDedup/BankDedup.ts +305 -0
  179. package/ts/types/Interface/api/exercice/Create.ts +6 -0
  180. package/ts/types/Interface/api/inpiPayment/Query.ts +103 -0
  181. package/ts/types/Interface/api/stripe/Create.ts +77 -1
  182. package/ts/types/Interface/api/stripe/QueryStripe.ts +14 -0
  183. package/ts/types/index.ts +2 -0
  184. package/ts/utils/vat/3517/century23.ts +55 -54
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "1.3.101-2",
3
+ "version": "1.3.101-3",
4
4
  "description": "Silex Core perform HTTP Request and object binding. Silex core helps developers to retrieve and return formatted object",
5
5
  "homepage": "https://gitlab.compta-clementine.fr/dev/silex-api",
6
6
  "main": "dist/cjs/index.js",
@@ -0,0 +1,19 @@
1
+ import { BankDedupAnalysisParams, BankDedupResponse } from '../../types';
2
+ import { Resource } from '../Resource';
3
+
4
+ export class BankDedup extends Resource {
5
+ /**
6
+ * Analyze bank transactions for deduplication
7
+ */
8
+ public getAnalysis(body: BankDedupAnalysisParams): Promise<BankDedupResponse> {
9
+ const formData = new FormData();
10
+
11
+ formData.append('file', body.csv);
12
+ formData.append('initial', `${body.initial}`);
13
+ formData.append('target', `${body.target}`);
14
+
15
+ return this.axios.$post('/bank-dedup/detect', formData, {
16
+ headers: { 'Content-Type': 'multipart/form-data' },
17
+ });
18
+ }
19
+ }
@@ -69,4 +69,8 @@ export class CalendarEvent extends Resource {
69
69
  deleteByUser(id: number, idUser: number): Promise<number> {
70
70
  return this.axios.$delete(`users/${idUser}/calendar-events/${id}`);
71
71
  }
72
+
73
+ getMeetingBySociety(idSociety: number, signal?: AbortSignal): Promise<ICalendarEvent[]> {
74
+ return this.axios.$get(`${idSociety}/meetings`, { ...(signal ? { signal } : {}) });
75
+ }
72
76
  }
@@ -11,7 +11,7 @@ import {
11
11
  import { Resource } from '../Resource';
12
12
 
13
13
  export class Exercice extends Resource {
14
- create(params: CreateExercice): Promise<IExercice> {
14
+ create(params: CreateExercice): Promise<IExercice | null> {
15
15
  return this.axios.$post('/exercices', params);
16
16
  }
17
17
 
@@ -8,6 +8,7 @@ import {
8
8
  IInpiPayment,
9
9
  QueryInpiPaymentPaginated,
10
10
  QueryInpiPaymentStatistic,
11
+ QueryInpiPaymentCreate,
11
12
  } from '../../types';
12
13
 
13
14
  export class Inpi extends Resource {
@@ -50,10 +51,10 @@ export class Inpi extends Resource {
50
51
 
51
52
  /**
52
53
  * Créer un enregistrement dans la table InpiPayment
53
- * @param { IInpiPayment } payload
54
+ * @param { QueryInpiPaymentCreate } payload
54
55
  * @returns { IInpiPayment }
55
56
  */
56
- public createPayment(payload: IInpiPayment): Promise<IInpiPayment> {
57
+ public createPayment(payload: QueryInpiPaymentCreate): Promise<IInpiPayment> {
57
58
  return this.axios.$post('/inpi/payments', payload);
58
59
  }
59
60
 
@@ -0,0 +1,22 @@
1
+ import Stripe from 'stripe';
2
+ import { Resource } from '../Resource';
3
+ import { CreatePurchaseSession, QueryStripePrice } from '../../types';
4
+
5
+ export class StripePurchase extends Resource {
6
+
7
+ getAllPrices(params: QueryStripePrice): Promise<Stripe.Price[]> {
8
+ return this.axios.$get('/stripe/purchases/prices', { params });
9
+ }
10
+
11
+ createNewExerciceSession(metadata: { idSociety: number; startDate: string; endDate: string; }, payload: CreatePurchaseSession): Promise<Stripe.Response<Stripe.Checkout.Session>> {
12
+ return this.createSession({
13
+ ...payload,
14
+ metadata
15
+ });
16
+ }
17
+
18
+ createSession(payload: CreatePurchaseSession): Promise<Stripe.Response<Stripe.Checkout.Session>> {
19
+ return this.axios.$post('/stripe/purchases/sessions', payload);
20
+ }
21
+
22
+ }
@@ -179,6 +179,8 @@ import { StatisticLegal } from './resources/statistic/Legal';
179
179
  import { AnalyticsUtm } from './resources/AnalyticsUtm';
180
180
  import { Caarl } from './resources/Caarl';
181
181
  import { Gdpr } from './resources/Gdpr';
182
+ import { BankDedup } from './resources/BankDedup';
183
+ import { StripePurchase } from './resources/StripePurchase';
182
184
 
183
185
  export const resources = {
184
186
  budgetInsight: BudgetInsight,
@@ -264,6 +266,7 @@ export const resources = {
264
266
  notificationSetting: NotificationSetting,
265
267
  cx: Cx,
266
268
  bankList: BankList,
269
+ bankDedup: BankDedup,
267
270
  thirdParty: ThirdParty,
268
271
  alert: Alert,
269
272
  customerActivity: CustomerActivity,
@@ -362,4 +365,5 @@ export const resources = {
362
365
  analyticsUtm: AnalyticsUtm,
363
366
  caarl: Caarl,
364
367
  gdpr: Gdpr,
368
+ StripePurchase: StripePurchase,
365
369
  };
@@ -13,6 +13,7 @@ export enum ConstitutionState {
13
13
  // ========================
14
14
  ABANDONED_CASE = 10,
15
15
  DRAFT_BY_LAWS_TO_BE_MADE = 11,
16
+ STATUS_TO_BE_DRAFTED_AUTO_SUBSCRIPTION = 12,
16
17
  }
17
18
 
18
19
  export type ConstitutionStateType = {
@@ -29,6 +30,11 @@ export const ConstitutionStateDetail: ConstitutionStateType = {
29
30
  text: 'À contacter et à facturer',
30
31
  color: 'grey lighten-4',
31
32
  },
33
+ STATUS_TO_BE_DRAFTED_AUTO_SUBSCRIPTION: {
34
+ value: ConstitutionState.STATUS_TO_BE_DRAFTED_AUTO_SUBSCRIPTION,
35
+ text: 'Statuts à rédiger - Constitution automatique',
36
+ color: 'teal lighten-4',
37
+ },
32
38
  WAITING_INFORMATION_SHEET: {
33
39
  value: ConstitutionState.WAITING_INFORMATION_SHEET,
34
40
  text: 'Attente fiche de renseignement',
@@ -74,7 +80,7 @@ export const ConstitutionStateDetail: ConstitutionStateType = {
74
80
  },
75
81
  BEING_ABANDONED: {
76
82
  value: ConstitutionState.BEING_ABANDONED,
77
- text: 'Dossier en cours d\'abandon',
83
+ text: "Dossier en cours d'abandon",
78
84
  color: 'primary',
79
85
  },
80
86
  FINISHED: {
@@ -1,3 +1,5 @@
1
+ import { PaymentMethodIds } from './PaymentMethod';
2
+
1
3
  export const InpiCostType = {
2
4
  GREFFE: {
3
5
  id: 1,
@@ -29,12 +31,19 @@ export const InpiState = {
29
31
  };
30
32
 
31
33
  export const InpiPaymentType = {
32
- PACKAGE: {
33
- id: 1,
34
- label: 'Forfait',
35
- },
36
34
  PAYMENT_LINK: {
37
35
  id: 2,
36
+ idPaymentMethod: PaymentMethodIds.BANK_CARD,
38
37
  label: 'Lien de paiement',
39
38
  },
39
+ DIRECT_DEBIT: {
40
+ id: 3,
41
+ idPaymentMethod: PaymentMethodIds.DIRECT_DEBIT,
42
+ label: 'Prélèvement',
43
+ },
44
+ STRIPE_ECB: {
45
+ id: 4,
46
+ idPaymentMethod: PaymentMethodIds.STRIPE_ECB,
47
+ label: 'Stripe (ECB)',
48
+ },
40
49
  };
@@ -1199,4 +1199,10 @@ export const PhonePrefix = {
1199
1199
  text: '+508 (Saint-Pierre-et-Miquelon)',
1200
1200
  timezone: 'America/Miquelon',
1201
1201
  },
1202
+ POLYNESIEFRANCAISE: {
1203
+ id: 199,
1204
+ prefix: '+689',
1205
+ text: '+689 (Polynésie française)',
1206
+ timezone: 'Pacific/Tahiti',
1207
+ },
1202
1208
  };
@@ -190,6 +190,7 @@ export enum PrestationType {
190
190
  EI = 236,
191
191
  MICRO = 237,
192
192
  GESTION_IMMO = 238,
193
+ TERMINATION_FEES = 239,
193
194
  }
194
195
 
195
196
  // Liste des prestations avec une lettre de mission à signer
@@ -3869,4 +3870,23 @@ export const PrestationDetail: PrestationDetailEnum = {
3869
3870
  signaturePage: 7, //???
3870
3871
  point: 200, //???
3871
3872
  },
3873
+ TERMINATION_FEES: {
3874
+ id: PrestationType.TERMINATION_FEES,
3875
+ name: 'Frais de résiliation',
3876
+ isComptable: true,
3877
+ isJuridique: false,
3878
+ isSocial: false,
3879
+ isAttestation: false,
3880
+ inAverageCart: false,
3881
+ isBack: false,
3882
+ minimumPrice: null,
3883
+ price: null,
3884
+ isCatalog: true,
3885
+ isPlannable: false,
3886
+ hidden: false,
3887
+ isComplementary: false,
3888
+ signaturePosition: null,
3889
+ signaturePage: null,
3890
+ point: 0,
3891
+ },
3872
3892
  };
@@ -25,6 +25,7 @@ export enum ReasonTerminationType {
25
25
  ERROR_ON_PRESTATION = 24,
26
26
  LAB_REFUSED = 25,
27
27
  CHANGES_NEW_OFFERS = 26,
28
+ REJECTION_OF_THE_AMENDMENT = 27,
28
29
  }
29
30
 
30
31
  export const ReasonTerminationTypeDetail = [
@@ -105,7 +106,7 @@ export const ReasonTerminationTypeDetail = [
105
106
  },
106
107
  {
107
108
  id: ReasonTerminationType.ACTIVITY_CESSATION,
108
- label: 'Cessation d\'activité',
109
+ label: "Cessation d'activité",
109
110
  active: true,
110
111
  },
111
112
  {
@@ -140,7 +141,7 @@ export const ReasonTerminationTypeDetail = [
140
141
  },
141
142
  {
142
143
  id: ReasonTerminationType.NO_NEED_FOR_A_CERTIFIED_ACCOUNTANT,
143
- label: 'Plus besoin d\'un expert-comptable',
144
+ label: "Plus besoin d'un expert-comptable",
144
145
  active: true,
145
146
  },
146
147
  {
@@ -158,4 +159,9 @@ export const ReasonTerminationTypeDetail = [
158
159
  label: 'Changement pour nouvelles offres',
159
160
  active: true,
160
161
  },
162
+ {
163
+ id: ReasonTerminationType.REJECTION_OF_THE_AMENDMENT,
164
+ label: "Refus de l'avenant",
165
+ active: true,
166
+ },
161
167
  ];
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @deprecated use `RegistrationSourceAlias` enum instead and use `this.sourceService.findOrCreate` to get the source id in the database
3
- *
3
+ *
4
4
  */
5
5
  export enum RegistrationSource {
6
6
  INCOMING_CALL = 2,
@@ -116,7 +116,8 @@ export enum RegistrationSourceAlias {
116
116
  INCOMING_CALL = 'Incoming Call',
117
117
  CALENDLY_PROSPECT = 'Calendly Prospect',
118
118
  NEWSLETTER = 'newsletter',
119
- LIVRE_BLANC = 'livre blanc'
119
+ LIVRE_BLANC = 'livre blanc',
120
+ STATUS_ONLINE_CREATION = 'creation_status_online',
120
121
  }
121
122
 
122
123
  /**
@@ -0,0 +1,3 @@
1
+ export enum PurchasePriceType {
2
+ NEW_EXERCICE = 'newExercice'
3
+ }
@@ -1,3 +1,6 @@
1
1
  export interface ReadAccountingIncome {
2
2
  income: number;
3
+ defaultValues: {
4
+ otherAdditions: Array<{ label: string; amount: number }>;
5
+ };
3
6
  }
@@ -0,0 +1,305 @@
1
+ import { IsString, IsNumber, IsArray, ValidateNested, IsBoolean, IsIn, IsOptional, Min, Max } from 'class-validator';
2
+ import { ApiProperty } from '../../../../utils';
3
+
4
+ export class BankDedupRequest {
5
+ @ApiProperty()
6
+ @IsString()
7
+ csv: string; // CSV en string (avec header: label,dateValue,credit,debit)
8
+
9
+ @ApiProperty()
10
+ @IsNumber()
11
+ initial: number; // solde initial
12
+
13
+ @ApiProperty()
14
+ @IsNumber()
15
+ target: number; // solde cible
16
+ }
17
+
18
+ export class BankDedupAnalysisParams {
19
+ @ApiProperty()
20
+ csv: File;
21
+
22
+ @ApiProperty()
23
+ @IsNumber()
24
+ initial: number;
25
+
26
+ @ApiProperty()
27
+ @IsNumber()
28
+ target: number;
29
+ }
30
+
31
+ export class BankDedupFileUploadBody {
32
+ @ApiProperty()
33
+ @IsNumber()
34
+ initial: number; // solde initial
35
+
36
+ @ApiProperty()
37
+ @IsNumber()
38
+ target: number; // solde cible
39
+ }
40
+
41
+ export class BankTx {
42
+ @ApiProperty()
43
+ @IsString()
44
+ id: string; // id interne généré
45
+
46
+ @ApiProperty()
47
+ @IsString()
48
+ label: string;
49
+
50
+ @ApiProperty()
51
+ @IsString()
52
+ dateValue: string; // YYYY-MM-DD
53
+
54
+ @ApiProperty()
55
+ @IsNumber()
56
+ credit: number;
57
+
58
+ @ApiProperty()
59
+ @IsNumber()
60
+ debit: number;
61
+
62
+ @ApiProperty()
63
+ @IsIn([1, -1])
64
+ sign: 1 | -1; // 1 = crédit net, -1 = débit net
65
+
66
+ @ApiProperty()
67
+ @IsNumber()
68
+ @Min(0)
69
+ amount: number; // valeur absolue du mouvement (en positif)
70
+
71
+ @ApiProperty()
72
+ @IsNumber()
73
+ cents: number; // montant en centimes pour calculs exacts
74
+ }
75
+
76
+ export class DuplicateGroup {
77
+ @ApiProperty()
78
+ @IsString()
79
+ id: string;
80
+
81
+ @ApiProperty({ type: [BankTx] })
82
+ @IsArray()
83
+ @ValidateNested({ each: true })
84
+ transactions: BankTx[];
85
+
86
+ @ApiProperty()
87
+ @IsNumber()
88
+ amount: number; // montant commun
89
+
90
+ @ApiProperty()
91
+ @IsNumber()
92
+ cents: number; // montant en centimes
93
+
94
+ @ApiProperty()
95
+ @IsIn([1, -1])
96
+ sign: 1 | -1; // signe commun
97
+
98
+ @ApiProperty()
99
+ @IsNumber()
100
+ @Min(0)
101
+ @Max(1)
102
+ confidence: number; // score de confiance [0 - 1]
103
+
104
+ @ApiProperty()
105
+ @IsIn(['exact', 'fuzzy_high', 'fuzzy_medium', 'fuzzy_low'])
106
+ method: 'exact' | 'fuzzy_high' | 'fuzzy_medium' | 'fuzzy_low'; // méthode de détection
107
+ }
108
+
109
+ export class BankDedupRemovedTx {
110
+ @ApiProperty()
111
+ @IsString()
112
+ id: string;
113
+
114
+ @ApiProperty()
115
+ @IsBoolean()
116
+ isSelected: boolean;
117
+
118
+ @ApiProperty()
119
+ @IsOptional()
120
+ @IsNumber()
121
+ @Min(0)
122
+ @Max(1)
123
+ confidence?: number;
124
+
125
+ @ApiProperty()
126
+ @IsOptional()
127
+ @IsString()
128
+ method?: string;
129
+
130
+ @ApiProperty()
131
+ @IsOptional()
132
+ @IsNumber()
133
+ amount?: number;
134
+
135
+ @ApiProperty()
136
+ @IsOptional()
137
+ @IsNumber()
138
+ transactionCount?: number;
139
+
140
+ @ApiProperty()
141
+ @IsOptional()
142
+ @IsArray()
143
+ transactions?: {
144
+ id: string;
145
+ label: string;
146
+ dateValue: string;
147
+ isKept: boolean;
148
+ isCredit: boolean;
149
+ }[];
150
+ }
151
+
152
+ export class BankDedupResult {
153
+ @ApiProperty()
154
+ @IsBoolean()
155
+ success: true;
156
+
157
+ @ApiProperty()
158
+ @IsNumber()
159
+ initial: number;
160
+
161
+ @ApiProperty()
162
+ @IsNumber()
163
+ target: number;
164
+
165
+ @ApiProperty()
166
+ @IsNumber()
167
+ finalRaw: number;
168
+
169
+ @ApiProperty()
170
+ @IsNumber()
171
+ finalAfterDedup: number;
172
+
173
+ @ApiProperty()
174
+ @IsNumber()
175
+ diffBefore: number; // target - finalRaw
176
+
177
+ @ApiProperty()
178
+ @IsNumber()
179
+ diffAfter: number; // target - finalAfterDedup (DOIT être exactement 0, aucune tolérance)
180
+
181
+ @ApiProperty()
182
+ @IsArray()
183
+ @ValidateNested({ each: true })
184
+ removedTxs: BankDedupRemovedTx[];
185
+
186
+ @ApiProperty()
187
+ @IsNumber()
188
+ removedCount: number;
189
+
190
+ @ApiProperty()
191
+ @IsNumber()
192
+ keptCount: number;
193
+
194
+ @ApiProperty()
195
+ @IsString()
196
+ csvDeduped: string;
197
+
198
+ @ApiProperty()
199
+ @IsArray()
200
+ @ValidateNested({ each: true })
201
+ allGroups: BankDedupGroup[];
202
+
203
+ @ApiProperty()
204
+ debug: {
205
+ totalGroups: number;
206
+ selectedGroups: number;
207
+ iterations: number;
208
+ strategiesUsed: string[];
209
+ };
210
+ }
211
+
212
+ export class BankDedupGroup {
213
+ @ApiProperty()
214
+ @IsString()
215
+ id: string;
216
+
217
+ @ApiProperty()
218
+ @IsBoolean()
219
+ isSelected: boolean;
220
+
221
+ @ApiProperty()
222
+ @IsOptional()
223
+ @IsNumber()
224
+ @Min(0)
225
+ @Max(1)
226
+ confidence?: number;
227
+
228
+ @ApiProperty()
229
+ @IsOptional()
230
+ @IsString()
231
+ method?: string;
232
+
233
+ @ApiProperty()
234
+ @IsOptional()
235
+ @IsNumber()
236
+ amount?: number;
237
+
238
+ @ApiProperty()
239
+ @IsOptional()
240
+ @IsNumber()
241
+ transactionCount?: number;
242
+
243
+ @ApiProperty()
244
+ @IsOptional()
245
+ @IsArray()
246
+ transactions?: {
247
+ id: string;
248
+ label: string;
249
+ dateValue: string;
250
+ isKept: boolean;
251
+ isCredit: boolean;
252
+ }[];
253
+ }
254
+
255
+ export class BankDedupImpossible {
256
+ @ApiProperty()
257
+ @IsBoolean()
258
+ success: false;
259
+
260
+ @ApiProperty()
261
+ @IsIn(['NO_EXACT_COMBINATION', 'CSV_PARSE_ERROR', 'INVALID_INPUT', 'INSUFFICIENT_DUPLICATES'])
262
+ reason: 'NO_EXACT_COMBINATION' | 'CSV_PARSE_ERROR' | 'INVALID_INPUT' | 'INSUFFICIENT_DUPLICATES';
263
+
264
+ @ApiProperty()
265
+ @IsString()
266
+ message: string;
267
+
268
+ @ApiProperty()
269
+ @IsOptional()
270
+ @IsNumber()
271
+ initial?: number;
272
+
273
+ @ApiProperty()
274
+ @IsOptional()
275
+ @IsNumber()
276
+ target?: number;
277
+
278
+ @ApiProperty()
279
+ @IsOptional()
280
+ @IsNumber()
281
+ finalRaw?: number;
282
+
283
+ @ApiProperty()
284
+ @IsOptional()
285
+ @IsNumber()
286
+ diffBefore?: number;
287
+
288
+ @ApiProperty()
289
+ @IsOptional()
290
+ bestAttempt?: {
291
+ finalAfterDedup: number;
292
+ diffAfter: number;
293
+ removedCount: number;
294
+ };
295
+
296
+ @ApiProperty()
297
+ @IsOptional()
298
+ stats?: {
299
+ totalTx?: number;
300
+ totalGroups?: number;
301
+ strategiesTried?: string[];
302
+ };
303
+ }
304
+
305
+ export type BankDedupResponse = BankDedupResult | BankDedupImpossible;
@@ -82,6 +82,12 @@ export class CreateExercice {
82
82
  @ToBoolean()
83
83
  @IsOptional()
84
84
  isDefault?: boolean;
85
+
86
+ @ApiPropertyOptional({ description: 'Simulate exercise creation, return null if it is ok' })
87
+ @IsBoolean()
88
+ @ToBoolean()
89
+ @IsOptional()
90
+ isBlankMode?: boolean;
85
91
  }
86
92
 
87
93
  export class CreateProjectExercice {
@@ -0,0 +1,103 @@
1
+ import { IsDate, IsInt, IsNumber, IsString } from 'class-validator';
2
+ import { ApiProperty } from '../../../../utils';
3
+
4
+ export class QueryInpiPaymentCreate {
5
+ @ApiProperty({
6
+ description: 'list of selected cost type',
7
+ required: true,
8
+ type: String,
9
+ example: '[1,2]',
10
+ })
11
+ @IsString()
12
+ costType: string;
13
+
14
+ @ApiProperty({
15
+ description: 'file number',
16
+ required: true,
17
+ type: String,
18
+ example: '010234',
19
+ })
20
+ @IsString()
21
+ fileNumber: string;
22
+
23
+ @ApiProperty({
24
+ description: 'amount',
25
+ required: true,
26
+ type: Number,
27
+ example: 100.0,
28
+ })
29
+ @IsNumber()
30
+ amount: number;
31
+
32
+ @ApiProperty({
33
+ description: 'commission',
34
+ required: true,
35
+ type: Number,
36
+ example: 100.0,
37
+ })
38
+ @IsNumber()
39
+ commission: number;
40
+
41
+ @ApiProperty({
42
+ description: 'type',
43
+ required: true,
44
+ type: Number,
45
+ example: 1,
46
+ })
47
+ @IsInt()
48
+ type: number;
49
+
50
+ @ApiProperty({
51
+ description: 'state',
52
+ required: true,
53
+ type: Number,
54
+ example: 1,
55
+ })
56
+ @IsInt()
57
+ state: number;
58
+
59
+ @ApiProperty({
60
+ description: 'idSociety',
61
+ required: true,
62
+ type: Number,
63
+ example: 1,
64
+ })
65
+ @IsInt()
66
+ idSociety: number;
67
+
68
+ @ApiProperty({
69
+ description: 'idUserWhoCreated',
70
+ required: true,
71
+ type: Number,
72
+ example: 1,
73
+ })
74
+ @IsInt()
75
+ idUserWhoCreated: number;
76
+
77
+ @ApiProperty({
78
+ description: 'idExercice',
79
+ required: true,
80
+ type: Number,
81
+ example: 1,
82
+ })
83
+ @IsInt()
84
+ idExercice: number;
85
+
86
+ @ApiProperty({
87
+ description: 'idPrestationListRelated',
88
+ required: true,
89
+ type: Number,
90
+ example: 1,
91
+ })
92
+ @IsInt()
93
+ idPrestationListRelated: number;
94
+
95
+ @ApiProperty({
96
+ description: 'datePayment',
97
+ required: true,
98
+ type: Date,
99
+ example: new Date(),
100
+ })
101
+ @IsDate()
102
+ datePayment: Date;
103
+ }