@silexpert/core 1.1.121 → 1.1.123

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 (122) hide show
  1. package/es/api/resources/DocumentSection.d.ts +33 -0
  2. package/es/api/resources/DocumentSection.d.ts.map +1 -0
  3. package/es/api/resources/DocumentSection.js +38 -0
  4. package/es/api/resources/DocumentSection.js.map +1 -0
  5. package/es/api/resources/Library.d.ts +2 -1
  6. package/es/api/resources/Library.d.ts.map +1 -1
  7. package/es/api/resources/Library.js +3 -0
  8. package/es/api/resources/Library.js.map +1 -1
  9. package/es/api/resources/SocietyDetail.d.ts +7 -0
  10. package/es/api/resources/SocietyDetail.d.ts.map +1 -0
  11. package/es/api/resources/SocietyDetail.js +10 -0
  12. package/es/api/resources/SocietyDetail.js.map +1 -0
  13. package/es/api/resources/StatutsGeneration.d.ts +17 -0
  14. package/es/api/resources/StatutsGeneration.d.ts.map +1 -0
  15. package/es/api/resources/StatutsGeneration.js +20 -0
  16. package/es/api/resources/StatutsGeneration.js.map +1 -0
  17. package/es/api/resources.d.ts +6 -0
  18. package/es/api/resources.d.ts.map +1 -1
  19. package/es/api/resources.js +6 -0
  20. package/es/api/resources.js.map +1 -1
  21. package/es/types/Enum/BrandClementine.d.ts.map +1 -1
  22. package/es/types/Enum/BrandClementine.js +16 -2
  23. package/es/types/Enum/BrandClementine.js.map +1 -1
  24. package/es/types/Enum/BrandPourcentage.d.ts +2 -2
  25. package/es/types/Enum/BrandPourcentage.d.ts.map +1 -1
  26. package/es/types/Enum/BrandPourcentage.js +24 -37
  27. package/es/types/Enum/BrandPourcentage.js.map +1 -1
  28. package/es/types/Enum/MachineLearning.d.ts +1 -0
  29. package/es/types/Enum/MachineLearning.d.ts.map +1 -1
  30. package/es/types/Enum/MachineLearning.js +1 -0
  31. package/es/types/Enum/MachineLearning.js.map +1 -1
  32. package/es/types/Enum/StatutsSection.d.ts +90 -0
  33. package/es/types/Enum/StatutsSection.d.ts.map +1 -0
  34. package/es/types/Enum/StatutsSection.js +449 -0
  35. package/es/types/Enum/StatutsSection.js.map +1 -0
  36. package/es/types/Interface/api/balanceSheet/Read.d.ts +3 -0
  37. package/es/types/Interface/api/balanceSheet/Read.d.ts.map +1 -1
  38. package/es/types/Interface/api/balanceSheet/Read.js.map +1 -1
  39. package/es/types/Interface/api/balanceSheet/UpdateBalanceSheet.d.ts +1 -0
  40. package/es/types/Interface/api/balanceSheet/UpdateBalanceSheet.d.ts.map +1 -1
  41. package/es/types/Interface/api/balanceSheet/UpdateBalanceSheet.js +6 -0
  42. package/es/types/Interface/api/balanceSheet/UpdateBalanceSheet.js.map +1 -1
  43. package/es/types/Interface/api/documentSection/Update.d.ts +8 -0
  44. package/es/types/Interface/api/documentSection/Update.d.ts.map +1 -0
  45. package/es/types/Interface/api/{society/CreateSocietyDetail.js → documentSection/Update.js} +21 -9
  46. package/es/types/Interface/api/documentSection/Update.js.map +1 -0
  47. package/es/types/Interface/api/library/QueryLibrary.d.ts +5 -0
  48. package/es/types/Interface/api/library/QueryLibrary.d.ts.map +1 -1
  49. package/es/types/Interface/api/library/QueryLibrary.js +22 -2
  50. package/es/types/Interface/api/library/QueryLibrary.js.map +1 -1
  51. package/es/types/Interface/api/society/GetSocietyDetail.d.ts +4 -0
  52. package/es/types/Interface/api/society/GetSocietyDetail.d.ts.map +1 -0
  53. package/es/types/Interface/api/society/GetSocietyDetail.js +20 -0
  54. package/es/types/Interface/api/society/GetSocietyDetail.js.map +1 -0
  55. package/es/types/Interface/api/statutsGeneration/IntentToPayPrestationParams.d.ts +9 -0
  56. package/es/types/Interface/api/statutsGeneration/IntentToPayPrestationParams.d.ts.map +1 -0
  57. package/es/types/Interface/api/statutsGeneration/IntentToPayPrestationParams.js +35 -0
  58. package/es/types/Interface/api/statutsGeneration/IntentToPayPrestationParams.js.map +1 -0
  59. package/es/types/Interface/models/IDocumentSection.d.ts +13 -0
  60. package/es/types/Interface/models/IDocumentSection.d.ts.map +1 -0
  61. package/es/types/Interface/models/IDocumentSection.js +2 -0
  62. package/es/types/Interface/models/IDocumentSection.js.map +1 -0
  63. package/es/types/index.d.ts +5 -1
  64. package/es/types/index.d.ts.map +1 -1
  65. package/es/types/index.js +5 -1
  66. package/es/types/index.js.map +1 -1
  67. package/js/api/resources/DocumentSection.js +45 -0
  68. package/js/api/resources/DocumentSection.js.map +1 -0
  69. package/js/api/resources/Library.js +10 -0
  70. package/js/api/resources/Library.js.map +1 -1
  71. package/js/api/resources/SocietyDetail.js +21 -0
  72. package/js/api/resources/SocietyDetail.js.map +1 -0
  73. package/js/api/resources/StatutsGeneration.js +27 -0
  74. package/js/api/resources/StatutsGeneration.js.map +1 -0
  75. package/js/api/resources.js +6 -0
  76. package/js/api/resources.js.map +1 -1
  77. package/js/types/Enum/BrandClementine.js +14 -2
  78. package/js/types/Enum/BrandClementine.js.map +1 -1
  79. package/js/types/Enum/BrandPourcentage.js +26 -39
  80. package/js/types/Enum/BrandPourcentage.js.map +1 -1
  81. package/js/types/Enum/MachineLearning.js +1 -0
  82. package/js/types/Enum/MachineLearning.js.map +1 -1
  83. package/js/types/Enum/StatutsSection.js +382 -0
  84. package/js/types/Enum/StatutsSection.js.map +1 -0
  85. package/js/types/Interface/api/balanceSheet/Read.js.map +1 -1
  86. package/js/types/Interface/api/balanceSheet/UpdateBalanceSheet.js +1 -0
  87. package/js/types/Interface/api/balanceSheet/UpdateBalanceSheet.js.map +1 -1
  88. package/js/types/Interface/api/documentSection/Update.js +26 -0
  89. package/js/types/Interface/api/documentSection/Update.js.map +1 -0
  90. package/js/types/Interface/api/library/QueryLibrary.js +11 -2
  91. package/js/types/Interface/api/library/QueryLibrary.js.map +1 -1
  92. package/js/types/Interface/api/society/{CreateSocietyDetail.js → GetSocietyDetail.js} +7 -7
  93. package/js/types/Interface/api/society/GetSocietyDetail.js.map +1 -0
  94. package/js/types/Interface/api/statutsGeneration/IntentToPayPrestationParams.js +25 -0
  95. package/js/types/Interface/api/statutsGeneration/IntentToPayPrestationParams.js.map +1 -0
  96. package/js/types/Interface/models/IDocumentSection.js +6 -0
  97. package/js/types/Interface/models/IDocumentSection.js.map +1 -0
  98. package/js/types/index.js +52 -12
  99. package/js/types/index.js.map +1 -1
  100. package/package.json +1 -1
  101. package/ts/api/resources/DocumentSection.ts +44 -0
  102. package/ts/api/resources/Library.ts +5 -1
  103. package/ts/api/resources/SocietyDetail.ts +15 -0
  104. package/ts/api/resources/StatutsGeneration.ts +23 -0
  105. package/ts/api/resources.ts +6 -0
  106. package/ts/types/Enum/BrandClementine.ts +16 -2
  107. package/ts/types/Enum/BrandPourcentage.ts +24 -37
  108. package/ts/types/Enum/MachineLearning.ts +2 -1
  109. package/ts/types/Enum/StatutsSection.ts +459 -0
  110. package/ts/types/Interface/api/balanceSheet/Read.ts +2 -1
  111. package/ts/types/Interface/api/balanceSheet/UpdateBalanceSheet.ts +5 -0
  112. package/ts/types/Interface/api/documentSection/Update.ts +31 -0
  113. package/ts/types/Interface/api/library/QueryLibrary.ts +18 -3
  114. package/ts/types/Interface/api/society/GetSocietyDetail.ts +9 -0
  115. package/ts/types/Interface/api/statutsGeneration/IntentToPayPrestationParams.ts +23 -0
  116. package/ts/types/Interface/models/IDocumentSection.ts +15 -0
  117. package/ts/types/index.ts +5 -1
  118. package/es/types/Interface/api/society/CreateSocietyDetail.d.ts +0 -6
  119. package/es/types/Interface/api/society/CreateSocietyDetail.d.ts.map +0 -1
  120. package/es/types/Interface/api/society/CreateSocietyDetail.js.map +0 -1
  121. package/js/types/Interface/api/society/CreateSocietyDetail.js.map +0 -1
  122. package/ts/types/Interface/api/society/CreateSocietyDetail.ts +0 -19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "1.1.121",
3
+ "version": "1.1.123",
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,44 @@
1
+ import { Resource } from '../Resource';
2
+ import {
3
+ IDocumentSection, UpdateDocumentSection,
4
+ } from '../../types';
5
+
6
+ export class DocumentSection extends Resource {
7
+ /**
8
+ * Fetch all document sections according to conditions
9
+ * @param { idSociety } idSociety
10
+ * @returns { IDocumentSection[] }
11
+ */
12
+ public getAllForSociety(idSociety: number): Promise<IDocumentSection[]> {
13
+ return this.axios.$get(`/societies/${idSociety}/documents-sections`);
14
+ }
15
+
16
+ /**
17
+ * Fetch a document section
18
+ * @param { number } id
19
+ * @returns { IDocumentSection }
20
+ */
21
+ public get(id: number): Promise<IDocumentSection> {
22
+ return this.axios.$get(`/documents-sections/${id}`);
23
+ }
24
+
25
+ /**
26
+ * Update a document section
27
+ * @param id identifier of element to update
28
+ * @param payload elements to update
29
+ * @returns an interface of DocumentSection
30
+ */
31
+ public update(id: number, payload: UpdateDocumentSection): Promise<{ data: IDocumentSection }> {
32
+ return this.axios.patch(`/documents-sections/${id}`, payload);
33
+ }
34
+
35
+ /**
36
+ * Create a document section
37
+ * @param id identifier of element to update
38
+ * @param payload elements to create
39
+ * @returns an interface of DocumentSection
40
+ */
41
+ public create(payload: IDocumentSection): Promise<IDocumentSection> {
42
+ return this.axios.$post('/documents-sections', payload);
43
+ }
44
+ }
@@ -1,6 +1,6 @@
1
1
  import { Resource } from '../Resource';
2
2
  import {
3
- QueryLibraryFile, UpdateOrCreateGedFile, IGedFile, QueryDownloadFile, UpdateGedFile, QueryLibrarySociety, BasePaginate, ReadSocietyLibrary,
3
+ QueryLibraryFile, UpdateOrCreateGedFile, IGedFile, QueryDownloadFile, UpdateGedFile, QueryLastFileOfType, QueryLibrarySociety, BasePaginate, ReadSocietyLibrary,
4
4
  } from '../../types';
5
5
 
6
6
  export class Library extends Resource {
@@ -12,6 +12,10 @@ export class Library extends Resource {
12
12
  return this.axios.$get('/library/file', { params });
13
13
  }
14
14
 
15
+ getLastFileOfType(params: QueryLastFileOfType): Promise<IGedFile | null> {
16
+ return this.axios.$get('/library/files-for-library', { params: { ...params, page: 1, limit: 1, attributes: ['createdAt'], include: ['user', 'fileFromGed'] } });
17
+ }
18
+
15
19
  getAll(params: QueryLibraryFile): Promise<IGedFile[]> {
16
20
  return this.axios.$get('/library/files', { params });
17
21
  }
@@ -0,0 +1,15 @@
1
+ import {
2
+ GetSocietyDetail,
3
+ ISocietyDetail,
4
+ } from '../../types';
5
+ import { Resource } from '../Resource';
6
+
7
+ export class SocietyDetail extends Resource {
8
+ get(id: number, params: GetSocietyDetail): Promise<ISocietyDetail> {
9
+ return this.axios.$get(`/societies/${id}/details`, { params });
10
+ }
11
+
12
+ updateOrCreate(idSociety: number, params: ISocietyDetail): Promise<ISocietyDetail> {
13
+ return this.axios.$post(`/societies/${idSociety}/details`, { params });
14
+ }
15
+ }
@@ -0,0 +1,23 @@
1
+ import { Resource } from '../Resource';
2
+ import {
3
+ ReadLibraryFile,
4
+ } from '../../types';
5
+
6
+ export class StatutsGeneration extends Resource {
7
+ /**
8
+ * Preview statuts in html for given society
9
+ * @param idSociety
10
+ * @returns { string }
11
+ */
12
+ public preview(idSociety: number): Promise<string> {
13
+ return this.axios.$post(`/statuts-generation/${idSociety}/preview`);
14
+ }
15
+ /**
16
+ * Regenerate statuts file for given society, from documents sections
17
+ * @param idSociety
18
+ * @returns { ReadLibraryFile }
19
+ */
20
+ public regenerate(idSociety: number): Promise<ReadLibraryFile> {
21
+ return this.axios.$post(`/statuts-generation/${idSociety}/regenerate-pdf`);
22
+ }
23
+ }
@@ -97,6 +97,7 @@ import { Recurrence } from './resources/Recurrence';
97
97
  import { Stripe } from './resources/Stripe';
98
98
  import { File } from './resources/FIle';
99
99
  import { SocietyConfig } from './resources/SocietyConfig';
100
+ import { SocietyDetail } from './resources/SocietyDetail';
100
101
  import { LegalNotice } from './resources/LegalNotice';
101
102
  import { StatisticAccountant } from './resources/statistic/Accountant';
102
103
  import { StatisticExpertAccountant } from './resources/statistic/ExpertAccountant';
@@ -109,6 +110,8 @@ import { Sources } from './resources/Sources';
109
110
  import { Commercial } from './resources/Commercial';
110
111
  import { Facturation } from './resources/Facturation';
111
112
  import { Inpi } from './resources/Inpi';
113
+ import { DocumentSection } from './resources/DocumentSection';
114
+ import { StatutsGeneration } from './resources/StatutsGeneration';
112
115
  import { Prestation } from './resources/prestation';
113
116
  import { TextMessage } from './resources/TextMessage';
114
117
  import { SocietyConfigBalanceSheet } from './resources/SocietyConfigBalanceSheet';
@@ -237,6 +240,7 @@ export const resources = {
237
240
  file: File,
238
241
  wallet: Wallet,
239
242
  societyConfig: SocietyConfig,
243
+ societyDetail: SocietyDetail,
240
244
  legalNotice: LegalNotice,
241
245
  statisticAccountant: StatisticAccountant,
242
246
  statisticDirection: StatisticDirection,
@@ -246,6 +250,8 @@ export const resources = {
246
250
  terminationList: TerminationList,
247
251
  slowDetection: SlowDetection,
248
252
  inpi: Inpi,
253
+ documentSection: DocumentSection,
254
+ statutsGeneration: StatutsGeneration,
249
255
  prestation: Prestation,
250
256
  vatRegimeHistory: VatRegimeHistory,
251
257
  sources: Sources,
@@ -214,6 +214,20 @@ export const BrandClementine = [
214
214
  versionable: true,
215
215
  keyName: 'idPrestationCreation',
216
216
  },
217
+ {
218
+ label: 'Forfait création Entreprise + accompagnement comptable',
219
+ name: 'bloc_creation_enterprise_accompagnement',
220
+ idPrestationType: [],
221
+ needBgImage: false,
222
+ versionable: true,
223
+ },
224
+ {
225
+ label: 'Forfait création Entreprise + bilan prévisionnel',
226
+ name: 'bloc_creation_enterprise_bilan_previsionnel',
227
+ idPrestationType: [],
228
+ needBgImage: false,
229
+ versionable: true,
230
+ },
217
231
  {
218
232
  label: 'Forfait approbation des comptes annuels',
219
233
  name: 'bloc_annual_accounts',
@@ -223,7 +237,7 @@ export const BrandClementine = [
223
237
  keyName: 'idPrestationJuridique',
224
238
  },
225
239
  {
226
- label: 'Prise en charge de votre déclaration d\'impôts sur le revenu 249€ HT/an',
240
+ label: 'Prise en charge de votre déclaration d\'impôts sur le revenu',
227
241
  name: 'bloc_tax_return',
228
242
  needBgImage: false,
229
243
  idPrestationType: allPrestationsWithBrochure,
@@ -231,7 +245,7 @@ export const BrandClementine = [
231
245
  keyName: 'idPrestationSocial',
232
246
  },
233
247
  {
234
- label: 'Accompagnement contrôle fiscal à 149€ HT/ exercice',
248
+ label: 'Accompagnement contrôle fiscal',
235
249
  name: 'bloc_tax_audit',
236
250
  needBgImage: false,
237
251
  idPrestationType: allPrestationsWithBrochure,
@@ -151,48 +151,33 @@ export const BrandPourcentage = [
151
151
  versionable: false,
152
152
  idPrestationType: Object.values(PrestationDetail).filter(p => p.isBack && !p.hidden && allPrestationsWithBrochure.includes(p.id!)).map(({ id }) => id), // Prestations express
153
153
  },
154
- // pour les pages dynamiques
155
154
  {
156
- label: 'Compta Pro',
157
- name: 'bloc_compta_pro',
155
+ label: 'Compta Pourcentage',
156
+ name: 'bloc_compta_pourcentage',
158
157
  needBgImage: false,
159
- versionable: true,
160
- idPrestationType: [PrestationType.COMPTA_PRO, PrestationType.COMPTA_PRO_EXPRESS],
161
- keyName: 'isWithApplicationFees',
162
- },
163
- {
164
- label: 'Compta Entreprise',
165
- name: 'bloc_compta_entreprise',
166
- needBgImage: false,
167
- versionable: true,
168
- keyName: 'isWithApplicationFees',
169
- idPrestationType: [PrestationType.COMPTA_ENTREPRISE, PrestationType.COMPTA_ENTREPRISE_EXPRESS, PrestationType.COMPTA_STARTER_ENTREPRISE],
170
- condition: (turnover: number): boolean => turnover < 900000,
158
+ versionable: false,
159
+ idPrestationType: [],
171
160
  },
172
161
  {
173
- label: 'Compta Entreprise sur mesure',
174
- name: 'bloc_compta_entreprise_sm',
162
+ label: 'Compta Pourcentage sur mesure',
163
+ name: 'bloc_compta_pourcentage_sur_mesure',
175
164
  needBgImage: false,
176
- versionable: true,
177
- keyName: 'isWithApplicationFees',
178
- idPrestationType: [PrestationType.COMPTA_ENTREPRISE, PrestationType.COMPTA_ENTREPRISE_EXPRESS, PrestationType.COMPTA_STARTER_ENTREPRISE],
179
- condition: (turnover: number): boolean => turnover >= 900000,
165
+ versionable: false,
166
+ idPrestationType: [PrestationType.COMPTA_POURCENTAGE, PrestationType.COMPTA_POURCENTAGE_EXPRESS],
180
167
  },
181
168
  {
182
- label: 'Compta Micro',
183
- name: 'bloc_compta_micro',
169
+ label: 'Compta Pourcentage Premium',
170
+ name: 'bloc_compta_pourcentage_premium',
184
171
  needBgImage: false,
185
- versionable: true,
186
- idPrestationType: [PrestationType.COMPTA_MICRO, PrestationType.COMPTA_MICRO_EXPRESS],
187
- keyName: 'isWithApplicationFees',
172
+ versionable: false,
173
+ idPrestationType: [],
188
174
  },
189
175
  {
190
- label: 'Compta SCI',
191
- name: 'bloc_compta_sci',
176
+ label: 'Compta Pourcentage Premium sur mesure',
177
+ name: 'bloc_compta_pourcentage_premium_sur_mesure',
192
178
  needBgImage: false,
193
- versionable: true,
194
- idPrestationType: [PrestationType.COMPTA_SCI, PrestationType.COMPTA_SCI_EXPRESS],
195
- keyName: 'isWithApplicationFees',
179
+ versionable: false,
180
+ idPrestationType: [PrestationType.COMPTA_POURCENTAGE_PREMIUM, PrestationType.COMPTA_POURCENTAGE_PREMIUM_EXPRESS],
196
181
  },
197
182
  {
198
183
  label: 'Forfait social',
@@ -205,18 +190,20 @@ export const BrandPourcentage = [
205
190
  {
206
191
  label: 'Forfait création société',
207
192
  name: 'bloc_creation',
208
- idPrestationType: allPrestationsWithBrochure.filter(p => p !== PrestationType.COMPTA_MICRO_EXPRESS && p !== PrestationType.COMPTA_MICRO),
193
+ idPrestationType: allPrestationsWithBrochure,
209
194
  needBgImage: false,
210
195
  versionable: true,
211
196
  keyName: 'idPrestationCreation',
197
+ condition: (price: number): boolean => price === 500,
212
198
  },
213
199
  {
214
- label: 'Forfait création société (Création d\'entreprise gratuite)',
215
- name: 'bloc_creation_free',
216
- idPrestationType: [PrestationType.COMPTA_MICRO, PrestationType.COMPTA_MICRO_EXPRESS],
200
+ label: 'Forfait création société premium',
201
+ name: 'bloc_creation_premium',
202
+ idPrestationType: allPrestationsWithBrochure,
217
203
  needBgImage: false,
218
204
  versionable: true,
219
205
  keyName: 'idPrestationCreation',
206
+ condition: (price: number): boolean => price === 1000,
220
207
  },
221
208
  {
222
209
  label: 'Forfait approbation des comptes annuels',
@@ -227,7 +214,7 @@ export const BrandPourcentage = [
227
214
  keyName: 'idPrestationJuridique',
228
215
  },
229
216
  {
230
- label: 'Prise en charge de votre déclaration d\'impôts sur le revenu 249€ HT/an',
217
+ label: 'Prise en charge de votre déclaration d\'impôts sur le revenu',
231
218
  name: 'bloc_tax_return',
232
219
  needBgImage: false,
233
220
  idPrestationType: allPrestationsWithBrochure,
@@ -235,7 +222,7 @@ export const BrandPourcentage = [
235
222
  keyName: 'idPrestationSocial',
236
223
  },
237
224
  {
238
- label: 'Accompagnement contrôle fiscal à 149€ HT/ exercice',
225
+ label: 'Accompagnement contrôle fiscal',
239
226
  name: 'bloc_tax_audit',
240
227
  needBgImage: false,
241
228
  idPrestationType: allPrestationsWithBrochure,
@@ -1 +1,2 @@
1
- export const MINIMUM_TO_ANNOTATE = 75;
1
+ export const MINIMUM_TO_ANNOTATE = 75;
2
+ export const MINIMUM_TO_FORCE_ANNOTATE = 51;