@silexpert/core 1.3.94-13 → 1.3.94-2

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