@silexpert/core 0.4.125 → 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 (101) 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/cerfa/2031.d.ts +1 -1
  21. package/es/types/Interface/api/cerfa/2031.d.ts.map +1 -1
  22. package/es/types/Interface/api/cerfa/2031.js.map +1 -1
  23. package/es/types/Interface/api/machineLearning/CreateMachineLearningAnnotation.d.ts +10 -0
  24. package/es/types/Interface/api/machineLearning/CreateMachineLearningAnnotation.d.ts.map +1 -0
  25. package/es/types/Interface/api/machineLearning/CreateMachineLearningAnnotation.js +75 -0
  26. package/es/types/Interface/api/machineLearning/CreateMachineLearningAnnotation.js.map +1 -0
  27. package/es/types/Interface/api/machineLearning/ResultCreateMachineLearningAnnotation.d.ts +9 -0
  28. package/es/types/Interface/api/machineLearning/ResultCreateMachineLearningAnnotation.d.ts.map +1 -0
  29. package/es/types/Interface/api/machineLearning/ResultCreateMachineLearningAnnotation.js +2 -0
  30. package/es/types/Interface/api/machineLearning/ResultCreateMachineLearningAnnotation.js.map +1 -0
  31. package/es/types/Interface/api/transactions/QueryUnexport.d.ts.map +1 -1
  32. package/es/types/Interface/api/transactions/QueryUnexport.js +1 -9
  33. package/es/types/Interface/api/transactions/QueryUnexport.js.map +1 -1
  34. package/es/types/Interface/models/IAccount.d.ts +2 -0
  35. package/es/types/Interface/models/IAccount.d.ts.map +1 -1
  36. package/es/types/Interface/models/IAccount.js.map +1 -1
  37. package/es/types/Interface/models/IAccountingTransaction.d.ts +2 -0
  38. package/es/types/Interface/models/IAccountingTransaction.d.ts.map +1 -1
  39. package/es/types/Interface/models/IAccountingTransaction.js.map +1 -1
  40. package/es/types/Interface/models/IApiError.d.ts +1 -0
  41. package/es/types/Interface/models/IApiError.d.ts.map +1 -1
  42. package/es/types/Interface/models/IApiError.js +1 -0
  43. package/es/types/Interface/models/IApiError.js.map +1 -1
  44. package/es/types/Interface/models/IMachineLearningResult.d.ts +12 -0
  45. package/es/types/Interface/models/IMachineLearningResult.d.ts.map +1 -0
  46. package/es/types/Interface/models/IMachineLearningResult.js +2 -0
  47. package/es/types/Interface/models/IMachineLearningResult.js.map +1 -0
  48. package/es/types/Interface/models/IPayment.d.ts +2 -0
  49. package/es/types/Interface/models/IPayment.d.ts.map +1 -1
  50. package/es/types/Interface/models/IPayment.js.map +1 -1
  51. package/es/types/Interface/models/ISocietySocial.d.ts +3 -0
  52. package/es/types/Interface/models/ISocietySocial.d.ts.map +1 -1
  53. package/es/types/Interface/models/ISocietySocial.js.map +1 -1
  54. package/es/types/index.d.ts +4 -0
  55. package/es/types/index.d.ts.map +1 -1
  56. package/es/types/index.js +4 -0
  57. package/es/types/index.js.map +1 -1
  58. package/es/utils/cerfa.js +3 -3
  59. package/es/utils/cerfa.js.map +1 -1
  60. package/js/api/resources/MachineLearning.js +18 -0
  61. package/js/api/resources/MachineLearning.js.map +1 -0
  62. package/js/api/resources.js +4 -1
  63. package/js/api/resources.js.map +1 -1
  64. package/js/types/Enum/ImmobilizationType.js +60 -0
  65. package/js/types/Enum/ImmobilizationType.js.map +1 -1
  66. package/js/types/Enum/MachineLearning.js +7 -0
  67. package/js/types/Enum/MachineLearning.js.map +1 -0
  68. package/js/types/Interface/api/bankStatement/QueryTransactionBankStatement.js.map +1 -1
  69. package/js/types/Interface/api/cerfa/2031.js.map +1 -1
  70. package/js/types/Interface/api/machineLearning/CreateMachineLearningAnnotation.js +63 -0
  71. package/js/types/Interface/api/machineLearning/CreateMachineLearningAnnotation.js.map +1 -0
  72. package/js/types/Interface/api/machineLearning/ResultCreateMachineLearningAnnotation.js +6 -0
  73. package/js/types/Interface/api/machineLearning/ResultCreateMachineLearningAnnotation.js.map +1 -0
  74. package/js/types/Interface/api/transactions/QueryUnexport.js +1 -7
  75. package/js/types/Interface/api/transactions/QueryUnexport.js.map +1 -1
  76. package/js/types/Interface/models/IApiError.js +2 -1
  77. package/js/types/Interface/models/IApiError.js.map +1 -1
  78. package/js/types/Interface/models/IMachineLearningResult.js +6 -0
  79. package/js/types/Interface/models/IMachineLearningResult.js.map +1 -0
  80. package/js/types/index.js +48 -0
  81. package/js/types/index.js.map +1 -1
  82. package/js/utils/cerfa.js +3 -3
  83. package/js/utils/cerfa.js.map +1 -1
  84. package/package.json +1 -1
  85. package/ts/api/resources/MachineLearning.ts +8 -0
  86. package/ts/api/resources.ts +2 -0
  87. package/ts/types/Enum/ImmobilizationType.ts +60 -1
  88. package/ts/types/Enum/MachineLearning.ts +1 -0
  89. package/ts/types/Interface/api/bankStatement/QueryTransactionBankStatement.ts +1 -1
  90. package/ts/types/Interface/api/cerfa/2031.ts +1 -1
  91. package/ts/types/Interface/api/machineLearning/CreateMachineLearningAnnotation.ts +60 -0
  92. package/ts/types/Interface/api/machineLearning/ResultCreateMachineLearningAnnotation.ts +9 -0
  93. package/ts/types/Interface/api/transactions/QueryUnexport.ts +1 -10
  94. package/ts/types/Interface/models/IAccount.ts +2 -0
  95. package/ts/types/Interface/models/IAccountingTransaction.ts +2 -0
  96. package/ts/types/Interface/models/IApiError.ts +2 -0
  97. package/ts/types/Interface/models/IMachineLearningResult.ts +14 -0
  98. package/ts/types/Interface/models/IPayment.ts +2 -0
  99. package/ts/types/Interface/models/ISocietySocial.ts +3 -0
  100. package/ts/types/index.ts +4 -0
  101. package/ts/utils/cerfa.ts +3 -3
@@ -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
  }