@silexpert/core 1.3.88 → 1.3.90
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/types/Enum/AIPrompt.d.ts +1 -0
- package/dist/cjs/types/Enum/AIPrompt.d.ts.map +1 -1
- package/dist/cjs/types/Enum/AIPrompt.js +21 -0
- package/dist/cjs/types/Enum/AIPrompt.js.map +1 -1
- package/dist/cjs/types/Enum/BalanceSheet.d.ts +8 -1
- package/dist/cjs/types/Enum/BalanceSheet.d.ts.map +1 -1
- package/dist/cjs/types/Enum/BalanceSheet.js +19 -11
- package/dist/cjs/types/Enum/BalanceSheet.js.map +1 -1
- package/dist/cjs/types/Interface/api/bankStatement/QueryTransactionBankStatement.d.ts +2 -1
- package/dist/cjs/types/Interface/api/bankStatement/QueryTransactionBankStatement.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/bankStatement/QueryTransactionBankStatement.js +8 -0
- package/dist/cjs/types/Interface/api/bankStatement/QueryTransactionBankStatement.js.map +1 -1
- package/dist/cjs/types/Interface/api/ocr/OcrTransactions.d.ts +2 -1
- package/dist/cjs/types/Interface/api/ocr/OcrTransactions.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/ocr/OcrTransactions.js +8 -0
- package/dist/cjs/types/Interface/api/ocr/OcrTransactions.js.map +1 -1
- package/dist/cjs/types/Interface/api/ocr/OcrTypeTransactions.d.ts +4 -0
- package/dist/cjs/types/Interface/api/ocr/OcrTypeTransactions.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/ocr/OcrTypeTransactions.js +25 -0
- package/dist/cjs/types/Interface/api/ocr/OcrTypeTransactions.js.map +1 -1
- package/dist/mjs/types/Enum/AIPrompt.d.ts +1 -0
- package/dist/mjs/types/Enum/AIPrompt.d.ts.map +1 -1
- package/dist/mjs/types/Enum/AIPrompt.js +21 -0
- package/dist/mjs/types/Enum/AIPrompt.js.map +1 -1
- package/dist/mjs/types/Enum/BalanceSheet.d.ts +8 -1
- package/dist/mjs/types/Enum/BalanceSheet.d.ts.map +1 -1
- package/dist/mjs/types/Enum/BalanceSheet.js +19 -11
- package/dist/mjs/types/Enum/BalanceSheet.js.map +1 -1
- package/dist/mjs/types/Interface/api/bankStatement/QueryTransactionBankStatement.d.ts +2 -1
- package/dist/mjs/types/Interface/api/bankStatement/QueryTransactionBankStatement.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/bankStatement/QueryTransactionBankStatement.js +10 -1
- package/dist/mjs/types/Interface/api/bankStatement/QueryTransactionBankStatement.js.map +1 -1
- package/dist/mjs/types/Interface/api/ocr/OcrTransactions.d.ts +2 -1
- package/dist/mjs/types/Interface/api/ocr/OcrTransactions.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/ocr/OcrTransactions.js +10 -1
- package/dist/mjs/types/Interface/api/ocr/OcrTransactions.js.map +1 -1
- package/dist/mjs/types/Interface/api/ocr/OcrTypeTransactions.d.ts +4 -0
- package/dist/mjs/types/Interface/api/ocr/OcrTypeTransactions.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/ocr/OcrTypeTransactions.js +25 -1
- package/dist/mjs/types/Interface/api/ocr/OcrTypeTransactions.js.map +1 -1
- package/package.json +1 -1
- package/ts/types/Enum/AIPrompt.ts +22 -0
- package/ts/types/Enum/BalanceSheet.ts +19 -11
- package/ts/types/Interface/api/bankStatement/QueryTransactionBankStatement.ts +8 -2
- package/ts/types/Interface/api/ocr/OcrTransactions.ts +8 -2
- package/ts/types/Interface/api/ocr/OcrTypeTransactions.ts +12 -0
|
@@ -1,2 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { IsNumber, IsString } from 'class-validator';
|
|
11
|
+
import { ApiProperty } from '../../../../utils';
|
|
12
|
+
export class MistralBankAccountSoldeDetails {
|
|
13
|
+
dateValue;
|
|
14
|
+
amount;
|
|
15
|
+
}
|
|
16
|
+
__decorate([
|
|
17
|
+
ApiProperty(),
|
|
18
|
+
IsString(),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], MistralBankAccountSoldeDetails.prototype, "dateValue", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
ApiProperty(),
|
|
23
|
+
IsNumber(),
|
|
24
|
+
__metadata("design:type", Number)
|
|
25
|
+
], MistralBankAccountSoldeDetails.prototype, "amount", void 0);
|
|
2
26
|
//# sourceMappingURL=OcrTypeTransactions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OcrTypeTransactions.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/ocr/OcrTypeTransactions.ts"],"names":[],"mappings":"","sourcesContent":["import { OcrType } from '../../../Enum/Ocr';\n\nexport type OcrTransactionDetails = {\n dateValue: string;\n label: string | null;\n debit: number;\n credit: number;\n};\n\nexport type OcrResponseMessage = {\n metadata: string;\n s3_file_name: string;\n};\n\nexport type OcrResponseParsed = {\n Type: OcrType;\n MessageId: string;\n TopicArn: string;\n Message: string;\n Timestamp: string;\n SignatureVersion: string;\n Signature: string;\n SigningCertURL: string;\n UnsubscribeURL: string;\n SubscribeURL?: string;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"OcrTypeTransactions.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/ocr/OcrTypeTransactions.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AA4BhD,MAAM,OAAO,8BAA8B;IAGzC,SAAS,CAAS;IAIlB,MAAM,CAAS;CAChB;AALC;IAFC,WAAW,EAAE;IACb,QAAQ,EAAE;;iEACO;AAIlB;IAFC,WAAW,EAAE;IACb,QAAQ,EAAE;;8DACI","sourcesContent":["import { IsNumber, IsString } from 'class-validator';\nimport { ApiProperty } from '../../../../utils';\nimport { OcrType } from '../../../Enum/Ocr';\n\nexport type OcrTransactionDetails = {\n dateValue: string;\n label: string | null;\n debit: number;\n credit: number;\n};\n\nexport type OcrResponseMessage = {\n metadata: string;\n s3_file_name: string;\n};\n\nexport type OcrResponseParsed = {\n Type: OcrType;\n MessageId: string;\n TopicArn: string;\n Message: string;\n Timestamp: string;\n SignatureVersion: string;\n Signature: string;\n SigningCertURL: string;\n UnsubscribeURL: string;\n SubscribeURL?: string;\n};\n\nexport class MistralBankAccountSoldeDetails {\n @ApiProperty()\n @IsString()\n dateValue: string;\n\n @ApiProperty()\n @IsNumber()\n amount: number;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.90",
|
|
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",
|
|
@@ -2,6 +2,7 @@ export enum AIPromptKey {
|
|
|
2
2
|
BANK_STATEMENT = 'bank_statement',
|
|
3
3
|
BANK_STATEMENT_PERIOD = 'bank_statement_period',
|
|
4
4
|
BANK_STATEMENT_FILE_NAME = 'bank_statement_file_name',
|
|
5
|
+
BANK_STATEMENT_SOLDE_INFOS = 'bank_statement_solde_infos',
|
|
5
6
|
ASK_COLLABORATOR = 'ask_collaborator',
|
|
6
7
|
}
|
|
7
8
|
|
|
@@ -31,6 +32,27 @@ export const AIPrompt: Record<AIPromptKey, AIPromptInfo> = {
|
|
|
31
32
|
Assurez-vous que le JSON soit strictement conforme à ce format, sans aucun commentaire ou texte supplémentaire.
|
|
32
33
|
`,
|
|
33
34
|
},
|
|
35
|
+
[AIPromptKey.BANK_STATEMENT_SOLDE_INFOS]: {
|
|
36
|
+
userPrompt:
|
|
37
|
+
'Voici des lignes issues d’un relevé de compte bancaire (cela peut être un relevé français). Pouvez-vous extraire les données concernant le solde précédent compte bancaire ?',
|
|
38
|
+
systemPrompt: `
|
|
39
|
+
Analysez ce relevé de compte bancaire et extrayez toutes les infos concernant le montant des solde précédents du compte bancaire sous forme d'un objet JSON structuré.
|
|
40
|
+
Le relevé peut contenir des informations telles que la date du solde précédent et le montant du solde qui doit être un nombre.
|
|
41
|
+
Garder exactement le même ordre des différentes dates que dans le relevé.
|
|
42
|
+
Si plusieurs solde sont trouvés, les retourner tous.
|
|
43
|
+
Le format attendu est le suivant :
|
|
44
|
+
[
|
|
45
|
+
{
|
|
46
|
+
"dateValue": string (format : YYYY-MM-DD correspondant à la date du ou des soldes précédents),
|
|
47
|
+
"amount": number,
|
|
48
|
+
},
|
|
49
|
+
...
|
|
50
|
+
]
|
|
51
|
+
Assurez-vous que le JSON soit strictement conforme à ce format, sans aucun commentaire ou texte supplémentaire.
|
|
52
|
+
Si Aucune date n'est trouvée, retourner un tableau vide.
|
|
53
|
+
|
|
54
|
+
`,
|
|
55
|
+
},
|
|
34
56
|
[AIPromptKey.BANK_STATEMENT_PERIOD]: {
|
|
35
57
|
userPrompt: '',
|
|
36
58
|
systemPrompt:
|
|
@@ -32,6 +32,7 @@ export enum BalanceSheetState {
|
|
|
32
32
|
PROCESSING_ITEMS_IN_PROGRESS = 27,
|
|
33
33
|
ABANDONED_FORECAST = 28,
|
|
34
34
|
ESTABLISH_REFUSED = 29,
|
|
35
|
+
STANDBY = 30,
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
export const BalanceSheetDetails = [
|
|
@@ -158,6 +159,13 @@ export const BalanceSheetDetails = [
|
|
|
158
159
|
['facturation', 'manager'],
|
|
159
160
|
],
|
|
160
161
|
},
|
|
162
|
+
{
|
|
163
|
+
value: BalanceSheetState.STANDBY,
|
|
164
|
+
text: 'Standby',
|
|
165
|
+
color: 'grey lighten-1',
|
|
166
|
+
textColor: 'grey--text',
|
|
167
|
+
forRoles: [['admin'], ['super_admin'], ['controle_interne']],
|
|
168
|
+
},
|
|
161
169
|
{
|
|
162
170
|
text: 'Impayé',
|
|
163
171
|
value: BalanceSheetState.UNPAID,
|
|
@@ -224,14 +232,14 @@ export const BalanceSheetDetails = [
|
|
|
224
232
|
forRoles: [['front_office'], ['expert']],
|
|
225
233
|
},
|
|
226
234
|
{
|
|
227
|
-
text:
|
|
235
|
+
text: "Accepté SIE en l'état",
|
|
228
236
|
value: BalanceSheetState.ACCEPTED_BY_SIE_IN_STATE,
|
|
229
237
|
color: 'green darken-3',
|
|
230
238
|
colorText: 'green--text',
|
|
231
239
|
forRoles: [['front_office'], ['expert']],
|
|
232
240
|
},
|
|
233
241
|
{
|
|
234
|
-
text:
|
|
242
|
+
text: "Refus d'établir",
|
|
235
243
|
value: BalanceSheetState.ESTABLISH_REFUSED,
|
|
236
244
|
color: 'orange darken-1',
|
|
237
245
|
colorText: 'orange--text text--darken-1',
|
|
@@ -262,7 +270,7 @@ export const ForecastBalanceSheetDetails = [
|
|
|
262
270
|
forRoles: [['front_office'], ['expert']],
|
|
263
271
|
},
|
|
264
272
|
{
|
|
265
|
-
text:
|
|
273
|
+
text: "Prévisionnel d' abandonné",
|
|
266
274
|
value: BalanceSheetState.ABANDONED_FORECAST,
|
|
267
275
|
color: 'green darken-3',
|
|
268
276
|
colorText: 'green--text',
|
|
@@ -320,7 +328,7 @@ export const BALANCE_SHEET_LIST_ACTIVE: BalanceSheetList = [
|
|
|
320
328
|
isSubcategory: true,
|
|
321
329
|
fields: [
|
|
322
330
|
{
|
|
323
|
-
name:
|
|
331
|
+
name: "Frais d'établissement",
|
|
324
332
|
accounts: ['201'],
|
|
325
333
|
accountsDeducted: ['2801'],
|
|
326
334
|
total: 0,
|
|
@@ -409,7 +417,7 @@ export const BALANCE_SHEET_LIST_ACTIVE: BalanceSheetList = [
|
|
|
409
417
|
accountsDeducted: ['2967', '2968'],
|
|
410
418
|
},
|
|
411
419
|
{
|
|
412
|
-
name:
|
|
420
|
+
name: "Titres immobilisés de l'activité de portefeuille",
|
|
413
421
|
accounts: ['273'],
|
|
414
422
|
accountsDeducted: ['2973'],
|
|
415
423
|
},
|
|
@@ -565,7 +573,7 @@ export const BALANCE_SHEET_LIST_ACTIVE: BalanceSheetList = [
|
|
|
565
573
|
type: 'active',
|
|
566
574
|
},
|
|
567
575
|
{
|
|
568
|
-
name:
|
|
576
|
+
name: "Charges constatées d'avance",
|
|
569
577
|
key: 'establishedInAdvance',
|
|
570
578
|
accounts: ['486'],
|
|
571
579
|
},
|
|
@@ -633,7 +641,7 @@ export const BALANCE_SHEET_LIST_PASSIVE: BalanceSheetList = [
|
|
|
633
641
|
total: 0,
|
|
634
642
|
},
|
|
635
643
|
{
|
|
636
|
-
name:
|
|
644
|
+
name: "Primes d'émission, de fusion, d'apport",
|
|
637
645
|
key: 'issuePremiums',
|
|
638
646
|
accounts: ['104'],
|
|
639
647
|
isSubcategory: true,
|
|
@@ -647,7 +655,7 @@ export const BALANCE_SHEET_LIST_PASSIVE: BalanceSheetList = [
|
|
|
647
655
|
total: 0,
|
|
648
656
|
},
|
|
649
657
|
{
|
|
650
|
-
name:
|
|
658
|
+
name: "Ecart d'équivalence",
|
|
651
659
|
key: 'equivalenceGap',
|
|
652
660
|
accounts: ['107'],
|
|
653
661
|
isSubcategory: true,
|
|
@@ -687,14 +695,14 @@ export const BALANCE_SHEET_LIST_PASSIVE: BalanceSheetList = [
|
|
|
687
695
|
total: 0,
|
|
688
696
|
},
|
|
689
697
|
{
|
|
690
|
-
name:
|
|
698
|
+
name: "Résultat de l'exercice (bénéfice ou perte)",
|
|
691
699
|
key: 'resultExercice',
|
|
692
700
|
accounts: ['12'], // comptes 6 - 7
|
|
693
701
|
isSubcategory: true,
|
|
694
702
|
total: 0,
|
|
695
703
|
},
|
|
696
704
|
{
|
|
697
|
-
name:
|
|
705
|
+
name: "Subventions d'investissement",
|
|
698
706
|
key: 'subsidies',
|
|
699
707
|
accounts: ['13'],
|
|
700
708
|
isSubcategory: true,
|
|
@@ -842,7 +850,7 @@ export const BALANCE_SHEET_LIST_PASSIVE: BalanceSheetList = [
|
|
|
842
850
|
type: 'passive',
|
|
843
851
|
},
|
|
844
852
|
{
|
|
845
|
-
name:
|
|
853
|
+
name: "Produits constatés d'avance",
|
|
846
854
|
key: 'advanceProducts',
|
|
847
855
|
accounts: ['487', '489'],
|
|
848
856
|
isSubcategory: true,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { IsNumber } from 'class-validator';
|
|
1
|
+
import { IsArray, IsNumber } from 'class-validator';
|
|
2
2
|
import { ApiProperty } from '../../../..';
|
|
3
|
-
import { OcrTransactionDetails } from '../ocr/OcrTypeTransactions';
|
|
3
|
+
import { MistralBankAccountSoldeDetails, OcrTransactionDetails } from '../ocr/OcrTypeTransactions';
|
|
4
|
+
import { Type } from 'class-transformer';
|
|
4
5
|
|
|
5
6
|
export class QueryTransactionBankStatement {
|
|
6
7
|
@ApiProperty()
|
|
@@ -9,4 +10,9 @@ export class QueryTransactionBankStatement {
|
|
|
9
10
|
@ApiProperty()
|
|
10
11
|
@IsNumber()
|
|
11
12
|
idBankAccount: number;
|
|
13
|
+
|
|
14
|
+
@ApiProperty()
|
|
15
|
+
@IsArray()
|
|
16
|
+
@Type(() => MistralBankAccountSoldeDetails)
|
|
17
|
+
soldes: MistralBankAccountSoldeDetails[];
|
|
12
18
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { IsBoolean, IsOptional, IsString } from 'class-validator';
|
|
1
|
+
import { IsArray, IsBoolean, IsOptional, IsString } from 'class-validator';
|
|
2
2
|
import { ApiProperty, ApiPropertyOptional } from '../../../..';
|
|
3
3
|
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
4
|
-
import { OcrTransactionDetails } from './OcrTypeTransactions';
|
|
4
|
+
import { OcrTransactionDetails, MistralBankAccountSoldeDetails } from './OcrTypeTransactions';
|
|
5
|
+
import { Type } from 'class-transformer';
|
|
5
6
|
|
|
6
7
|
export class OcrTransactions {
|
|
7
8
|
@ApiPropertyOptional()
|
|
@@ -25,4 +26,9 @@ export class OcrTransactions {
|
|
|
25
26
|
@IsOptional()
|
|
26
27
|
@IsString()
|
|
27
28
|
error?: string;
|
|
29
|
+
|
|
30
|
+
@ApiPropertyOptional()
|
|
31
|
+
@IsArray()
|
|
32
|
+
@Type(() => MistralBankAccountSoldeDetails)
|
|
33
|
+
soldes?: MistralBankAccountSoldeDetails[];
|
|
28
34
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { IsNumber, IsString } from 'class-validator';
|
|
2
|
+
import { ApiProperty } from '../../../../utils';
|
|
1
3
|
import { OcrType } from '../../../Enum/Ocr';
|
|
2
4
|
|
|
3
5
|
export type OcrTransactionDetails = {
|
|
@@ -24,3 +26,13 @@ export type OcrResponseParsed = {
|
|
|
24
26
|
UnsubscribeURL: string;
|
|
25
27
|
SubscribeURL?: string;
|
|
26
28
|
};
|
|
29
|
+
|
|
30
|
+
export class MistralBankAccountSoldeDetails {
|
|
31
|
+
@ApiProperty()
|
|
32
|
+
@IsString()
|
|
33
|
+
dateValue: string;
|
|
34
|
+
|
|
35
|
+
@ApiProperty()
|
|
36
|
+
@IsNumber()
|
|
37
|
+
amount: number;
|
|
38
|
+
}
|