@silexpert/core 1.3.94-6 → 1.3.94-7
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.
- package/dist/cjs/api/resources/BankDedup.d.ts +2 -2
- package/dist/cjs/api/resources/BankDedup.d.ts.map +1 -1
- package/dist/cjs/api/resources/BankDedup.js.map +1 -1
- package/dist/cjs/api/resources/Refund.d.ts +1 -1
- package/dist/cjs/api/resources/Refund.d.ts.map +1 -1
- package/dist/cjs/api/resources/Refund.js.map +1 -1
- package/dist/cjs/api/resources/Society.d.ts.map +1 -1
- package/dist/cjs/api/resources/Society.js.map +1 -1
- package/dist/cjs/types/Interface/api/accountingFiles/queryAccountingFiles.d.ts +1 -0
- package/dist/cjs/types/Interface/api/accountingFiles/queryAccountingFiles.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/accountingFiles/queryAccountingFiles.js +7 -0
- package/dist/cjs/types/Interface/api/accountingFiles/queryAccountingFiles.js.map +1 -1
- package/dist/cjs/types/Interface/api/config/ConfigType.d.ts +0 -3
- package/dist/cjs/types/Interface/api/config/ConfigType.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/config/ConfigType.js.map +1 -1
- package/dist/cjs/types/Interface/api/registration/CreateRegistration.d.ts +1 -0
- package/dist/cjs/types/Interface/api/registration/CreateRegistration.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/registration/CreateRegistration.js +6 -0
- package/dist/cjs/types/Interface/api/registration/CreateRegistration.js.map +1 -1
- package/dist/cjs/types/Interface/api/shopify/InvoicesShopify.d.ts +5 -4
- package/dist/cjs/types/Interface/api/shopify/InvoicesShopify.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/shopify/InvoicesShopify.js +13 -0
- package/dist/cjs/types/Interface/api/shopify/InvoicesShopify.js.map +1 -1
- package/dist/cjs/types/Interface/models/IBankDedup.d.ts +85 -61
- package/dist/cjs/types/Interface/models/IBankDedup.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IBankDedup.js.map +1 -1
- package/dist/mjs/api/resources/BankDedup.d.ts +2 -2
- package/dist/mjs/api/resources/BankDedup.d.ts.map +1 -1
- package/dist/mjs/api/resources/BankDedup.js.map +1 -1
- package/dist/mjs/api/resources/Refund.d.ts +1 -1
- package/dist/mjs/api/resources/Refund.d.ts.map +1 -1
- package/dist/mjs/api/resources/Refund.js.map +1 -1
- package/dist/mjs/api/resources/Society.d.ts.map +1 -1
- package/dist/mjs/api/resources/Society.js.map +1 -1
- package/dist/mjs/types/Interface/api/accountingFiles/queryAccountingFiles.d.ts +1 -0
- package/dist/mjs/types/Interface/api/accountingFiles/queryAccountingFiles.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/accountingFiles/queryAccountingFiles.js +8 -0
- package/dist/mjs/types/Interface/api/accountingFiles/queryAccountingFiles.js.map +1 -1
- package/dist/mjs/types/Interface/api/config/ConfigType.d.ts +0 -3
- package/dist/mjs/types/Interface/api/config/ConfigType.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/config/ConfigType.js.map +1 -1
- package/dist/mjs/types/Interface/api/registration/CreateRegistration.d.ts +1 -0
- package/dist/mjs/types/Interface/api/registration/CreateRegistration.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/registration/CreateRegistration.js +7 -0
- package/dist/mjs/types/Interface/api/registration/CreateRegistration.js.map +1 -1
- package/dist/mjs/types/Interface/api/shopify/InvoicesShopify.d.ts +5 -4
- package/dist/mjs/types/Interface/api/shopify/InvoicesShopify.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/shopify/InvoicesShopify.js +14 -0
- package/dist/mjs/types/Interface/api/shopify/InvoicesShopify.js.map +1 -1
- package/dist/mjs/types/Interface/models/IBankDedup.d.ts +85 -61
- package/dist/mjs/types/Interface/models/IBankDedup.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IBankDedup.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/BankDedup.ts +2 -2
- package/ts/api/resources/Refund.ts +1 -1
- package/ts/api/resources/Society.ts +0 -2
- package/ts/types/Interface/api/accountingFiles/queryAccountingFiles.ts +6 -0
- package/ts/types/Interface/api/config/ConfigType.ts +0 -3
- package/ts/types/Interface/api/registration/CreateRegistration.ts +5 -0
- package/ts/types/Interface/api/shopify/InvoicesShopify.ts +19 -4
- package/ts/types/Interface/models/IBankDedup.ts +89 -61
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IBankDedup.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IBankDedup.ts"],"names":[],"mappings":"","sourcesContent":["export
|
|
1
|
+
{"version":3,"file":"IBankDedup.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IBankDedup.ts"],"names":[],"mappings":"","sourcesContent":["export interface IBankDedupRequest {\n csv: string; // CSV en string (avec header: label,dateValue,credit,debit)\n initial: number; // solde initial\n target: number; // solde cible\n}\n\nexport interface BankTx {\n id: string; // id interne généré\n label: string;\n dateValue: string; // YYYY-MM-DD\n credit: number; // >= 0\n debit: number; // >= 0\n sign: 1 | -1; // 1 = crédit net, -1 = débit net\n amount: number; // valeur absolue du mouvement (en positif)\n cents: number; // amount en centimes pour calculs exacts\n}\n\nexport interface DuplicateGroup {\n id: string;\n transactions: BankTx[];\n amount: number; // montant commun\n cents: number; // montant en centimes\n sign: 1 | -1; // signe commun\n confidence: number; // score de confiance [0..1]\n method: 'exact' | 'fuzzy_high' | 'fuzzy_medium' | 'fuzzy_low'; // méthode de détection\n}\n\nexport interface IBankDedupResult {\n success: true;\n initial: number;\n target: number;\n finalRaw: number;\n finalAfterDedup: number;\n diffBefore: number; // target - finalRaw\n diffAfter: number; // target - finalAfterDedup (DOIT être exactement 0, aucune tolérance)\n removedGroups: {\n id: string;\n removedTransactions: {\n id: string;\n label: string;\n amount: number;\n dateValue: string;\n }[];\n keptTransaction: {\n id: string;\n label: string;\n amount: number;\n dateValue: string;\n };\n confidence: number;\n method: string;\n }[];\n removedCount: number;\n keptCount: number;\n csvDeduped: string;\n allGroups: {\n id: string;\n confidence: number;\n method: string;\n amount: number;\n transactionCount: number;\n isSelected: boolean;\n transactions: {\n id: string;\n label: string;\n dateValue: string;\n isKept: boolean;\n }[];\n }[];\n debug: {\n totalGroups: number;\n selectedGroups: number;\n iterations: number;\n strategiesUsed: string[];\n };\n}\n\nexport interface IBankDedupImpossible {\n success: false;\n reason: 'NO_EXACT_COMBINATION' | 'CSV_PARSE_ERROR' | 'INVALID_INPUT' | 'INSUFFICIENT_DUPLICATES';\n message: string;\n initial?: number;\n target?: number;\n finalRaw?: number;\n diffBefore?: number;\n bestAttempt?: {\n finalAfterDedup: number;\n diffAfter: number; // Sera != 0 puisque pas de solution exacte\n removedCount: number;\n };\n stats?: {\n totalTx?: number;\n totalGroups?: number;\n strategiesTried?: string[];\n };\n}\n\nexport type IBankDedupResponse = IBankDedupResult | IBankDedupImpossible;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.3.94-
|
|
3
|
+
"version": "1.3.94-7",
|
|
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",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IBankDedupRequest, IBankDedupResponse } from '../../types/Interface/models/IBankDedup';
|
|
2
2
|
import { Resource } from '../Resource';
|
|
3
3
|
|
|
4
4
|
export class BankDedup extends Resource {
|
|
5
5
|
/**
|
|
6
6
|
* Analyze bank transactions for deduplication
|
|
7
7
|
*/
|
|
8
|
-
public getAnalysis(body:
|
|
8
|
+
public getAnalysis(body: IBankDedupRequest): Promise<IBankDedupResponse> {
|
|
9
9
|
return this.axios.$post('/bank-dedup/analyze', body);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
@@ -9,7 +9,7 @@ export class Refund extends Resource {
|
|
|
9
9
|
return this.axios.$patch(`/refunds/${id}`, { ...params });
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
public getPaginated(query: QueryRefundPaginated, signal?: AbortSignal): Promise<BasePaginate<
|
|
12
|
+
public getPaginated(query: QueryRefundPaginated, signal?: AbortSignal): Promise<BasePaginate<IRefund>> {
|
|
13
13
|
return this.axios.$get('/refunds', { params: query, ...(signal ? { signal } : {}) });
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -29,10 +29,8 @@ import {
|
|
|
29
29
|
ReadSocietyUnpaidStats,
|
|
30
30
|
DataCustomersCsv,
|
|
31
31
|
ReadCurrentPrestations,
|
|
32
|
-
IComment,
|
|
33
32
|
} from '../../types';
|
|
34
33
|
import { CancelToken } from 'axios';
|
|
35
|
-
import { User } from './User';
|
|
36
34
|
|
|
37
35
|
export class Society extends Resource {
|
|
38
36
|
public get(params: QuerySociety): Promise<ISociety> {
|
|
@@ -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;
|
|
@@ -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
|
-
|
|
7
|
+
@IsOptional()
|
|
8
|
+
order?: string;
|
|
9
|
+
|
|
6
10
|
@ApiPropertyOptional()
|
|
7
|
-
|
|
11
|
+
@IsOptional()
|
|
12
|
+
limit?: number;
|
|
13
|
+
|
|
8
14
|
@ApiPropertyOptional()
|
|
9
|
-
|
|
15
|
+
@IsOptional()
|
|
16
|
+
ids?: number[];
|
|
17
|
+
|
|
18
|
+
@ApiPropertyOptional()
|
|
19
|
+
@IsOptional()
|
|
20
|
+
idSociety?: number;
|
|
21
|
+
|
|
10
22
|
@ApiPropertyOptional()
|
|
11
|
-
|
|
23
|
+
@IsOptional()
|
|
24
|
+
@IsBoolean()
|
|
25
|
+
@ToBoolean()
|
|
26
|
+
debug?: boolean;
|
|
12
27
|
}
|
|
@@ -1,70 +1,98 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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; // >= 0
|
|
12
|
+
debit: number; // >= 0
|
|
13
|
+
sign: 1 | -1; // 1 = crédit net, -1 = débit net
|
|
14
|
+
amount: number; // valeur absolue du mouvement (en positif)
|
|
15
|
+
cents: number; // amount en centimes pour calculs exacts
|
|
16
|
+
}
|
|
27
17
|
|
|
28
|
-
export
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
|
43
|
-
|
|
28
|
+
export interface IBankDedupResult {
|
|
29
|
+
success: true;
|
|
44
30
|
initial: number;
|
|
45
31
|
target: number;
|
|
46
|
-
|
|
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
|
+
removedTransactions: {
|
|
39
|
+
id: string;
|
|
40
|
+
label: string;
|
|
41
|
+
amount: number;
|
|
42
|
+
dateValue: string;
|
|
43
|
+
}[];
|
|
44
|
+
keptTransaction: {
|
|
45
|
+
id: string;
|
|
46
|
+
label: string;
|
|
47
|
+
amount: number;
|
|
48
|
+
dateValue: string;
|
|
49
|
+
};
|
|
50
|
+
confidence: number;
|
|
51
|
+
method: string;
|
|
52
|
+
}[];
|
|
53
|
+
removedCount: number;
|
|
54
|
+
keptCount: number;
|
|
55
|
+
csvDeduped: string;
|
|
56
|
+
allGroups: {
|
|
57
|
+
id: string;
|
|
58
|
+
confidence: number;
|
|
59
|
+
method: string;
|
|
60
|
+
amount: number;
|
|
61
|
+
transactionCount: number;
|
|
62
|
+
isSelected: boolean;
|
|
63
|
+
transactions: {
|
|
64
|
+
id: string;
|
|
65
|
+
label: string;
|
|
66
|
+
dateValue: string;
|
|
67
|
+
isKept: boolean;
|
|
68
|
+
}[];
|
|
69
|
+
}[];
|
|
70
|
+
debug: {
|
|
71
|
+
totalGroups: number;
|
|
72
|
+
selectedGroups: number;
|
|
73
|
+
iterations: number;
|
|
74
|
+
strategiesUsed: string[];
|
|
75
|
+
};
|
|
76
|
+
}
|
|
48
77
|
|
|
49
|
-
export
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
78
|
+
export interface IBankDedupImpossible {
|
|
79
|
+
success: false;
|
|
80
|
+
reason: 'NO_EXACT_COMBINATION' | 'CSV_PARSE_ERROR' | 'INVALID_INPUT' | 'INSUFFICIENT_DUPLICATES';
|
|
81
|
+
message: string;
|
|
82
|
+
initial?: number;
|
|
83
|
+
target?: number;
|
|
84
|
+
finalRaw?: number;
|
|
85
|
+
diffBefore?: number;
|
|
86
|
+
bestAttempt?: {
|
|
87
|
+
finalAfterDedup: number;
|
|
88
|
+
diffAfter: number; // Sera != 0 puisque pas de solution exacte
|
|
89
|
+
removedCount: number;
|
|
60
90
|
};
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
exact_selection?: CandidatePair[];
|
|
91
|
+
stats?: {
|
|
92
|
+
totalTx?: number;
|
|
93
|
+
totalGroups?: number;
|
|
94
|
+
strategiesTried?: string[];
|
|
66
95
|
};
|
|
67
|
-
|
|
68
|
-
};
|
|
96
|
+
}
|
|
69
97
|
|
|
70
|
-
export type
|
|
98
|
+
export type IBankDedupResponse = IBankDedupResult | IBankDedupImpossible;
|