@silexpert/core 1.3.94-6 → 1.3.94-8

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 (106) hide show
  1. package/dist/cjs/api/resources/BankDedup.d.ts +2 -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 +2 -1
  9. package/dist/cjs/api/resources/Society.d.ts.map +1 -1
  10. package/dist/cjs/api/resources/Society.js +3 -0
  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/types/Enum/BalanceSheet.d.ts +2 -2
  15. package/dist/cjs/types/Enum/BalanceSheet.js +2 -2
  16. package/dist/cjs/types/Enum/BalanceSheet.js.map +1 -1
  17. package/dist/cjs/types/Interface/api/accountingFiles/queryAccountingFiles.d.ts +1 -0
  18. package/dist/cjs/types/Interface/api/accountingFiles/queryAccountingFiles.d.ts.map +1 -1
  19. package/dist/cjs/types/Interface/api/accountingFiles/queryAccountingFiles.js +7 -0
  20. package/dist/cjs/types/Interface/api/accountingFiles/queryAccountingFiles.js.map +1 -1
  21. package/dist/cjs/types/Interface/api/calendarEvent/updateCalendarEvent.d.ts +1 -0
  22. package/dist/cjs/types/Interface/api/calendarEvent/updateCalendarEvent.d.ts.map +1 -1
  23. package/dist/cjs/types/Interface/api/calendarEvent/updateCalendarEvent.js +4 -0
  24. package/dist/cjs/types/Interface/api/calendarEvent/updateCalendarEvent.js.map +1 -1
  25. package/dist/cjs/types/Interface/api/config/ConfigType.d.ts +0 -3
  26. package/dist/cjs/types/Interface/api/config/ConfigType.d.ts.map +1 -1
  27. package/dist/cjs/types/Interface/api/config/ConfigType.js.map +1 -1
  28. package/dist/cjs/types/Interface/api/registration/CreateRegistration.d.ts +1 -0
  29. package/dist/cjs/types/Interface/api/registration/CreateRegistration.d.ts.map +1 -1
  30. package/dist/cjs/types/Interface/api/registration/CreateRegistration.js +6 -0
  31. package/dist/cjs/types/Interface/api/registration/CreateRegistration.js.map +1 -1
  32. package/dist/cjs/types/Interface/api/shopify/InvoicesShopify.d.ts +5 -4
  33. package/dist/cjs/types/Interface/api/shopify/InvoicesShopify.d.ts.map +1 -1
  34. package/dist/cjs/types/Interface/api/shopify/InvoicesShopify.js +13 -0
  35. package/dist/cjs/types/Interface/api/shopify/InvoicesShopify.js.map +1 -1
  36. package/dist/cjs/types/Interface/api/society/QueryToArchived.d.ts +5 -0
  37. package/dist/cjs/types/Interface/api/society/QueryToArchived.d.ts.map +1 -0
  38. package/dist/cjs/types/Interface/api/society/QueryToArchived.js +25 -0
  39. package/dist/cjs/types/Interface/api/society/QueryToArchived.js.map +1 -0
  40. package/dist/cjs/types/Interface/models/IBankDedup.d.ts +84 -61
  41. package/dist/cjs/types/Interface/models/IBankDedup.d.ts.map +1 -1
  42. package/dist/cjs/types/Interface/models/IBankDedup.js.map +1 -1
  43. package/dist/cjs/types/index.d.ts +1 -0
  44. package/dist/cjs/types/index.d.ts.map +1 -1
  45. package/dist/cjs/types/index.js +1 -0
  46. package/dist/cjs/types/index.js.map +1 -1
  47. package/dist/mjs/api/resources/BankDedup.d.ts +2 -2
  48. package/dist/mjs/api/resources/BankDedup.d.ts.map +1 -1
  49. package/dist/mjs/api/resources/BankDedup.js +1 -1
  50. package/dist/mjs/api/resources/BankDedup.js.map +1 -1
  51. package/dist/mjs/api/resources/Refund.d.ts +1 -1
  52. package/dist/mjs/api/resources/Refund.d.ts.map +1 -1
  53. package/dist/mjs/api/resources/Refund.js.map +1 -1
  54. package/dist/mjs/api/resources/Society.d.ts +2 -1
  55. package/dist/mjs/api/resources/Society.d.ts.map +1 -1
  56. package/dist/mjs/api/resources/Society.js +3 -0
  57. package/dist/mjs/api/resources/Society.js.map +1 -1
  58. package/dist/mjs/api/resources/User.js +1 -1
  59. package/dist/mjs/api/resources/User.js.map +1 -1
  60. package/dist/mjs/types/Enum/BalanceSheet.d.ts +2 -2
  61. package/dist/mjs/types/Enum/BalanceSheet.js +2 -2
  62. package/dist/mjs/types/Enum/BalanceSheet.js.map +1 -1
  63. package/dist/mjs/types/Interface/api/accountingFiles/queryAccountingFiles.d.ts +1 -0
  64. package/dist/mjs/types/Interface/api/accountingFiles/queryAccountingFiles.d.ts.map +1 -1
  65. package/dist/mjs/types/Interface/api/accountingFiles/queryAccountingFiles.js +8 -0
  66. package/dist/mjs/types/Interface/api/accountingFiles/queryAccountingFiles.js.map +1 -1
  67. package/dist/mjs/types/Interface/api/calendarEvent/updateCalendarEvent.d.ts +1 -0
  68. package/dist/mjs/types/Interface/api/calendarEvent/updateCalendarEvent.d.ts.map +1 -1
  69. package/dist/mjs/types/Interface/api/calendarEvent/updateCalendarEvent.js +5 -0
  70. package/dist/mjs/types/Interface/api/calendarEvent/updateCalendarEvent.js.map +1 -1
  71. package/dist/mjs/types/Interface/api/config/ConfigType.d.ts +0 -3
  72. package/dist/mjs/types/Interface/api/config/ConfigType.d.ts.map +1 -1
  73. package/dist/mjs/types/Interface/api/config/ConfigType.js.map +1 -1
  74. package/dist/mjs/types/Interface/api/registration/CreateRegistration.d.ts +1 -0
  75. package/dist/mjs/types/Interface/api/registration/CreateRegistration.d.ts.map +1 -1
  76. package/dist/mjs/types/Interface/api/registration/CreateRegistration.js +7 -0
  77. package/dist/mjs/types/Interface/api/registration/CreateRegistration.js.map +1 -1
  78. package/dist/mjs/types/Interface/api/shopify/InvoicesShopify.d.ts +5 -4
  79. package/dist/mjs/types/Interface/api/shopify/InvoicesShopify.d.ts.map +1 -1
  80. package/dist/mjs/types/Interface/api/shopify/InvoicesShopify.js +14 -0
  81. package/dist/mjs/types/Interface/api/shopify/InvoicesShopify.js.map +1 -1
  82. package/dist/mjs/types/Interface/api/society/QueryToArchived.d.ts +5 -0
  83. package/dist/mjs/types/Interface/api/society/QueryToArchived.d.ts.map +1 -0
  84. package/dist/mjs/types/Interface/api/society/QueryToArchived.js +22 -0
  85. package/dist/mjs/types/Interface/api/society/QueryToArchived.js.map +1 -0
  86. package/dist/mjs/types/Interface/models/IBankDedup.d.ts +84 -61
  87. package/dist/mjs/types/Interface/models/IBankDedup.d.ts.map +1 -1
  88. package/dist/mjs/types/Interface/models/IBankDedup.js.map +1 -1
  89. package/dist/mjs/types/index.d.ts +1 -0
  90. package/dist/mjs/types/index.d.ts.map +1 -1
  91. package/dist/mjs/types/index.js +1 -0
  92. package/dist/mjs/types/index.js.map +1 -1
  93. package/package.json +1 -1
  94. package/ts/api/resources/BankDedup.ts +3 -3
  95. package/ts/api/resources/Refund.ts +1 -1
  96. package/ts/api/resources/Society.ts +5 -2
  97. package/ts/api/resources/User.ts +1 -1
  98. package/ts/types/Enum/BalanceSheet.ts +2 -2
  99. package/ts/types/Interface/api/accountingFiles/queryAccountingFiles.ts +6 -0
  100. package/ts/types/Interface/api/calendarEvent/updateCalendarEvent.ts +3 -0
  101. package/ts/types/Interface/api/config/ConfigType.ts +0 -3
  102. package/ts/types/Interface/api/registration/CreateRegistration.ts +5 -0
  103. package/ts/types/Interface/api/shopify/InvoicesShopify.ts +19 -4
  104. package/ts/types/Interface/api/society/QueryToArchived.ts +10 -0
  105. package/ts/types/Interface/models/IBankDedup.ts +88 -61
  106. package/ts/types/index.ts +1 -0
@@ -29,10 +29,9 @@ import {
29
29
  ReadSocietyUnpaidStats,
30
30
  DataCustomersCsv,
31
31
  ReadCurrentPrestations,
32
- IComment,
32
+ QueryToArchivedSociety,
33
33
  } from '../../types';
34
34
  import { CancelToken } from 'axios';
35
- import { User } from './User';
36
35
 
37
36
  export class Society extends Resource {
38
37
  public get(params: QuerySociety): Promise<ISociety> {
@@ -138,6 +137,10 @@ export class Society extends Resource {
138
137
  return this.axios.$get('/society/archived', { params: query });
139
138
  }
140
139
 
140
+ getToArchived(query: QueryToArchivedSociety, signal?: AbortSignal): Promise<BasePaginate<ISociety>> {
141
+ return this.axios.$get('/society/to-archived', { params: query, ...(signal ? { signal } : {}) });
142
+ }
143
+
141
144
  getUnpaids(query: QueryUnpaidSociety, signal?: AbortSignal): Promise<ISociety[]> {
142
145
  return this.axios.$get('/society/unpaids', {
143
146
  ...(signal ? { signal } : {}),
@@ -30,7 +30,7 @@ export class User extends Resource {
30
30
  return this.axios.$put('user/confirm', params);
31
31
  }
32
32
  resendConfirmationEmailLink(params: QueryResendConfirmationLink): Promise<boolean> {
33
- return this.axios.$put(`user/${params.id}/resendConfirmationEmailLink`);
33
+ return this.axios.$put(`user/${params.id}/send-confirmation-mail`);
34
34
  }
35
35
  create(data: CreateUser): Promise<IUser> {
36
36
  return this.axios.$post('user/create', data);
@@ -164,7 +164,7 @@ export const BalanceSheetDetails = [
164
164
  text: 'Standby',
165
165
  color: 'grey lighten-1',
166
166
  textColor: 'grey--text',
167
- forRoles: [['admin'], ['super_admin'], ['controle_interne']],
167
+ forRoles: [['admin'], ['super_admin'], ['controle_interne'], ['satisfaction']],
168
168
  },
169
169
  {
170
170
  text: 'Impayé',
@@ -229,7 +229,7 @@ export const BalanceSheetDetails = [
229
229
  value: BalanceSheetState.FIX_IN_PROGRESS,
230
230
  color: 'blue darken-4',
231
231
  textColor: 'blue--text',
232
- forRoles: [['front_office'], ['expert']],
232
+ forRoles: [['front_office'], ['expert'], ['satisfaction']],
233
233
  },
234
234
  {
235
235
  text: "Accepté SIE en l'état",
@@ -86,4 +86,10 @@ export class QueryPaginatedAccountingFile {
86
86
  @IsDateString()
87
87
  @IsOptional()
88
88
  endDate?: string;
89
+
90
+ @ApiPropertyOptional()
91
+ @IsBoolean()
92
+ @ToBoolean()
93
+ @IsOptional()
94
+ notAttached?: boolean;
89
95
  }
@@ -37,6 +37,9 @@ export class UpdateCalendarEvent {
37
37
  @ApiPropertyOptional()
38
38
  idUser?: number;
39
39
 
40
+ @ApiPropertyOptional()
41
+ idUserToUpdate?: number;
42
+
40
43
  @ApiPropertyOptional()
41
44
  typeComptable?: number;
42
45
 
@@ -135,7 +135,6 @@ interface Shine {
135
135
  hostV3: string;
136
136
  publicHost: string;
137
137
  clientId: string;
138
- clientSecret: string;
139
138
  redirect_uris: string[];
140
139
  status: string;
141
140
  scope: string;
@@ -186,7 +185,6 @@ interface Access2 {
186
185
 
187
186
  interface Test {
188
187
  login: string;
189
- password: string;
190
188
  editor: string;
191
189
  software: string;
192
190
  wsdl: Wsdl;
@@ -198,7 +196,6 @@ interface Wsdl {
198
196
 
199
197
  interface Production {
200
198
  login: string;
201
- password: string;
202
199
  editor: string;
203
200
  software: string;
204
201
  wsdl: Wsdl2;
@@ -245,6 +245,11 @@ export class CreateAndSendVatMail {
245
245
  @ApiProperty()
246
246
  @IsArray()
247
247
  idFiles: number[];
248
+
249
+ @ApiPropertyOptional()
250
+ @IsNumber()
251
+ @IsOptional()
252
+ sendByUserId?: number;
248
253
  }
249
254
 
250
255
  export class DownloadExternalFile {
@@ -1,12 +1,27 @@
1
+ import { IsBoolean, IsOptional } from 'class-validator';
1
2
  import { ApiPropertyOptional } from '../../../../utils';
3
+ import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
2
4
 
3
5
  export class InvoicesShopify {
4
6
  @ApiPropertyOptional()
5
- order: string;
7
+ @IsOptional()
8
+ order?: string;
9
+
6
10
  @ApiPropertyOptional()
7
- limit: number;
11
+ @IsOptional()
12
+ limit?: number;
13
+
8
14
  @ApiPropertyOptional()
9
- ids: number[];
15
+ @IsOptional()
16
+ ids?: number[];
17
+
18
+ @ApiPropertyOptional()
19
+ @IsOptional()
20
+ idSociety?: number;
21
+
10
22
  @ApiPropertyOptional()
11
- idSociety: number;
23
+ @IsOptional()
24
+ @IsBoolean()
25
+ @ToBoolean()
26
+ debug?: boolean;
12
27
  }
@@ -0,0 +1,10 @@
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
+ }
@@ -1,70 +1,97 @@
1
- export type TransactionRow = {
2
- label: string;
3
- dateValue: string; // ex "2025-06-30" ou "30/06/2025"
4
- credit: number; // positifs
5
- debit: number; // € positifs
6
- };
7
-
8
- export type PreparedRow = TransactionRow & {
9
- row_id: number;
10
- date_parsed: Date | null;
11
- credit_f: number;
12
- debit_f: number;
13
- delta: number; // credit_f - debit_f
14
- label_n: string;
15
- };
1
+ export interface IBankDedupRequest {
2
+ csv: string; // CSV en string (avec header: label,dateValue,credit,debit)
3
+ initial: number; // solde initial
4
+ target: number; // solde cible
5
+ }
16
6
 
17
- export type AnalyzeParams = {
18
- initial: number;
19
- target: number; // solde final attendu
20
- days: number; // fenêtre ±N jours
21
- amount_tol: number; // tolérance € (0.01)
22
- min_sim: number; // seuil de similarité [0..1]
23
- useEmbeddings?: boolean; // default true si clé dispo
24
- exact?: boolean; // tenter solveur exact
25
- exactTimeLimitMs?: number; // limite pour le backtracking
26
- };
7
+ export interface BankTx {
8
+ id: string; // id interne généré
9
+ label: string;
10
+ dateValue: string; // YYYY-MM-DD
11
+ credit: number;
12
+ debit: number;
13
+ sign: 1 | -1; // 1 = crédit net, -1 = débit net
14
+ amount: number; // valeur absolue du mouvement (en positif)
15
+ cents: number; // montant en centimes pour calculs exacts
16
+ }
27
17
 
28
- export type CandidatePair = {
29
- row_id_a: number;
30
- row_id_b: number;
31
- date_a: string;
32
- date_b: string;
33
- label_a: string;
34
- label_b: string;
35
- delta_a: number;
36
- delta_b: number;
37
- pair_sum: number; // delta_a + delta_b
38
- score: number; // [0..1]
39
- reason: string; // texte explicatif
40
- };
18
+ export interface DuplicateGroup {
19
+ id: string;
20
+ transactions: BankTx[];
21
+ amount: number; // montant commun
22
+ cents: number; // montant en centimes
23
+ sign: 1 | -1; // signe commun
24
+ confidence: number; // score de confiance [0 - 1]
25
+ method: 'exact' | 'fuzzy_high' | 'fuzzy_medium' | 'fuzzy_low'; // méthode de détection
26
+ }
41
27
 
42
- export type AnalyzeBody = {
43
- csv: string;
28
+ export interface IBankDedupResult {
29
+ success: true;
44
30
  initial: number;
45
31
  target: number;
46
- params: Omit<AnalyzeParams, 'initial' | 'target'>;
47
- };
32
+ finalRaw: number;
33
+ finalAfterDedup: number;
34
+ diffBefore: number; // target - finalRaw
35
+ diffAfter: number; // target - finalAfterDedup (DOIT être exactement 0, aucune tolérance)
36
+ removedGroups: {
37
+ id: string;
38
+ confidence: number;
39
+ method: string;
40
+ amount: number;
41
+ transactionCount: number;
42
+ isSelected: boolean;
43
+ transactions: {
44
+ id: string;
45
+ label: string;
46
+ dateValue: string;
47
+ isKept: boolean;
48
+ isCredit: boolean;
49
+ }[];
50
+ }[];
51
+ removedCount: number;
52
+ keptCount: number;
53
+ csvDeduped: string;
54
+ allGroups: {
55
+ id: string;
56
+ confidence: number;
57
+ method: string;
58
+ amount: number;
59
+ transactionCount: number;
60
+ isSelected: boolean;
61
+ transactions: {
62
+ id: string;
63
+ label: string;
64
+ dateValue: string;
65
+ isKept: boolean;
66
+ isCredit: boolean;
67
+ }[];
68
+ }[];
69
+ debug: {
70
+ totalGroups: number;
71
+ selectedGroups: number;
72
+ iterations: number;
73
+ strategiesUsed: string[];
74
+ };
75
+ }
48
76
 
49
- export type AnalyzeResult = {
50
- summary: {
51
- lines_before: number;
52
- lines_after: number;
53
- dups_candidates: number;
54
- initial_balance: number;
55
- final_before: number;
56
- gap_before: number;
57
- final_after: number;
58
- gap_after: number;
59
- exact_used: boolean;
77
+ export interface IBankDedupImpossible {
78
+ success: false;
79
+ reason: 'NO_EXACT_COMBINATION' | 'CSV_PARSE_ERROR' | 'INVALID_INPUT' | 'INSUFFICIENT_DUPLICATES';
80
+ message: string;
81
+ initial?: number;
82
+ target?: number;
83
+ finalRaw?: number;
84
+ diffBefore?: number;
85
+ bestAttempt?: {
86
+ finalAfterDedup: number;
87
+ diffAfter: number;
88
+ removedCount: number;
60
89
  };
61
- artifacts: {
62
- preview_before: Array<any>;
63
- preview_after: Array<any>;
64
- duplicates_detailed: CandidatePair[];
65
- exact_selection?: CandidatePair[];
90
+ stats?: {
91
+ totalTx?: number;
92
+ totalGroups?: number;
93
+ strategiesTried?: string[];
66
94
  };
67
- textual_summary?: string;
68
- };
95
+ }
69
96
 
70
- export type PairIndex = { idx: number; rows: Set<number>; sum_cents: number; score: number };
97
+ export type IBankDedupResponse = IBankDedupResult | IBankDedupImpossible;
package/ts/types/index.ts CHANGED
@@ -1057,6 +1057,7 @@ export * from './Interface/api/accountsSectors/Query';
1057
1057
  export * from './Interface/api/visualizedInformation/Query';
1058
1058
  export * from './Interface/api/visualizedInformation/Update';
1059
1059
  export * from './Interface/api/society/QueryArchived';
1060
+ export * from './Interface/api/society/QueryToArchived';
1060
1061
  export * from './Interface/api/society/QueryUnpaid';
1061
1062
  export * from './Interface/api/vatControl/CreateVatControl';
1062
1063
  export * from './Interface/api/vatControl/QueryVatControl';