@silexpert/core 0.4.126 → 0.4.127

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 (90) hide show
  1. package/es/api/resources/MachineLearning.d.ts +6 -0
  2. package/es/api/resources/MachineLearning.d.ts.map +1 -0
  3. package/es/api/resources/MachineLearning.js +7 -0
  4. package/es/api/resources/MachineLearning.js.map +1 -0
  5. package/es/api/resources.d.ts +2 -0
  6. package/es/api/resources.d.ts.map +1 -1
  7. package/es/api/resources.js +2 -0
  8. package/es/api/resources.js.map +1 -1
  9. package/es/types/Enum/ImmobilizationType.d.ts +60 -0
  10. package/es/types/Enum/ImmobilizationType.d.ts.map +1 -1
  11. package/es/types/Enum/ImmobilizationType.js +60 -0
  12. package/es/types/Enum/ImmobilizationType.js.map +1 -1
  13. package/es/types/Enum/MachineLearning.d.ts +2 -0
  14. package/es/types/Enum/MachineLearning.d.ts.map +1 -0
  15. package/es/types/Enum/MachineLearning.js +2 -0
  16. package/es/types/Enum/MachineLearning.js.map +1 -0
  17. package/es/types/Interface/api/bankStatement/QueryTransactionBankStatement.d.ts +1 -1
  18. package/es/types/Interface/api/bankStatement/QueryTransactionBankStatement.d.ts.map +1 -1
  19. package/es/types/Interface/api/bankStatement/QueryTransactionBankStatement.js.map +1 -1
  20. package/es/types/Interface/api/machineLearning/CreateMachineLearningAnnotation.d.ts +10 -0
  21. package/es/types/Interface/api/machineLearning/CreateMachineLearningAnnotation.d.ts.map +1 -0
  22. package/es/types/Interface/api/machineLearning/CreateMachineLearningAnnotation.js +75 -0
  23. package/es/types/Interface/api/machineLearning/CreateMachineLearningAnnotation.js.map +1 -0
  24. package/es/types/Interface/api/machineLearning/ResultCreateMachineLearningAnnotation.d.ts +9 -0
  25. package/es/types/Interface/api/machineLearning/ResultCreateMachineLearningAnnotation.d.ts.map +1 -0
  26. package/es/types/Interface/api/machineLearning/ResultCreateMachineLearningAnnotation.js +2 -0
  27. package/es/types/Interface/api/machineLearning/ResultCreateMachineLearningAnnotation.js.map +1 -0
  28. package/es/types/Interface/models/IAccount.d.ts +2 -0
  29. package/es/types/Interface/models/IAccount.d.ts.map +1 -1
  30. package/es/types/Interface/models/IAccount.js.map +1 -1
  31. package/es/types/Interface/models/IAccountingTransaction.d.ts +2 -0
  32. package/es/types/Interface/models/IAccountingTransaction.d.ts.map +1 -1
  33. package/es/types/Interface/models/IAccountingTransaction.js.map +1 -1
  34. package/es/types/Interface/models/IApiError.d.ts +1 -0
  35. package/es/types/Interface/models/IApiError.d.ts.map +1 -1
  36. package/es/types/Interface/models/IApiError.js +1 -0
  37. package/es/types/Interface/models/IApiError.js.map +1 -1
  38. package/es/types/Interface/models/IMachineLearningResult.d.ts +12 -0
  39. package/es/types/Interface/models/IMachineLearningResult.d.ts.map +1 -0
  40. package/es/types/Interface/models/IMachineLearningResult.js +2 -0
  41. package/es/types/Interface/models/IMachineLearningResult.js.map +1 -0
  42. package/es/types/Interface/models/IPayment.d.ts +2 -0
  43. package/es/types/Interface/models/IPayment.d.ts.map +1 -1
  44. package/es/types/Interface/models/IPayment.js.map +1 -1
  45. package/es/types/Interface/models/ISocietySocial.d.ts +3 -0
  46. package/es/types/Interface/models/ISocietySocial.d.ts.map +1 -1
  47. package/es/types/Interface/models/ISocietySocial.js.map +1 -1
  48. package/es/types/index.d.ts +4 -0
  49. package/es/types/index.d.ts.map +1 -1
  50. package/es/types/index.js +4 -0
  51. package/es/types/index.js.map +1 -1
  52. package/es/utils/cerfa.js +3 -3
  53. package/es/utils/cerfa.js.map +1 -1
  54. package/js/api/resources/MachineLearning.js +18 -0
  55. package/js/api/resources/MachineLearning.js.map +1 -0
  56. package/js/api/resources.js +4 -1
  57. package/js/api/resources.js.map +1 -1
  58. package/js/types/Enum/ImmobilizationType.js +60 -0
  59. package/js/types/Enum/ImmobilizationType.js.map +1 -1
  60. package/js/types/Enum/MachineLearning.js +7 -0
  61. package/js/types/Enum/MachineLearning.js.map +1 -0
  62. package/js/types/Interface/api/bankStatement/QueryTransactionBankStatement.js.map +1 -1
  63. package/js/types/Interface/api/machineLearning/CreateMachineLearningAnnotation.js +63 -0
  64. package/js/types/Interface/api/machineLearning/CreateMachineLearningAnnotation.js.map +1 -0
  65. package/js/types/Interface/api/machineLearning/ResultCreateMachineLearningAnnotation.js +6 -0
  66. package/js/types/Interface/api/machineLearning/ResultCreateMachineLearningAnnotation.js.map +1 -0
  67. package/js/types/Interface/models/IApiError.js +2 -1
  68. package/js/types/Interface/models/IApiError.js.map +1 -1
  69. package/js/types/Interface/models/IMachineLearningResult.js +6 -0
  70. package/js/types/Interface/models/IMachineLearningResult.js.map +1 -0
  71. package/js/types/index.js +48 -0
  72. package/js/types/index.js.map +1 -1
  73. package/js/utils/cerfa.js +3 -3
  74. package/js/utils/cerfa.js.map +1 -1
  75. package/package.json +1 -1
  76. package/ts/api/resources/MachineLearning.ts +8 -0
  77. package/ts/api/resources.ts +2 -0
  78. package/ts/types/Enum/ImmobilizationType.ts +60 -1
  79. package/ts/types/Enum/MachineLearning.ts +1 -0
  80. package/ts/types/Interface/api/bankStatement/QueryTransactionBankStatement.ts +1 -1
  81. package/ts/types/Interface/api/machineLearning/CreateMachineLearningAnnotation.ts +60 -0
  82. package/ts/types/Interface/api/machineLearning/ResultCreateMachineLearningAnnotation.ts +9 -0
  83. package/ts/types/Interface/models/IAccount.ts +2 -0
  84. package/ts/types/Interface/models/IAccountingTransaction.ts +2 -0
  85. package/ts/types/Interface/models/IApiError.ts +2 -0
  86. package/ts/types/Interface/models/IMachineLearningResult.ts +14 -0
  87. package/ts/types/Interface/models/IPayment.ts +2 -0
  88. package/ts/types/Interface/models/ISocietySocial.ts +3 -0
  89. package/ts/types/index.ts +4 -0
  90. package/ts/utils/cerfa.ts +3 -3
package/js/utils/cerfa.js CHANGED
@@ -11,9 +11,9 @@ var _GlobalRegime = require("../types/Enum/GlobalRegime");
11
11
  function retrieveCerfaFromSocietyInformations(idLegalForm, idTaxSystem, idFiscalRegime, profitsType) {
12
12
  const globalRegimes = Object.values(_GlobalRegime.GlobalRegime);
13
13
  const selectedGlobalRegime = globalRegimes.find(gr => gr.idLegalForms.includes(idLegalForm));
14
- if (!selectedGlobalRegime) throw Error('Missing informations to retrieve CERFA informations');
14
+ if (!selectedGlobalRegime) throw new Error('Missing informations to retrieve CERFA informations');
15
15
  const choiceIndex = selectedGlobalRegime.choices.findIndex(sgr => sgr.idFiscalRegime === idFiscalRegime && sgr.profitsType === profitsType && sgr.idTaxSystem === idTaxSystem);
16
- if (choiceIndex < 0) throw Error('Missing informations to retrieve CERFA informations');
16
+ if (choiceIndex < 0) throw new Error('Missing informations to retrieve CERFA informations');
17
17
  const {
18
18
  declaration,
19
19
  annexe
@@ -27,7 +27,7 @@ function retrieveCerfaFromSocietyInformations(idLegalForm, idTaxSystem, idFiscal
27
27
  function retreiveChoicesDependingLegalForm(idLegalForm) {
28
28
  const globalRegimes = Object.values(_GlobalRegime.GlobalRegime);
29
29
  const selectedGlobalRegime = globalRegimes.find(gr => gr.idLegalForms.includes(idLegalForm));
30
- if (!selectedGlobalRegime) throw Error(`LegalForm #${idLegalForm} not implemented`);
30
+ if (!selectedGlobalRegime) throw new Error(`LegalForm #${idLegalForm} not implemented`);
31
31
  return selectedGlobalRegime;
32
32
  }
33
33
  //# sourceMappingURL=cerfa.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../ts/utils/cerfa.ts"],"names":[],"mappings":";;;;;QAIgB,oC,GAAA,oC;QAeA,iC,GAAA,iC;;AAlBhB;;AAGM,SAAU,oCAAV,CAA+C,WAA/C,EAAoE,WAApE,EAA4F,cAA5F,EAA0H,WAA1H,EAAkJ;AACtJ,QAAM,aAAa,GAAG,MAAM,CAAC,MAAP,CAAc,0BAAd,CAAtB;AACA,QAAM,oBAAoB,GAAG,aAAa,CAAC,IAAd,CAAoB,EAAD,IAAQ,EAAE,CAAC,YAAH,CAAgB,QAAhB,CAAyB,WAAzB,CAA3B,CAA7B;AAEA,MAAI,CAAC,oBAAL,EAA2B,MAAM,KAAK,CAAC,qDAAD,CAAX;AAE3B,QAAM,WAAW,GAAG,oBAAoB,CAAC,OAArB,CAA6B,SAA7B,CAAwC,GAAD,IAAS,GAAG,CAAC,cAAJ,KAAuB,cAAvB,IAAyC,GAAG,CAAC,WAAJ,KAAoB,WAA7D,IAA4E,GAAG,CAAC,WAAJ,KAAoB,WAAhJ,CAApB;AAEA,MAAI,WAAW,GAAG,CAAlB,EAAqB,MAAM,KAAK,CAAC,qDAAD,CAAX;AAErB,QAAM;AAAE,IAAA,WAAF;AAAe,IAAA;AAAf,MAA0B,oBAAoB,CAAC,OAArB,CAA6B,WAA7B,CAAhC;AAEA,SAAO;AAAE,IAAA,WAAF;AAAe,IAAA,KAAK,EAAE,MAAM,KAAA,IAAN,IAAA,MAAM,KAAA,KAAA,CAAN,GAAA,MAAA,GAAU;AAAhC,GAAP;AACD;;AAEK,SAAU,iCAAV,CAA4C,WAA5C,EAA+D;AACnE,QAAM,aAAa,GAAG,MAAM,CAAC,MAAP,CAAc,0BAAd,CAAtB;AACA,QAAM,oBAAoB,GAAG,aAAa,CAAC,IAAd,CAAoB,EAAD,IAAQ,EAAE,CAAC,YAAH,CAAgB,QAAhB,CAAyB,WAAzB,CAA3B,CAA7B;AAEA,MAAI,CAAC,oBAAL,EAA2B,MAAM,KAAK,CAAC,cAAc,WAAW,kBAA1B,CAAX;AAC3B,SAAO,oBAAP;AACD","sourcesContent":["import { ReadCerfaToComplete } from '../types/Interface/api/cerfa/ReadCerfa';\nimport { GlobalRegime, GlobalRegimeTypeContent } from '../types/Enum/GlobalRegime';\nimport { ProfitsType, FiscalRegime, TaxSystem } from '../types';\n\nexport function retrieveCerfaFromSocietyInformations(idLegalForm: number, idTaxSystem: TaxSystem, idFiscalRegime: FiscalRegime, profitsType: ProfitsType):ReadCerfaToComplete {\n const globalRegimes = Object.values(GlobalRegime);\n const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));\n\n if (!selectedGlobalRegime) throw Error('Missing informations to retrieve CERFA informations');\n\n const choiceIndex = selectedGlobalRegime.choices.findIndex((sgr) => sgr.idFiscalRegime === idFiscalRegime && sgr.profitsType === profitsType && sgr.idTaxSystem === idTaxSystem);\n\n if (choiceIndex < 0) throw Error('Missing informations to retrieve CERFA informations');\n\n const { declaration, annexe } = selectedGlobalRegime.choices[choiceIndex];\n\n return { declaration, annex: annexe ?? null };\n}\n\nexport function retreiveChoicesDependingLegalForm(idLegalForm: number): GlobalRegimeTypeContent {\n const globalRegimes = Object.values(GlobalRegime);\n const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));\n\n if (!selectedGlobalRegime) throw Error(`LegalForm #${idLegalForm} not implemented`);\n return selectedGlobalRegime;\n}"],"sourceRoot":"","file":"cerfa.js"}
1
+ {"version":3,"sources":["../../ts/utils/cerfa.ts"],"names":[],"mappings":";;;;;QAIgB,oC,GAAA,oC;QAeA,iC,GAAA,iC;;AAlBhB;;AAGM,SAAU,oCAAV,CAA+C,WAA/C,EAAoE,WAApE,EAA4F,cAA5F,EAA0H,WAA1H,EAAkJ;AACtJ,QAAM,aAAa,GAAG,MAAM,CAAC,MAAP,CAAc,0BAAd,CAAtB;AACA,QAAM,oBAAoB,GAAG,aAAa,CAAC,IAAd,CAAoB,EAAD,IAAQ,EAAE,CAAC,YAAH,CAAgB,QAAhB,CAAyB,WAAzB,CAA3B,CAA7B;AAEA,MAAI,CAAC,oBAAL,EAA2B,MAAM,IAAI,KAAJ,CAAU,qDAAV,CAAN;AAE3B,QAAM,WAAW,GAAG,oBAAoB,CAAC,OAArB,CAA6B,SAA7B,CAAwC,GAAD,IAAS,GAAG,CAAC,cAAJ,KAAuB,cAAvB,IAAyC,GAAG,CAAC,WAAJ,KAAoB,WAA7D,IAA4E,GAAG,CAAC,WAAJ,KAAoB,WAAhJ,CAApB;AAEA,MAAI,WAAW,GAAG,CAAlB,EAAqB,MAAM,IAAI,KAAJ,CAAU,qDAAV,CAAN;AAErB,QAAM;AAAE,IAAA,WAAF;AAAe,IAAA;AAAf,MAA0B,oBAAoB,CAAC,OAArB,CAA6B,WAA7B,CAAhC;AAEA,SAAO;AAAE,IAAA,WAAF;AAAe,IAAA,KAAK,EAAE,MAAM,KAAA,IAAN,IAAA,MAAM,KAAA,KAAA,CAAN,GAAA,MAAA,GAAU;AAAhC,GAAP;AACD;;AAEK,SAAU,iCAAV,CAA4C,WAA5C,EAA+D;AACnE,QAAM,aAAa,GAAG,MAAM,CAAC,MAAP,CAAc,0BAAd,CAAtB;AACA,QAAM,oBAAoB,GAAG,aAAa,CAAC,IAAd,CAAoB,EAAD,IAAQ,EAAE,CAAC,YAAH,CAAgB,QAAhB,CAAyB,WAAzB,CAA3B,CAA7B;AAEA,MAAI,CAAC,oBAAL,EAA2B,MAAM,IAAI,KAAJ,CAAU,cAAc,WAAW,kBAAnC,CAAN;AAC3B,SAAO,oBAAP;AACD","sourcesContent":["import { ReadCerfaToComplete } from '../types/Interface/api/cerfa/ReadCerfa';\nimport { GlobalRegime, GlobalRegimeTypeContent } from '../types/Enum/GlobalRegime';\nimport { ProfitsType, FiscalRegime, TaxSystem } from '../types';\n\nexport function retrieveCerfaFromSocietyInformations(idLegalForm: number, idTaxSystem: TaxSystem, idFiscalRegime: FiscalRegime, profitsType: ProfitsType):ReadCerfaToComplete {\n const globalRegimes = Object.values(GlobalRegime);\n const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));\n\n if (!selectedGlobalRegime) throw new Error('Missing informations to retrieve CERFA informations');\n\n const choiceIndex = selectedGlobalRegime.choices.findIndex((sgr) => sgr.idFiscalRegime === idFiscalRegime && sgr.profitsType === profitsType && sgr.idTaxSystem === idTaxSystem);\n\n if (choiceIndex < 0) throw new Error('Missing informations to retrieve CERFA informations');\n\n const { declaration, annexe } = selectedGlobalRegime.choices[choiceIndex];\n\n return { declaration, annex: annexe ?? null };\n}\n\nexport function retreiveChoicesDependingLegalForm(idLegalForm: number): GlobalRegimeTypeContent {\n const globalRegimes = Object.values(GlobalRegime);\n const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));\n\n if (!selectedGlobalRegime) throw new Error(`LegalForm #${idLegalForm} not implemented`);\n return selectedGlobalRegime;\n}"],"sourceRoot":"","file":"cerfa.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "0.4.126",
3
+ "version": "0.4.127",
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": "js/index.js",
@@ -0,0 +1,8 @@
1
+ import { ResultCreateMachineLearningAnnotation } from '../..';
2
+ import { Resource } from '../Resource';
3
+
4
+ export class MachineLearning extends Resource {
5
+ machineLearningAnnotation(): Promise<ResultCreateMachineLearningAnnotation> {
6
+ return this.axios.$post('/transactions/machine-learning');
7
+ }
8
+ }
@@ -55,6 +55,7 @@ import { AccountingIncome } from './resources/AccountingIncome';
55
55
  import { BankStatement } from './resources/BankStatement';
56
56
  import { ShareCapital } from './resources/shareCapital';
57
57
  import { Closing } from './resources/Closing';
58
+ import { MachineLearning } from './resources/MachineLearning';
58
59
 
59
60
  export const resources = {
60
61
  simulation: Simulation,
@@ -114,4 +115,5 @@ export const resources = {
114
115
  bankStatement: BankStatement,
115
116
  shareCapital: ShareCapital,
116
117
  closing: Closing,
118
+ machineLearning: MachineLearning,
117
119
  };
@@ -431,7 +431,66 @@ export const ImmobilizationType = {
431
431
  idAccountAmortization: 333,
432
432
  idAccountTrash: 929,
433
433
  },
434
-
434
+ INSTALLATIONS_COMPLEXES_SPECIALISEES: {
435
+ id: 37,
436
+ isIncorporeal: false,
437
+ isDepreciable: true,
438
+ amortizationMethod: 'yearBased',
439
+ amortizationRequest: null,
440
+ amortizationDuration: 8,
441
+ idAccount: 828,
442
+ idAccountEndownment: 335,
443
+ idAccountAmortization: 51715,
444
+ idAccountTrash: 929,
445
+ },
446
+ INSTALLATIONS_A_CARACTERE_SPECIFIQUE: {
447
+ id: 38,
448
+ isIncorporeal: false,
449
+ isDepreciable: true,
450
+ amortizationMethod: 'yearBased',
451
+ amortizationRequest: null,
452
+ amortizationDuration: 8,
453
+ idAccount: 831,
454
+ idAccountEndownment: 335,
455
+ idAccountAmortization: 51716,
456
+ idAccountTrash: 929,
457
+ },
458
+ MATERIEL_INDUSTRIEL: {
459
+ id: 39,
460
+ isIncorporeal: false,
461
+ isDepreciable: true,
462
+ amortizationMethod: 'yearBased',
463
+ amortizationRequest: null,
464
+ amortizationDuration: 5,
465
+ idAccount: 834,
466
+ idAccountEndownment: 335,
467
+ idAccountAmortization: 51717,
468
+ idAccountTrash: 929,
469
+ },
470
+ OUTILLAGE_INDUSTRIEL: {
471
+ id: 40,
472
+ isIncorporeal: false,
473
+ isDepreciable: true,
474
+ amortizationMethod: 'yearBased',
475
+ amortizationRequest: null,
476
+ amortizationDuration: 5,
477
+ idAccount: 835,
478
+ idAccountEndownment: 335,
479
+ idAccountAmortization: 51718,
480
+ idAccountTrash: 929,
481
+ },
482
+ AGENCEMENTS_ET_AMENAGEMENTS_DU_MATERIEL_ET_OUTILLAGE_INDUSTRIELS: {
483
+ id: 41,
484
+ isIncorporeal: false,
485
+ isDepreciable: true,
486
+ amortizationMethod: 'yearBased',
487
+ amortizationRequest: null,
488
+ amortizationDuration: 5,
489
+ idAccount: 836,
490
+ idAccountEndownment: 335,
491
+ idAccountAmortization: 51719,
492
+ idAccountTrash: 929,
493
+ },
435
494
  };
436
495
 
437
496
  export enum DepreciationMethods {
@@ -0,0 +1 @@
1
+ export const MINIMUM_TO_ANNOTATE = 75;
@@ -8,5 +8,5 @@ export class QueryTransactionBankStatement {
8
8
 
9
9
  @ApiProperty()
10
10
  @IsNumber()
11
- idBankAccount?: number;
11
+ idBankAccount: number;
12
12
  }
@@ -0,0 +1,60 @@
1
+ import {
2
+ ArrayUnique, IsInt, IsPositive, IsString, Min,
3
+ } from 'class-validator';
4
+ import { ApiProperty } from '../../../../utils';
5
+ import { IsFormattedDateString } from '../../../../utils/validators/formattedDateString.validator';
6
+
7
+ export class CreateMachineLearningAnnotation {
8
+ @ApiProperty()
9
+ @ArrayUnique()
10
+ @IsInt({
11
+ each: true,
12
+ })
13
+ @IsPositive({
14
+ each: true,
15
+ })
16
+ idAccountingEntries: number[];
17
+
18
+ @ApiProperty()
19
+ @ArrayUnique()
20
+ @IsInt({
21
+ each: true,
22
+ })
23
+ @IsPositive({
24
+ each: true,
25
+ })
26
+ idAccountingTransaction: number[];
27
+
28
+ @ApiProperty()
29
+ @IsString({
30
+ each: true,
31
+ })
32
+ designation: string[];
33
+
34
+ @ApiProperty()
35
+ @IsFormattedDateString({
36
+ each: true,
37
+ })
38
+ dateValue: string[];
39
+
40
+ @ApiProperty()
41
+ @IsInt({
42
+ each: true,
43
+ })
44
+ @Min(0, {
45
+ each: true,
46
+ })
47
+ credit: number[];
48
+
49
+ @ApiProperty()
50
+ @IsInt({
51
+ each: true,
52
+ })
53
+ @Min(0, {
54
+ each: true,
55
+ })
56
+ debit: number[];
57
+
58
+ @ApiProperty()
59
+ kilometers: number[];
60
+ }
@@ -0,0 +1,9 @@
1
+ import { Code, IMachineLearningResult } from '../../..';
2
+
3
+ export interface ResultCreateMachineLearningAnnotation {
4
+ errors: {
5
+ code: Code;
6
+ message: string;
7
+ }[],
8
+ results: IMachineLearningResult[]
9
+ }
@@ -7,6 +7,7 @@ import { IAccountHelp } from './IAccountHelp';
7
7
  import { IAccountDetail } from './IAccountDetail';
8
8
  import { ISociety } from './ISociety';
9
9
  import { IAccountsSectors } from './IAccountsSectors';
10
+ import { IMachineLearningResult } from './IMachineLearningResult';
10
11
 
11
12
  // accounts
12
13
  export interface IAccount {
@@ -51,4 +52,5 @@ export interface IAccount {
51
52
  accountHelp?: IAccountHelp;
52
53
  accountDetails?: IAccountDetail[];
53
54
  societies?: ISociety[];
55
+ machineLearningResults?: IMachineLearningResult[];
54
56
  }
@@ -11,6 +11,7 @@ import { IComptaType } from './IComptaType';
11
11
  import { ILettering } from './ILettering';
12
12
  import { IPartnerTransaction } from './IPartnerTransaction';
13
13
  import { ICurrency } from './ICurrency';
14
+ import { IMachineLearningResult } from '../..';
14
15
 
15
16
  // accountingTransactions
16
17
  export interface IAccountingTransaction {
@@ -72,4 +73,5 @@ export interface IAccountingTransaction {
72
73
  partnersTransaction: IPartnerTransaction | null;
73
74
  parents?: IAccountingTransaction[];
74
75
  childs?: IAccountingTransaction[];
76
+ machineLearningResults?: IMachineLearningResult[];
75
77
  }
@@ -43,6 +43,7 @@ export enum Code {
43
43
  amountImmobilizationLessThanAmountAllTaxIncluded = 'amount_immobilization_less_than_amount_all_tax_included',
44
44
  amountImmobilizationIsGreaterThanTotalAmountTransactions = 'amount_immobilization_is_greater_than_total_amount_transactions',
45
45
  immobilizationNotFound = 'immobilization_not_found',
46
+ annotationFailed = 'annotation_failed',
46
47
 
47
48
  // PDF error
48
49
  mergeFailed = 'merge_failed',
@@ -149,6 +150,7 @@ export enum Code {
149
150
  // Fiscal period closing
150
151
  EXERCICE_ALREADY_CLOSED = 'EXERCICE_ALREADY_CLOSED',
151
152
  MISSING_ANNOTATIONS = 'MISSING_ANNOTATIONS',
153
+
152
154
  }
153
155
 
154
156
  export interface IApiError {
@@ -0,0 +1,14 @@
1
+ import { IAccount } from './IAccount';
2
+
3
+ export interface IMachineLearningResult {
4
+ id?: number;
5
+ idAccountingTransaction: number;
6
+ accountNumber: number;
7
+ scoring: number;
8
+ idAccount: number;
9
+ createdAt?: Date | null;
10
+ updatedAt?: Date | null;
11
+
12
+ // Associations
13
+ account: IAccount
14
+ }
@@ -18,8 +18,10 @@ export interface IPayment {
18
18
  isFree?: boolean;
19
19
  dateOverdue?: Date | null;
20
20
  datePayment: Date;
21
+ comment?: string | null;
21
22
  done?: boolean | null;
22
23
  refInternalInvoicing?: number;
24
+ noInternalInvoice?: boolean;
23
25
  idPrestation: number;
24
26
  idExercice?: number | null;
25
27
  idUser?: number | null;
@@ -1,3 +1,4 @@
1
+ import { IPayment } from './IPayment';
1
2
  import { IPrestationList } from './IPrestationList';
2
3
  import { ISociety } from './ISociety';
3
4
 
@@ -11,10 +12,12 @@ export interface ISocietySocial {
11
12
  done: boolean;
12
13
  idSociety: number;
13
14
  idPrestationSocial: number;
15
+ idPayment: number;
14
16
  createdAt?: Date | null;
15
17
  updatedAt?: Date | null;
16
18
 
17
19
  // Associations
18
20
  prestationList: IPrestationList;
19
21
  society: ISociety;
22
+ payment: IPayment;
20
23
  }
package/ts/types/index.ts CHANGED
@@ -293,6 +293,7 @@ export * from './Interface/models/IAnswerTypeValue';
293
293
  export * from './Interface/models/IBalanceSheetQuestion';
294
294
  export * from './Interface/models/IExerciceQuestion';
295
295
  export * from './Interface/models/IRelatedAccountingTransaction';
296
+ export * from './Interface/models/IMachineLearningResult';
296
297
 
297
298
  // Forms
298
299
  export * from './Form/FormAuthenticate';
@@ -381,6 +382,7 @@ export * from './Enum/PartneredAccountantServiceType';
381
382
  export * from './Enum/LegalInformation';
382
383
  export * from './Enum/ProvisionType';
383
384
  export * from './Enum/Ocr';
385
+ export * from './Enum/MachineLearning';
384
386
 
385
387
  // Interfaces API
386
388
  export * from './Interface/api/aspone/ReadInterchange';
@@ -596,5 +598,7 @@ export * from './Interface/api/closing/ProcessedClosing';
596
598
  export * from './Interface/api/financialCharge/ReadFinancialChargesBalance';
597
599
  export * from './Interface/api/financialCharge/CreateNonDeductibleInterests';
598
600
  export * from './Interface/api/financialCharge/CreatedNonDeductibleInterests';
601
+ export * from './Interface/api/machineLearning/CreateMachineLearningAnnotation';
602
+ export * from './Interface/api/machineLearning/ResultCreateMachineLearningAnnotation';
599
603
 
600
604
  export * from '../utils/cerfa';
package/ts/utils/cerfa.ts CHANGED
@@ -6,11 +6,11 @@ export function retrieveCerfaFromSocietyInformations(idLegalForm: number, idTaxS
6
6
  const globalRegimes = Object.values(GlobalRegime);
7
7
  const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));
8
8
 
9
- if (!selectedGlobalRegime) throw Error('Missing informations to retrieve CERFA informations');
9
+ if (!selectedGlobalRegime) throw new Error('Missing informations to retrieve CERFA informations');
10
10
 
11
11
  const choiceIndex = selectedGlobalRegime.choices.findIndex((sgr) => sgr.idFiscalRegime === idFiscalRegime && sgr.profitsType === profitsType && sgr.idTaxSystem === idTaxSystem);
12
12
 
13
- if (choiceIndex < 0) throw Error('Missing informations to retrieve CERFA informations');
13
+ if (choiceIndex < 0) throw new Error('Missing informations to retrieve CERFA informations');
14
14
 
15
15
  const { declaration, annexe } = selectedGlobalRegime.choices[choiceIndex];
16
16
 
@@ -21,6 +21,6 @@ export function retreiveChoicesDependingLegalForm(idLegalForm: number): GlobalRe
21
21
  const globalRegimes = Object.values(GlobalRegime);
22
22
  const selectedGlobalRegime = globalRegimes.find((gr) => gr.idLegalForms.includes(idLegalForm));
23
23
 
24
- if (!selectedGlobalRegime) throw Error(`LegalForm #${idLegalForm} not implemented`);
24
+ if (!selectedGlobalRegime) throw new Error(`LegalForm #${idLegalForm} not implemented`);
25
25
  return selectedGlobalRegime;
26
26
  }