@silexpert/core 1.3.94-9 → 1.3.94

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 (92) hide show
  1. package/dist/cjs/api/resources/Society.d.ts +1 -2
  2. package/dist/cjs/api/resources/Society.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/Society.js +0 -3
  4. package/dist/cjs/api/resources/Society.js.map +1 -1
  5. package/dist/cjs/api/resources/User.js +1 -1
  6. package/dist/cjs/api/resources/User.js.map +1 -1
  7. package/dist/cjs/api/resources.d.ts +0 -2
  8. package/dist/cjs/api/resources.d.ts.map +1 -1
  9. package/dist/cjs/api/resources.js +0 -2
  10. package/dist/cjs/api/resources.js.map +1 -1
  11. package/dist/cjs/types/Enum/BalanceSheet.d.ts +2 -2
  12. package/dist/cjs/types/Enum/BalanceSheet.js +2 -2
  13. package/dist/cjs/types/Enum/BalanceSheet.js.map +1 -1
  14. package/dist/cjs/types/Interface/api/calendarEvent/updateCalendarEvent.d.ts +0 -1
  15. package/dist/cjs/types/Interface/api/calendarEvent/updateCalendarEvent.d.ts.map +1 -1
  16. package/dist/cjs/types/Interface/api/calendarEvent/updateCalendarEvent.js +0 -4
  17. package/dist/cjs/types/Interface/api/calendarEvent/updateCalendarEvent.js.map +1 -1
  18. package/dist/cjs/types/Interface/api/config/ConfigType.d.ts +3 -0
  19. package/dist/cjs/types/Interface/api/config/ConfigType.d.ts.map +1 -1
  20. package/dist/cjs/types/Interface/api/config/ConfigType.js.map +1 -1
  21. package/dist/cjs/types/Interface/api/shopify/InvoicesShopify.d.ts +4 -5
  22. package/dist/cjs/types/Interface/api/shopify/InvoicesShopify.d.ts.map +1 -1
  23. package/dist/cjs/types/Interface/api/shopify/InvoicesShopify.js +0 -13
  24. package/dist/cjs/types/Interface/api/shopify/InvoicesShopify.js.map +1 -1
  25. package/dist/cjs/types/index.d.ts +0 -2
  26. package/dist/cjs/types/index.d.ts.map +1 -1
  27. package/dist/cjs/types/index.js +0 -2
  28. package/dist/cjs/types/index.js.map +1 -1
  29. package/dist/mjs/api/resources/Society.d.ts +1 -2
  30. package/dist/mjs/api/resources/Society.d.ts.map +1 -1
  31. package/dist/mjs/api/resources/Society.js +0 -3
  32. package/dist/mjs/api/resources/Society.js.map +1 -1
  33. package/dist/mjs/api/resources/User.js +1 -1
  34. package/dist/mjs/api/resources/User.js.map +1 -1
  35. package/dist/mjs/api/resources.d.ts +0 -2
  36. package/dist/mjs/api/resources.d.ts.map +1 -1
  37. package/dist/mjs/api/resources.js +0 -2
  38. package/dist/mjs/api/resources.js.map +1 -1
  39. package/dist/mjs/types/Enum/BalanceSheet.d.ts +2 -2
  40. package/dist/mjs/types/Enum/BalanceSheet.js +2 -2
  41. package/dist/mjs/types/Enum/BalanceSheet.js.map +1 -1
  42. package/dist/mjs/types/Interface/api/calendarEvent/updateCalendarEvent.d.ts +0 -1
  43. package/dist/mjs/types/Interface/api/calendarEvent/updateCalendarEvent.d.ts.map +1 -1
  44. package/dist/mjs/types/Interface/api/calendarEvent/updateCalendarEvent.js +0 -5
  45. package/dist/mjs/types/Interface/api/calendarEvent/updateCalendarEvent.js.map +1 -1
  46. package/dist/mjs/types/Interface/api/config/ConfigType.d.ts +3 -0
  47. package/dist/mjs/types/Interface/api/config/ConfigType.d.ts.map +1 -1
  48. package/dist/mjs/types/Interface/api/config/ConfigType.js.map +1 -1
  49. package/dist/mjs/types/Interface/api/shopify/InvoicesShopify.d.ts +4 -5
  50. package/dist/mjs/types/Interface/api/shopify/InvoicesShopify.d.ts.map +1 -1
  51. package/dist/mjs/types/Interface/api/shopify/InvoicesShopify.js +0 -14
  52. package/dist/mjs/types/Interface/api/shopify/InvoicesShopify.js.map +1 -1
  53. package/dist/mjs/types/index.d.ts +0 -2
  54. package/dist/mjs/types/index.d.ts.map +1 -1
  55. package/dist/mjs/types/index.js +0 -2
  56. package/dist/mjs/types/index.js.map +1 -1
  57. package/package.json +1 -1
  58. package/ts/api/resources/Society.ts +0 -5
  59. package/ts/api/resources/User.ts +1 -1
  60. package/ts/api/resources.ts +0 -2
  61. package/ts/types/Enum/BalanceSheet.ts +2 -2
  62. package/ts/types/Interface/api/calendarEvent/updateCalendarEvent.ts +0 -3
  63. package/ts/types/Interface/api/config/ConfigType.ts +3 -0
  64. package/ts/types/Interface/api/shopify/InvoicesShopify.ts +4 -19
  65. package/ts/types/index.ts +0 -2
  66. package/dist/cjs/api/resources/BankDedup.d.ts +0 -9
  67. package/dist/cjs/api/resources/BankDedup.d.ts.map +0 -1
  68. package/dist/cjs/api/resources/BankDedup.js +0 -14
  69. package/dist/cjs/api/resources/BankDedup.js.map +0 -1
  70. package/dist/cjs/types/Interface/api/bankDedup/BankDedup.d.ts +0 -84
  71. package/dist/cjs/types/Interface/api/bankDedup/BankDedup.d.ts.map +0 -1
  72. package/dist/cjs/types/Interface/api/bankDedup/BankDedup.js +0 -301
  73. package/dist/cjs/types/Interface/api/bankDedup/BankDedup.js.map +0 -1
  74. package/dist/cjs/types/Interface/api/society/QueryToArchived.d.ts +0 -5
  75. package/dist/cjs/types/Interface/api/society/QueryToArchived.d.ts.map +0 -1
  76. package/dist/cjs/types/Interface/api/society/QueryToArchived.js +0 -25
  77. package/dist/cjs/types/Interface/api/society/QueryToArchived.js.map +0 -1
  78. package/dist/mjs/api/resources/BankDedup.d.ts +0 -9
  79. package/dist/mjs/api/resources/BankDedup.d.ts.map +0 -1
  80. package/dist/mjs/api/resources/BankDedup.js +0 -10
  81. package/dist/mjs/api/resources/BankDedup.js.map +0 -1
  82. package/dist/mjs/types/Interface/api/bankDedup/BankDedup.d.ts +0 -84
  83. package/dist/mjs/types/Interface/api/bankDedup/BankDedup.d.ts.map +0 -1
  84. package/dist/mjs/types/Interface/api/bankDedup/BankDedup.js +0 -340
  85. package/dist/mjs/types/Interface/api/bankDedup/BankDedup.js.map +0 -1
  86. package/dist/mjs/types/Interface/api/society/QueryToArchived.d.ts +0 -5
  87. package/dist/mjs/types/Interface/api/society/QueryToArchived.d.ts.map +0 -1
  88. package/dist/mjs/types/Interface/api/society/QueryToArchived.js +0 -22
  89. package/dist/mjs/types/Interface/api/society/QueryToArchived.js.map +0 -1
  90. package/ts/api/resources/BankDedup.ts +0 -11
  91. package/ts/types/Interface/api/bankDedup/BankDedup.ts +0 -264
  92. package/ts/types/Interface/api/society/QueryToArchived.ts +0 -10
@@ -1,264 +0,0 @@
1
- import { ApiProperty } from '@nestjs/swagger';
2
- import {
3
- IsString,
4
- IsNumber,
5
- IsArray,
6
- ValidateNested,
7
- IsBoolean,
8
- IsIn,
9
- IsOptional,
10
- Min,
11
- Max,
12
- IsInstance,
13
- } from 'class-validator';
14
- import { Transform, Type } from 'class-transformer';
15
-
16
- export class BankDedupRequest {
17
- @ApiProperty()
18
- @IsString()
19
- csv: string; // CSV en string (avec header: label,dateValue,credit,debit)
20
-
21
- @ApiProperty()
22
- @IsNumber()
23
- initial: number; // solde initial
24
-
25
- @ApiProperty()
26
- @IsNumber()
27
- target: number; // solde cible
28
- }
29
-
30
- export class BankDedupFileUploadBody {
31
- @ApiProperty()
32
- @IsNumber()
33
- initial: number; // solde initial
34
-
35
- @ApiProperty()
36
- @IsNumber()
37
- target: number; // solde cible
38
- }
39
-
40
- export class BankTx {
41
- @ApiProperty()
42
- @IsString()
43
- id: string; // id interne généré
44
-
45
- @ApiProperty()
46
- @IsString()
47
- label: string;
48
-
49
- @ApiProperty()
50
- @IsString()
51
- dateValue: string; // YYYY-MM-DD
52
-
53
- @ApiProperty()
54
- @IsNumber()
55
- credit: number;
56
-
57
- @ApiProperty()
58
- @IsNumber()
59
- debit: number;
60
-
61
- @ApiProperty()
62
- @IsIn([1, -1])
63
- sign: 1 | -1; // 1 = crédit net, -1 = débit net
64
-
65
- @ApiProperty()
66
- @IsNumber()
67
- @Min(0)
68
- amount: number; // valeur absolue du mouvement (en positif)
69
-
70
- @ApiProperty()
71
- @IsNumber()
72
- cents: number; // montant en centimes pour calculs exacts
73
- }
74
-
75
- export class DuplicateGroup {
76
- @ApiProperty()
77
- @IsString()
78
- id: string;
79
-
80
- @ApiProperty({ type: [BankTx] })
81
- @IsArray()
82
- @ValidateNested({ each: true })
83
- @Type(() => BankTx)
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 BankDedupResult {
110
- @ApiProperty()
111
- @IsBoolean()
112
- success: true;
113
-
114
- @ApiProperty()
115
- @IsNumber()
116
- initial: number;
117
-
118
- @ApiProperty()
119
- @IsNumber()
120
- target: number;
121
-
122
- @ApiProperty()
123
- @IsNumber()
124
- finalRaw: number;
125
-
126
- @ApiProperty()
127
- @IsNumber()
128
- finalAfterDedup: number;
129
-
130
- @ApiProperty()
131
- @IsNumber()
132
- diffBefore: number; // target - finalRaw
133
-
134
- @ApiProperty()
135
- @IsNumber()
136
- diffAfter: number; // target - finalAfterDedup (DOIT être exactement 0, aucune tolérance)
137
-
138
- @ApiProperty()
139
- @IsArray()
140
- @ValidateNested({ each: true })
141
- @Type(() => BankDedupGroup)
142
- removedGroups: BankDedupGroup[];
143
-
144
- @ApiProperty()
145
- @IsNumber()
146
- removedCount: number;
147
-
148
- @ApiProperty()
149
- @IsNumber()
150
- keptCount: number;
151
-
152
- @ApiProperty()
153
- @IsString()
154
- csvDeduped: string;
155
-
156
- @ApiProperty()
157
- @IsArray()
158
- @ValidateNested({ each: true })
159
- @Type(() => BankDedupGroup)
160
- allGroups: BankDedupGroup[];
161
-
162
- @ApiProperty()
163
- debug: {
164
- totalGroups: number;
165
- selectedGroups: number;
166
- iterations: number;
167
- strategiesUsed: string[];
168
- };
169
- }
170
-
171
- export class BankDedupGroup {
172
- @ApiProperty()
173
- @IsString()
174
- id: string;
175
-
176
- @ApiProperty()
177
- @IsBoolean()
178
- isSelected: boolean;
179
-
180
- @ApiProperty()
181
- @IsOptional()
182
- @IsNumber()
183
- @Min(0)
184
- @Max(1)
185
- confidence?: number;
186
-
187
- @ApiProperty()
188
- @IsOptional()
189
- @IsString()
190
- method?: string;
191
-
192
- @ApiProperty()
193
- @IsOptional()
194
- @IsNumber()
195
- amount?: number;
196
-
197
- @ApiProperty()
198
- @IsOptional()
199
- @IsNumber()
200
- transactionCount?: number;
201
-
202
- @ApiProperty()
203
- @IsOptional()
204
- @IsArray()
205
- transactions?: {
206
- id: string;
207
- label: string;
208
- dateValue: string;
209
- isKept: boolean;
210
- isCredit: boolean;
211
- }[];
212
- }
213
-
214
- export class BankDedupImpossible {
215
- @ApiProperty()
216
- @IsBoolean()
217
- success: false;
218
-
219
- @ApiProperty()
220
- @IsIn(['NO_EXACT_COMBINATION', 'CSV_PARSE_ERROR', 'INVALID_INPUT', 'INSUFFICIENT_DUPLICATES'])
221
- reason: 'NO_EXACT_COMBINATION' | 'CSV_PARSE_ERROR' | 'INVALID_INPUT' | 'INSUFFICIENT_DUPLICATES';
222
-
223
- @ApiProperty()
224
- @IsString()
225
- message: string;
226
-
227
- @ApiProperty()
228
- @IsOptional()
229
- @IsNumber()
230
- initial?: number;
231
-
232
- @ApiProperty()
233
- @IsOptional()
234
- @IsNumber()
235
- target?: number;
236
-
237
- @ApiProperty()
238
- @IsOptional()
239
- @IsNumber()
240
- finalRaw?: number;
241
-
242
- @ApiProperty()
243
- @IsOptional()
244
- @IsNumber()
245
- diffBefore?: number;
246
-
247
- @ApiProperty()
248
- @IsOptional()
249
- bestAttempt?: {
250
- finalAfterDedup: number;
251
- diffAfter: number;
252
- removedCount: number;
253
- };
254
-
255
- @ApiProperty()
256
- @IsOptional()
257
- stats?: {
258
- totalTx?: number;
259
- totalGroups?: number;
260
- strategiesTried?: string[];
261
- };
262
- }
263
-
264
- export type BankDedupResponse = BankDedupResult | BankDedupImpossible;
@@ -1,10 +0,0 @@
1
- import { IsOptional, IsString } from 'class-validator';
2
- import { ApiPropertyOptional } from '../../../../utils';
3
- import { RequiredQueryPaginate } from '../BasePaginate';
4
-
5
- export class QueryToArchivedSociety extends RequiredQueryPaginate {
6
- @ApiPropertyOptional()
7
- @IsOptional()
8
- @IsString()
9
- search?: string;
10
- }