@silexpert/core 1.2.16 → 1.2.18

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 (85) hide show
  1. package/dist/cjs/api/resources/Checklist.d.ts +2 -1
  2. package/dist/cjs/api/resources/Checklist.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/Checklist.js +3 -0
  4. package/dist/cjs/api/resources/Checklist.js.map +1 -1
  5. package/dist/cjs/api/resources/Library.d.ts +3 -1
  6. package/dist/cjs/api/resources/Library.d.ts.map +1 -1
  7. package/dist/cjs/api/resources/Library.js +12 -0
  8. package/dist/cjs/api/resources/Library.js.map +1 -1
  9. package/dist/cjs/types/Enum/JuridicalSociety.d.ts +6 -0
  10. package/dist/cjs/types/Enum/JuridicalSociety.d.ts.map +1 -0
  11. package/dist/cjs/types/Enum/JuridicalSociety.js +10 -0
  12. package/dist/cjs/types/Enum/JuridicalSociety.js.map +1 -0
  13. package/dist/cjs/types/Interface/api/checklist/Query.d.ts +5 -0
  14. package/dist/cjs/types/Interface/api/checklist/Query.d.ts.map +1 -1
  15. package/dist/cjs/types/Interface/api/checklist/Query.js +21 -1
  16. package/dist/cjs/types/Interface/api/checklist/Query.js.map +1 -1
  17. package/dist/cjs/types/Interface/api/checklist/Read.d.ts +4 -0
  18. package/dist/cjs/types/Interface/api/checklist/Read.d.ts.map +1 -1
  19. package/dist/cjs/types/Interface/api/checklist/Read.js.map +1 -1
  20. package/dist/cjs/types/Interface/api/library/QueryLibrary.d.ts +12 -0
  21. package/dist/cjs/types/Interface/api/library/QueryLibrary.d.ts.map +1 -1
  22. package/dist/cjs/types/Interface/api/library/QueryLibrary.js +55 -1
  23. package/dist/cjs/types/Interface/api/library/QueryLibrary.js.map +1 -1
  24. package/dist/cjs/types/Interface/api/society/QueryUnpaid.d.ts +1 -0
  25. package/dist/cjs/types/Interface/api/society/QueryUnpaid.d.ts.map +1 -1
  26. package/dist/cjs/types/Interface/api/society/QueryUnpaid.js +7 -0
  27. package/dist/cjs/types/Interface/api/society/QueryUnpaid.js.map +1 -1
  28. package/dist/cjs/types/Interface/api/society/ReadSocietyUnpaidStats.d.ts +5 -1
  29. package/dist/cjs/types/Interface/api/society/ReadSocietyUnpaidStats.d.ts.map +1 -1
  30. package/dist/cjs/types/Interface/api/society/ReadSocietyUnpaidStats.js.map +1 -1
  31. package/dist/cjs/types/Interface/models/IChecklist.d.ts +1 -0
  32. package/dist/cjs/types/Interface/models/IChecklist.d.ts.map +1 -1
  33. package/dist/cjs/types/Interface/models/IChecklist.js.map +1 -1
  34. package/dist/cjs/types/index.d.ts +1 -0
  35. package/dist/cjs/types/index.d.ts.map +1 -1
  36. package/dist/cjs/types/index.js +1 -0
  37. package/dist/cjs/types/index.js.map +1 -1
  38. package/dist/mjs/api/resources/Checklist.d.ts +2 -1
  39. package/dist/mjs/api/resources/Checklist.d.ts.map +1 -1
  40. package/dist/mjs/api/resources/Checklist.js +6 -0
  41. package/dist/mjs/api/resources/Checklist.js.map +1 -1
  42. package/dist/mjs/api/resources/Library.d.ts +3 -1
  43. package/dist/mjs/api/resources/Library.d.ts.map +1 -1
  44. package/dist/mjs/api/resources/Library.js +12 -0
  45. package/dist/mjs/api/resources/Library.js.map +1 -1
  46. package/dist/mjs/types/Enum/JuridicalSociety.d.ts +6 -0
  47. package/dist/mjs/types/Enum/JuridicalSociety.d.ts.map +1 -0
  48. package/dist/mjs/types/Enum/JuridicalSociety.js +7 -0
  49. package/dist/mjs/types/Enum/JuridicalSociety.js.map +1 -0
  50. package/dist/mjs/types/Interface/api/checklist/Query.d.ts +5 -0
  51. package/dist/mjs/types/Interface/api/checklist/Query.d.ts.map +1 -1
  52. package/dist/mjs/types/Interface/api/checklist/Query.js +22 -0
  53. package/dist/mjs/types/Interface/api/checklist/Query.js.map +1 -1
  54. package/dist/mjs/types/Interface/api/checklist/Read.d.ts +4 -0
  55. package/dist/mjs/types/Interface/api/checklist/Read.d.ts.map +1 -1
  56. package/dist/mjs/types/Interface/api/checklist/Read.js.map +1 -1
  57. package/dist/mjs/types/Interface/api/library/QueryLibrary.d.ts +12 -0
  58. package/dist/mjs/types/Interface/api/library/QueryLibrary.d.ts.map +1 -1
  59. package/dist/mjs/types/Interface/api/library/QueryLibrary.js +62 -0
  60. package/dist/mjs/types/Interface/api/library/QueryLibrary.js.map +1 -1
  61. package/dist/mjs/types/Interface/api/society/QueryUnpaid.d.ts +1 -0
  62. package/dist/mjs/types/Interface/api/society/QueryUnpaid.d.ts.map +1 -1
  63. package/dist/mjs/types/Interface/api/society/QueryUnpaid.js +8 -0
  64. package/dist/mjs/types/Interface/api/society/QueryUnpaid.js.map +1 -1
  65. package/dist/mjs/types/Interface/api/society/ReadSocietyUnpaidStats.d.ts +5 -1
  66. package/dist/mjs/types/Interface/api/society/ReadSocietyUnpaidStats.d.ts.map +1 -1
  67. package/dist/mjs/types/Interface/api/society/ReadSocietyUnpaidStats.js.map +1 -1
  68. package/dist/mjs/types/Interface/models/IChecklist.d.ts +1 -0
  69. package/dist/mjs/types/Interface/models/IChecklist.d.ts.map +1 -1
  70. package/dist/mjs/types/Interface/models/IChecklist.js.map +1 -1
  71. package/dist/mjs/types/index.d.ts +1 -0
  72. package/dist/mjs/types/index.d.ts.map +1 -1
  73. package/dist/mjs/types/index.js +1 -0
  74. package/dist/mjs/types/index.js.map +1 -1
  75. package/package.json +2 -1
  76. package/ts/api/resources/Checklist.ts +8 -1
  77. package/ts/api/resources/Library.ts +16 -0
  78. package/ts/types/Enum/JuridicalSociety.ts +5 -0
  79. package/ts/types/Interface/api/checklist/Query.ts +16 -0
  80. package/ts/types/Interface/api/checklist/Read.ts +5 -0
  81. package/ts/types/Interface/api/library/QueryLibrary.ts +46 -0
  82. package/ts/types/Interface/api/society/QueryUnpaid.ts +6 -0
  83. package/ts/types/Interface/api/society/ReadSocietyUnpaidStats.ts +5 -1
  84. package/ts/types/Interface/models/IChecklist.ts +1 -0
  85. package/ts/types/index.ts +1 -0
@@ -1,7 +1,9 @@
1
1
  import { Resource } from '../Resource';
2
2
  import {
3
3
  QueryLibraryFile, UpdateOrCreateGedFile, IGedFile, QueryDownloadFile, UpdateGedFile, QueryLastFileOfType, QueryLibrarySociety, BasePaginate, ReadSocietyLibrary,
4
+ ConvertFilePdfToImage,
4
5
  } from '../../types';
6
+ import { ConvertResponse } from 'pdf2pic/dist/types/convertResponse';
5
7
 
6
8
  export class Library extends Resource {
7
9
  create(formData: FormData): Promise<IGedFile> {
@@ -56,4 +58,18 @@ export class Library extends Resource {
56
58
  getPaginatedForSociety(idSociety: number, params: QueryLibrarySociety, signal: AbortSignal): Promise<BasePaginate<ReadSocietyLibrary>> {
57
59
  return this.axios.$get(`/societies/${idSociety}/library`, { params, signal });
58
60
  }
61
+
62
+ convertPdfToImage(body: Omit<ConvertFilePdfToImage, 'file'>, file: File): Promise<ConvertResponse> {
63
+ const formData = new FormData();
64
+ Object.entries(body).forEach(([key, value]) => {
65
+ if (value) {
66
+ formData.append(key, `${value}`);
67
+ }
68
+ });
69
+
70
+ formData.append('file', file);
71
+ return this.axios.$post('/convert-pdf-to-image', formData, {
72
+ headers: { 'Content-Type': 'multipart/form-data' },
73
+ });
74
+ }
59
75
  }
@@ -0,0 +1,5 @@
1
+ export enum JuridicalSocietyEnum {
2
+ SOCIETY = 1,
3
+ INDIVIDUAL = 2,
4
+ SOCIETY_AND_INDIVIDUAL = 3,
5
+ }
@@ -101,6 +101,12 @@ export class QueryChecklistGetPaginated extends RequiredQueryPaginate {
101
101
  @IsOptional()
102
102
  vatRegime?: number[];
103
103
 
104
+ @ApiPropertyOptional()
105
+ @IsOptional()
106
+ @IsBoolean()
107
+ @ToBoolean()
108
+ takePriority?: boolean;
109
+
104
110
  @ApiPropertyOptional()
105
111
  @IsNumber()
106
112
  @IsOptional()
@@ -111,6 +117,16 @@ export class QueryChecklistGetPaginated extends RequiredQueryPaginate {
111
117
  closingDate: Date;
112
118
  }
113
119
 
120
+ export class QueryChecklistGetStats {
121
+ @ApiProperty()
122
+ @IsArray()
123
+ idUser: number[];
124
+
125
+ @ApiProperty()
126
+ @IsDate()
127
+ closingDate: Date;
128
+ }
129
+
114
130
  export class QueryGetAllQuestions {
115
131
  @ApiPropertyOptional()
116
132
  @IsOptional()
@@ -32,4 +32,9 @@ export type ReadChecklistStatistic = {
32
32
  total: number;
33
33
  done: number;
34
34
  }
35
+ };
36
+
37
+ export type ReadChecklistStats = {
38
+ todo: number,
39
+ done: number,
35
40
  };
@@ -5,6 +5,7 @@ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
5
5
  import { GedFolder, GedFileType, GedCategory } from '../../../Enum/Ged';
6
6
  import { RequiredQueryPaginate } from '../BasePaginate';
7
7
  import { Order } from 'sequelize';
8
+ import { TFile } from '../file/TFile';
8
9
 
9
10
  export class QueryLibraryFile {
10
11
  @ApiProperty()
@@ -162,4 +163,49 @@ export class QueryProcessCommercialFile {
162
163
  @IsOptional()
163
164
  @IsInt()
164
165
  limit?: number;
166
+ }
167
+
168
+
169
+ export class ConvertFilePdfToImage {
170
+ @ApiProperty()
171
+ file: TFile;
172
+
173
+ @ApiProperty()
174
+ @IsString()
175
+ returnType: string;
176
+
177
+ @ApiPropertyOptional()
178
+ @IsString()
179
+ @IsOptional()
180
+ format: string;
181
+
182
+ @ApiPropertyOptional()
183
+ @IsNumber()
184
+ @IsOptional()
185
+ density?: number;
186
+
187
+ @ApiPropertyOptional()
188
+ @IsString()
189
+ @IsOptional()
190
+ saveFilename?: string;
191
+
192
+ @ApiPropertyOptional()
193
+ @IsString()
194
+ @IsOptional()
195
+ savePath?: string;
196
+
197
+ @ApiPropertyOptional()
198
+ @IsInt()
199
+ @IsOptional()
200
+ width?: number;
201
+
202
+ @ApiPropertyOptional()
203
+ @IsInt()
204
+ @IsOptional()
205
+ height?: number;
206
+
207
+ @ApiPropertyOptional()
208
+ @IsInt()
209
+ @IsOptional()
210
+ numberOfPage?: number;
165
211
  }
@@ -25,6 +25,12 @@ export class QueryUnpaidSociety {
25
25
  @ToBoolean()
26
26
  isRecoverable?: boolean;
27
27
 
28
+ @ApiPropertyOptional()
29
+ @IsOptional()
30
+ @IsBoolean()
31
+ @ToBoolean()
32
+ isNotCollected?: boolean;
33
+
28
34
  @ApiPropertyOptional()
29
35
  @IsOptional()
30
36
  @IsString()
@@ -1,4 +1,8 @@
1
1
  export type ReadSocietyUnpaidStats = {
2
2
  amount:number,
3
- count:number
3
+ count: {
4
+ accounting: number,
5
+ legal: number,
6
+ social: number
7
+ }
4
8
  };
@@ -10,6 +10,7 @@ export interface IChecklist {
10
10
  id?: number;
11
11
  idUserFront: number | null;
12
12
  revisionDate?: Date | null;
13
+ takePriority?: boolean;
13
14
  idUserWhoValidate?: number | null;
14
15
  validateDate?: Date | null;
15
16
  isConfirmed: boolean;
package/ts/types/index.ts CHANGED
@@ -555,6 +555,7 @@ export * from './Enum/TypeSupportForNotation';
555
555
  export * from './Enum/ToRecallRating';
556
556
  export * from './Enum/PrevisionalForm';
557
557
  export * from './Enum/PaymentRecovery';
558
+ export * from './Enum/JuridicalSociety';
558
559
 
559
560
  // Interfaces API
560
561
  export * from './Interface/api/exercice/ReadExercice';