@silexpert/core 1.1.148 → 1.1.149

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 (62) hide show
  1. package/dist/cjs/api/resources/Revision.d.ts +10 -1
  2. package/dist/cjs/api/resources/Revision.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/Revision.js +29 -0
  4. package/dist/cjs/api/resources/Revision.js.map +1 -1
  5. package/dist/cjs/types/Enum/Cycle.d.ts +19 -0
  6. package/dist/cjs/types/Enum/Cycle.d.ts.map +1 -0
  7. package/dist/cjs/types/Enum/Cycle.js +23 -0
  8. package/dist/cjs/types/Enum/Cycle.js.map +1 -0
  9. package/dist/cjs/types/Interface/api/revision/Create.d.ts +22 -0
  10. package/dist/cjs/types/Interface/api/revision/Create.d.ts.map +1 -1
  11. package/dist/cjs/types/Interface/api/revision/Create.js +94 -1
  12. package/dist/cjs/types/Interface/api/revision/Create.js.map +1 -1
  13. package/dist/cjs/types/Interface/api/revision/Query.d.ts +15 -0
  14. package/dist/cjs/types/Interface/api/revision/Query.d.ts.map +1 -1
  15. package/dist/cjs/types/Interface/api/revision/Query.js +57 -1
  16. package/dist/cjs/types/Interface/api/revision/Query.js.map +1 -1
  17. package/dist/cjs/types/Interface/models/ISupervision.d.ts +7 -3
  18. package/dist/cjs/types/Interface/models/ISupervision.d.ts.map +1 -1
  19. package/dist/cjs/types/Interface/models/ISupervision.js.map +1 -1
  20. package/dist/cjs/types/Interface/models/ISupervisionPersonalAccountantNote.d.ts +14 -0
  21. package/dist/cjs/types/Interface/models/ISupervisionPersonalAccountantNote.d.ts.map +1 -0
  22. package/dist/cjs/types/Interface/models/ISupervisionPersonalAccountantNote.js +3 -0
  23. package/dist/cjs/types/Interface/models/ISupervisionPersonalAccountantNote.js.map +1 -0
  24. package/dist/cjs/types/index.d.ts +2 -0
  25. package/dist/cjs/types/index.d.ts.map +1 -1
  26. package/dist/cjs/types/index.js +2 -0
  27. package/dist/cjs/types/index.js.map +1 -1
  28. package/dist/mjs/api/resources/Revision.d.ts +10 -1
  29. package/dist/mjs/api/resources/Revision.d.ts.map +1 -1
  30. package/dist/mjs/api/resources/Revision.js +29 -0
  31. package/dist/mjs/api/resources/Revision.js.map +1 -1
  32. package/dist/mjs/types/Enum/Cycle.d.ts +19 -0
  33. package/dist/mjs/types/Enum/Cycle.d.ts.map +1 -0
  34. package/dist/mjs/types/Enum/Cycle.js +20 -0
  35. package/dist/mjs/types/Enum/Cycle.js.map +1 -0
  36. package/dist/mjs/types/Interface/api/revision/Create.d.ts +22 -0
  37. package/dist/mjs/types/Interface/api/revision/Create.d.ts.map +1 -1
  38. package/dist/mjs/types/Interface/api/revision/Create.js +106 -0
  39. package/dist/mjs/types/Interface/api/revision/Create.js.map +1 -1
  40. package/dist/mjs/types/Interface/api/revision/Query.d.ts +15 -0
  41. package/dist/mjs/types/Interface/api/revision/Query.d.ts.map +1 -1
  42. package/dist/mjs/types/Interface/api/revision/Query.js +62 -0
  43. package/dist/mjs/types/Interface/api/revision/Query.js.map +1 -1
  44. package/dist/mjs/types/Interface/models/ISupervision.d.ts +7 -3
  45. package/dist/mjs/types/Interface/models/ISupervision.d.ts.map +1 -1
  46. package/dist/mjs/types/Interface/models/ISupervision.js.map +1 -1
  47. package/dist/mjs/types/Interface/models/ISupervisionPersonalAccountantNote.d.ts +14 -0
  48. package/dist/mjs/types/Interface/models/ISupervisionPersonalAccountantNote.d.ts.map +1 -0
  49. package/dist/mjs/types/Interface/models/ISupervisionPersonalAccountantNote.js +2 -0
  50. package/dist/mjs/types/Interface/models/ISupervisionPersonalAccountantNote.js.map +1 -0
  51. package/dist/mjs/types/index.d.ts +2 -0
  52. package/dist/mjs/types/index.d.ts.map +1 -1
  53. package/dist/mjs/types/index.js +2 -0
  54. package/dist/mjs/types/index.js.map +1 -1
  55. package/package.json +1 -1
  56. package/ts/api/resources/Revision.ts +38 -1
  57. package/ts/types/Enum/Cycle.ts +18 -0
  58. package/ts/types/Interface/api/revision/Create.ts +74 -0
  59. package/ts/types/Interface/api/revision/Query.ts +46 -0
  60. package/ts/types/Interface/models/ISupervision.ts +7 -3
  61. package/ts/types/Interface/models/ISupervisionPersonalAccountantNote.ts +16 -0
  62. package/ts/types/index.ts +2 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "1.1.148",
3
+ "version": "1.1.149",
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",
@@ -8,7 +8,7 @@ import {
8
8
  QueryRevisionPaginate,
9
9
  IAccountingTransaction,
10
10
  QueryRevisionApprobation,
11
- QueryRevisionAccountComment, IAccountDetail, ICycle, QueryRevisionPendingPoint, ISupervisionPendingPoint, QueryRevisionGenericPendingPoint, CreateOrUpdateState, ISupervisionPendingPointReply, CreateReply,
11
+ QueryRevisionAccountComment, IAccountDetail, ICycle, QueryRevisionPendingPoint, ISupervisionPendingPoint, QueryRevisionGenericPendingPoint, CreateOrUpdateState, ISupervisionPendingPointReply, CreateReply, CreatePersonalNote, ISupervisionPersonalAccountantNote, UpdatePersonalNote, GetPersonalNoteForPeriod, ISupervision, QuerySupervision, CreateSupervisionNoteFile, GetNote, IGedFile,
12
12
  } from '../..';
13
13
 
14
14
  export class Revision extends Resource {
@@ -71,4 +71,41 @@ export class Revision extends Resource {
71
71
  deleteReply(id: number): Promise<boolean> {
72
72
  return this.axios.$delete(`supervisions/pending-points/reply/${id}`);
73
73
  }
74
+
75
+ getSupervision(params: QuerySupervision): Promise<ISupervision> {
76
+ return this.axios.$get('supervisions', { params });
77
+ }
78
+
79
+ createPersonalNote(params: CreatePersonalNote): Promise<ISupervisionPersonalAccountantNote> {
80
+ return this.axios.$post('supervisions/personal-notes', params);
81
+ }
82
+
83
+ getPersonalNotes(params: GetPersonalNoteForPeriod): Promise<ISupervisionPersonalAccountantNote[]> {
84
+ return this.axios.$get('supervisions/personal-notes', { params });
85
+ }
86
+
87
+ updatePersonalNote(idNote: number, params: UpdatePersonalNote): Promise<ISupervisionPersonalAccountantNote> {
88
+ return this.axios.$put(`supervisions/notes/${idNote}`, params);
89
+ }
90
+
91
+ deletePersonalNote(idNote: number):Promise<boolean> {
92
+ return this.axios.$delete(`supervisions/notes/${idNote}`);
93
+ }
94
+
95
+ createNote(id: number, payload: CreateSupervisionNoteFile): Promise<Buffer> {
96
+ return this.axios.$post(`supervisions/${id}/notes/pdf`, payload, {
97
+ responseType: 'arraybuffer',
98
+ headers: {
99
+ Accept: 'application/pdf',
100
+ },
101
+ });
102
+ }
103
+
104
+ getNote(params: GetNote): Promise<IGedFile> {
105
+ return this.axios.$get('supervisions/notes', { params });
106
+ }
107
+
108
+ deleteNote(id: number): Promise<boolean> {
109
+ return this.axios.$delete(`supervisions/notes/${id}`);
110
+ }
74
111
  }
@@ -0,0 +1,18 @@
1
+ export enum Cycle {
2
+ JURIDIQUE = 1,
3
+ CAPITAUX_PROPRE = 2,
4
+ REGULARITE_FORMELLE = 3,
5
+ TRESORERIE = 4,
6
+ VENTE_CLIENT = 5,
7
+ STOCK = 6,
8
+ IMMOBILISATION = 7,
9
+ ACHAT_FOURNISSEUR = 8,
10
+ CHARGE_EXTERNE = 9,
11
+ PERSONNEL = 10,
12
+ ETAT = 11,
13
+ AUTRE_COMPTE = 12,
14
+ ANNEXE_COVID = 13,
15
+ AUTRE_TRAVAUX = 14,
16
+ AUTRE = 15,
17
+ CONCLUSION_GENERALE = 16,
18
+ }
@@ -103,3 +103,77 @@ export class CreateReply {
103
103
  @IsNumber()
104
104
  idUser: number;
105
105
  }
106
+
107
+ export class CreatePersonalNote {
108
+ @ApiProperty()
109
+ @IsNumber()
110
+ idSociety: number;
111
+
112
+ @ApiProperty()
113
+ @IsNumber()
114
+ idUser: number;
115
+
116
+ @ApiProperty()
117
+ @IsDate()
118
+ startDate: Date;
119
+
120
+ @ApiProperty()
121
+ @IsDate()
122
+ endDate: Date;
123
+
124
+ @ApiProperty()
125
+ @IsNumber()
126
+ idCycle: number;
127
+
128
+ @ApiProperty()
129
+ @IsString()
130
+ note: string;
131
+ }
132
+
133
+ export class UpdatePersonalNote {
134
+ @ApiProperty()
135
+ @IsString()
136
+ note: string;
137
+ }
138
+
139
+ export class CreateSupervisionNoteFile {
140
+ @ApiProperty()
141
+ @IsBoolean()
142
+ @ToBoolean()
143
+ isBalanceSheetNote: boolean;
144
+
145
+ @ApiProperty()
146
+ @IsNumber()
147
+ idSociety: number;
148
+
149
+ @ApiProperty()
150
+ @IsNumber()
151
+ idExercice: number;
152
+
153
+ @ApiPropertyOptional()
154
+ @IsString()
155
+ @IsOptional()
156
+ societyName?: string;
157
+
158
+ @ApiProperty()
159
+ @IsNumber()
160
+ idLegalForm: number;
161
+
162
+ @ApiPropertyOptional()
163
+ @IsString()
164
+ @IsOptional()
165
+ freeText?: string;
166
+
167
+ @ApiPropertyOptional()
168
+ @IsNumber()
169
+ @IsOptional()
170
+ freeTextUserId?: number;
171
+
172
+ @ApiProperty()
173
+ @IsDate()
174
+ endDate: Date;
175
+
176
+ @ApiProperty()
177
+ @IsDate()
178
+ startDate: Date;
179
+ }
@@ -278,6 +278,12 @@ export class QueryRevisionSearchEntries {
278
278
  page?: number = 1;
279
279
  }
280
280
 
281
+ export class QuerySupervision {
282
+ @ApiProperty()
283
+ @IsNumber()
284
+ idBalanceSheet: number;
285
+ }
286
+
281
287
  export class QueryRevisionGenericPendingPoint {
282
288
  // Mandatory
283
289
  @ApiProperty()
@@ -299,3 +305,43 @@ export class QueryRevisionPendingPoint {
299
305
  @IsDate()
300
306
  endDate: Date;
301
307
  }
308
+
309
+ export class GetPersonalNoteForPeriod {
310
+ @ApiProperty()
311
+ @IsNumber()
312
+ idSociety: number;
313
+
314
+ @ApiPropertyOptional()
315
+ @IsNumber()
316
+ @IsOptional()
317
+ idUser?: number;
318
+
319
+ @ApiProperty()
320
+ @IsDate()
321
+ startDate: Date;
322
+
323
+ @ApiProperty()
324
+ @IsDate()
325
+ endDate: Date;
326
+
327
+ @ApiPropertyOptional()
328
+ @IsNumber()
329
+ @IsOptional()
330
+ idCycle?: number;
331
+ }
332
+
333
+ export class GetNote {
334
+ @ApiProperty()
335
+ @IsNumber()
336
+ idSociety: number;
337
+
338
+ @ApiProperty()
339
+ @IsNumber()
340
+ idExercice: number;
341
+
342
+ @ApiProperty()
343
+ @IsNumber()
344
+ gedFileType: number;
345
+ }
346
+
347
+
@@ -1,9 +1,9 @@
1
- import { IExercice } from './IExercice';
2
- import { IUser } from './IUser';
3
1
  import { IBalanceSheet } from './IBalanceSheet';
2
+ import { IExercice } from './IExercice';
4
3
  import { IFile } from './IFile';
5
- import { IPendingPoint } from './IPendingPoint';
6
4
  import { ILetter } from './ILetter';
5
+ import { IPendingPoint } from './IPendingPoint';
6
+ import { IUser } from './IUser';
7
7
 
8
8
  // supervisions
9
9
  export interface ISupervision {
@@ -20,6 +20,9 @@ export interface ISupervision {
20
20
  idFile: number | null;
21
21
  idLetter: number | null;
22
22
  checkDateRecommandation: Date | null;
23
+ freeText: string | null;
24
+ freeTextDate: Date | null;
25
+ freeTextUserId: number | null;
23
26
  idBalanceSheet: number | null;
24
27
  createdAt?: Date | null;
25
28
  updatedAt?: Date | null;
@@ -29,6 +32,7 @@ export interface ISupervision {
29
32
  supervisionUsers: IUser;
30
33
  supervisionExpertUsers: IUser;
31
34
  supervisionAccountant: IUser;
35
+ freeTextUser: IUser;
32
36
  balanceSheet: IBalanceSheet;
33
37
  file: IFile;
34
38
  letter: ILetter;
@@ -0,0 +1,16 @@
1
+ import { ICycle, ISupervision, IUser } from '../..';
2
+
3
+ export interface ISupervisionPersonalAccountantNote {
4
+ id?: number;
5
+ note: string;
6
+ idUser: number;
7
+ idSupervision: number;
8
+ idCycle: number;
9
+ createdAt?: Date | null;
10
+ updatedAt?: Date | null;
11
+
12
+ // Associations
13
+ user: IUser;
14
+ supervision: ISupervision;
15
+ cycle: ICycle;
16
+ }
package/ts/types/index.ts CHANGED
@@ -203,6 +203,7 @@ export * from './Interface/models/IStripeEvent';
203
203
  export * from './Interface/models/ISupervision';
204
204
  export * from './Interface/models/ISupervisionPendingPoint';
205
205
  export * from './Interface/models/ISupervisionPendingPointReply';
206
+ export * from './Interface/models/ISupervisionPersonalAccountantNote';
206
207
  export * from './Interface/models/ISurvey';
207
208
  export * from './Interface/models/ITag';
208
209
  export * from './Interface/models/ITaxSystem';
@@ -491,6 +492,7 @@ export * from './Enum/ClientOrProspect';
491
492
  export * from './Enum/MissionAcceptation';
492
493
  export * from './Enum/Bank';
493
494
  export * from './Enum/VatControl';
495
+ export * from './Enum/Cycle';
494
496
 
495
497
  // Interfaces API
496
498
  export * from './Interface/api/cerfa/das2';