@silexpert/core 1.1.342 → 1.1.344

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 (155) hide show
  1. package/dist/cjs/api/resources/Card.d.ts +2 -1
  2. package/dist/cjs/api/resources/Card.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/Card.js +3 -0
  4. package/dist/cjs/api/resources/Card.js.map +1 -1
  5. package/dist/cjs/api/resources/Loan.d.ts +9 -11
  6. package/dist/cjs/api/resources/Loan.d.ts.map +1 -1
  7. package/dist/cjs/api/resources/Loan.js +23 -17
  8. package/dist/cjs/api/resources/Loan.js.map +1 -1
  9. package/dist/cjs/api/resources/Log.d.ts +2 -1
  10. package/dist/cjs/api/resources/Log.d.ts.map +1 -1
  11. package/dist/cjs/api/resources/Log.js +3 -0
  12. package/dist/cjs/api/resources/Log.js.map +1 -1
  13. package/dist/cjs/api/resources/Subscription.d.ts +2 -2
  14. package/dist/cjs/api/resources/Subscription.d.ts.map +1 -1
  15. package/dist/cjs/api/resources/Subscription.js +2 -2
  16. package/dist/cjs/api/resources/Subscription.js.map +1 -1
  17. package/dist/cjs/types/Enum/BalanceSheet.d.ts.map +1 -1
  18. package/dist/cjs/types/Enum/BalanceSheet.js +5 -3
  19. package/dist/cjs/types/Enum/BalanceSheet.js.map +1 -1
  20. package/dist/cjs/types/Enum/Log.d.ts +229 -1
  21. package/dist/cjs/types/Enum/Log.d.ts.map +1 -1
  22. package/dist/cjs/types/Enum/Log.js +228 -0
  23. package/dist/cjs/types/Enum/Log.js.map +1 -1
  24. package/dist/cjs/types/Enum/TimeSlot.js +3 -3
  25. package/dist/cjs/types/Enum/TimeSlot.js.map +1 -1
  26. package/dist/cjs/types/Interface/api/bankAccount/Query.d.ts +1 -0
  27. package/dist/cjs/types/Interface/api/bankAccount/Query.d.ts.map +1 -1
  28. package/dist/cjs/types/Interface/api/bankAccount/Query.js +7 -0
  29. package/dist/cjs/types/Interface/api/bankAccount/Query.js.map +1 -1
  30. package/dist/cjs/types/Interface/api/card/QueryUserCards.d.ts +8 -0
  31. package/dist/cjs/types/Interface/api/card/QueryUserCards.d.ts.map +1 -1
  32. package/dist/cjs/types/Interface/api/card/QueryUserCards.js +40 -1
  33. package/dist/cjs/types/Interface/api/card/QueryUserCards.js.map +1 -1
  34. package/dist/cjs/types/Interface/api/exercice/ReadExercice.d.ts +7 -0
  35. package/dist/cjs/types/Interface/api/exercice/ReadExercice.d.ts.map +1 -0
  36. package/dist/cjs/types/Interface/api/exercice/ReadExercice.js +3 -0
  37. package/dist/cjs/types/Interface/api/exercice/ReadExercice.js.map +1 -0
  38. package/dist/cjs/types/Interface/api/loan/CreateLoan.d.ts +13 -2
  39. package/dist/cjs/types/Interface/api/loan/CreateLoan.d.ts.map +1 -1
  40. package/dist/cjs/types/Interface/api/loan/CreateLoan.js +53 -3
  41. package/dist/cjs/types/Interface/api/loan/CreateLoan.js.map +1 -1
  42. package/dist/cjs/types/Interface/api/loan/ReadLoan.d.ts +10 -0
  43. package/dist/cjs/types/Interface/api/loan/ReadLoan.d.ts.map +1 -0
  44. package/dist/cjs/types/Interface/api/loan/ReadLoan.js +3 -0
  45. package/dist/cjs/types/Interface/api/loan/ReadLoan.js.map +1 -0
  46. package/dist/cjs/types/Interface/api/loan/UpdateLoan.d.ts +0 -6
  47. package/dist/cjs/types/Interface/api/loan/UpdateLoan.d.ts.map +1 -1
  48. package/dist/cjs/types/Interface/api/loan/UpdateLoan.js +2 -36
  49. package/dist/cjs/types/Interface/api/loan/UpdateLoan.js.map +1 -1
  50. package/dist/cjs/types/Interface/api/log/QueryLogPagination.d.ts +9 -0
  51. package/dist/cjs/types/Interface/api/log/QueryLogPagination.d.ts.map +1 -1
  52. package/dist/cjs/types/Interface/api/log/QueryLogPagination.js +56 -6
  53. package/dist/cjs/types/Interface/api/log/QueryLogPagination.js.map +1 -1
  54. package/dist/cjs/types/Interface/api/stripe/Create.d.ts +3 -0
  55. package/dist/cjs/types/Interface/api/stripe/Create.d.ts.map +1 -1
  56. package/dist/cjs/types/Interface/api/stripe/Create.js +10 -1
  57. package/dist/cjs/types/Interface/api/stripe/Create.js.map +1 -1
  58. package/dist/cjs/types/Interface/models/ILoan.d.ts +7 -0
  59. package/dist/cjs/types/Interface/models/ILoan.d.ts.map +1 -1
  60. package/dist/cjs/types/Interface/models/ILoan.js.map +1 -1
  61. package/dist/cjs/types/Interface/models/ILoanEarlyRepayment.d.ts +12 -0
  62. package/dist/cjs/types/Interface/models/ILoanEarlyRepayment.d.ts.map +1 -0
  63. package/dist/cjs/types/Interface/models/ILoanEarlyRepayment.js +3 -0
  64. package/dist/cjs/types/Interface/models/ILoanEarlyRepayment.js.map +1 -0
  65. package/dist/cjs/types/index.d.ts +3 -0
  66. package/dist/cjs/types/index.d.ts.map +1 -1
  67. package/dist/cjs/types/index.js +3 -0
  68. package/dist/cjs/types/index.js.map +1 -1
  69. package/dist/mjs/api/resources/Card.d.ts +2 -1
  70. package/dist/mjs/api/resources/Card.d.ts.map +1 -1
  71. package/dist/mjs/api/resources/Card.js +6 -0
  72. package/dist/mjs/api/resources/Card.js.map +1 -1
  73. package/dist/mjs/api/resources/Loan.d.ts +9 -11
  74. package/dist/mjs/api/resources/Loan.d.ts.map +1 -1
  75. package/dist/mjs/api/resources/Loan.js +23 -17
  76. package/dist/mjs/api/resources/Loan.js.map +1 -1
  77. package/dist/mjs/api/resources/Log.d.ts +2 -1
  78. package/dist/mjs/api/resources/Log.d.ts.map +1 -1
  79. package/dist/mjs/api/resources/Log.js +3 -0
  80. package/dist/mjs/api/resources/Log.js.map +1 -1
  81. package/dist/mjs/api/resources/Subscription.d.ts +2 -2
  82. package/dist/mjs/api/resources/Subscription.d.ts.map +1 -1
  83. package/dist/mjs/api/resources/Subscription.js +2 -2
  84. package/dist/mjs/api/resources/Subscription.js.map +1 -1
  85. package/dist/mjs/types/Enum/BalanceSheet.d.ts.map +1 -1
  86. package/dist/mjs/types/Enum/BalanceSheet.js +5 -3
  87. package/dist/mjs/types/Enum/BalanceSheet.js.map +1 -1
  88. package/dist/mjs/types/Enum/Log.d.ts +229 -1
  89. package/dist/mjs/types/Enum/Log.d.ts.map +1 -1
  90. package/dist/mjs/types/Enum/Log.js +228 -0
  91. package/dist/mjs/types/Enum/Log.js.map +1 -1
  92. package/dist/mjs/types/Enum/TimeSlot.js +3 -3
  93. package/dist/mjs/types/Enum/TimeSlot.js.map +1 -1
  94. package/dist/mjs/types/Interface/api/bankAccount/Query.d.ts +1 -0
  95. package/dist/mjs/types/Interface/api/bankAccount/Query.d.ts.map +1 -1
  96. package/dist/mjs/types/Interface/api/bankAccount/Query.js +8 -0
  97. package/dist/mjs/types/Interface/api/bankAccount/Query.js.map +1 -1
  98. package/dist/mjs/types/Interface/api/card/QueryUserCards.d.ts +8 -0
  99. package/dist/mjs/types/Interface/api/card/QueryUserCards.d.ts.map +1 -1
  100. package/dist/mjs/types/Interface/api/card/QueryUserCards.js +38 -0
  101. package/dist/mjs/types/Interface/api/card/QueryUserCards.js.map +1 -1
  102. package/dist/mjs/types/Interface/api/exercice/ReadExercice.d.ts +7 -0
  103. package/dist/mjs/types/Interface/api/exercice/ReadExercice.d.ts.map +1 -0
  104. package/dist/mjs/types/Interface/api/exercice/ReadExercice.js +2 -0
  105. package/dist/mjs/types/Interface/api/exercice/ReadExercice.js.map +1 -0
  106. package/dist/mjs/types/Interface/api/loan/CreateLoan.d.ts +13 -2
  107. package/dist/mjs/types/Interface/api/loan/CreateLoan.d.ts.map +1 -1
  108. package/dist/mjs/types/Interface/api/loan/CreateLoan.js +61 -3
  109. package/dist/mjs/types/Interface/api/loan/CreateLoan.js.map +1 -1
  110. package/dist/mjs/types/Interface/api/loan/ReadLoan.d.ts +10 -0
  111. package/dist/mjs/types/Interface/api/loan/ReadLoan.d.ts.map +1 -0
  112. package/dist/mjs/types/Interface/api/loan/ReadLoan.js +2 -0
  113. package/dist/mjs/types/Interface/api/loan/ReadLoan.js.map +1 -0
  114. package/dist/mjs/types/Interface/api/loan/UpdateLoan.d.ts +0 -6
  115. package/dist/mjs/types/Interface/api/loan/UpdateLoan.d.ts.map +1 -1
  116. package/dist/mjs/types/Interface/api/loan/UpdateLoan.js +3 -43
  117. package/dist/mjs/types/Interface/api/loan/UpdateLoan.js.map +1 -1
  118. package/dist/mjs/types/Interface/api/log/QueryLogPagination.d.ts +9 -0
  119. package/dist/mjs/types/Interface/api/log/QueryLogPagination.d.ts.map +1 -1
  120. package/dist/mjs/types/Interface/api/log/QueryLogPagination.js +57 -5
  121. package/dist/mjs/types/Interface/api/log/QueryLogPagination.js.map +1 -1
  122. package/dist/mjs/types/Interface/api/stripe/Create.d.ts +3 -0
  123. package/dist/mjs/types/Interface/api/stripe/Create.d.ts.map +1 -1
  124. package/dist/mjs/types/Interface/api/stripe/Create.js +11 -2
  125. package/dist/mjs/types/Interface/api/stripe/Create.js.map +1 -1
  126. package/dist/mjs/types/Interface/models/ILoan.d.ts +7 -0
  127. package/dist/mjs/types/Interface/models/ILoan.d.ts.map +1 -1
  128. package/dist/mjs/types/Interface/models/ILoan.js.map +1 -1
  129. package/dist/mjs/types/Interface/models/ILoanEarlyRepayment.d.ts +12 -0
  130. package/dist/mjs/types/Interface/models/ILoanEarlyRepayment.d.ts.map +1 -0
  131. package/dist/mjs/types/Interface/models/ILoanEarlyRepayment.js +2 -0
  132. package/dist/mjs/types/Interface/models/ILoanEarlyRepayment.js.map +1 -0
  133. package/dist/mjs/types/index.d.ts +3 -0
  134. package/dist/mjs/types/index.d.ts.map +1 -1
  135. package/dist/mjs/types/index.js +3 -0
  136. package/dist/mjs/types/index.js.map +1 -1
  137. package/package.json +1 -1
  138. package/ts/api/resources/Card.ts +8 -1
  139. package/ts/api/resources/Loan.ts +28 -21
  140. package/ts/api/resources/Log.ts +5 -0
  141. package/ts/api/resources/Subscription.ts +3 -3
  142. package/ts/types/Enum/BalanceSheet.ts +5 -3
  143. package/ts/types/Enum/Log.ts +228 -0
  144. package/ts/types/Enum/TimeSlot.ts +3 -3
  145. package/ts/types/Interface/api/bankAccount/Query.ts +6 -0
  146. package/ts/types/Interface/api/card/QueryUserCards.ts +31 -0
  147. package/ts/types/Interface/api/exercice/ReadExercice.ts +6 -0
  148. package/ts/types/Interface/api/loan/CreateLoan.ts +45 -5
  149. package/ts/types/Interface/api/loan/ReadLoan.ts +9 -0
  150. package/ts/types/Interface/api/loan/UpdateLoan.ts +3 -31
  151. package/ts/types/Interface/api/log/QueryLogPagination.ts +40 -1
  152. package/ts/types/Interface/api/stripe/Create.ts +10 -2
  153. package/ts/types/Interface/models/ILoan.ts +7 -0
  154. package/ts/types/Interface/models/ILoanEarlyRepayment.ts +13 -0
  155. package/ts/types/index.ts +3 -0
@@ -1,11 +1,14 @@
1
- import { IsNumber, IsOptional, IsString } from 'class-validator';
1
+ import { IsBoolean, IsDate, IsNumber, IsString } from 'class-validator';
2
2
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
+ import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
3
4
 
4
5
  export class CreateLoanForm {
5
6
  @ApiProperty({ description: 'Désignation' })
7
+ @IsString()
6
8
  name: string;
7
9
 
8
10
  @ApiProperty({ description: 'Désignation de l\'organisme' })
11
+ @IsString()
9
12
  lenderDesignation: string;
10
13
 
11
14
  @ApiProperty()
@@ -26,18 +29,55 @@ export class CreateLoanForm {
26
29
 
27
30
  @ApiPropertyOptional()
28
31
  @IsNumber()
29
- @IsOptional()
30
- monthDuration?: number;
32
+ monthDuration: number;
31
33
 
32
34
  @ApiPropertyOptional()
33
35
  @IsNumber()
34
- @IsOptional()
35
- rate?: number;
36
+ rate: number;
36
37
 
37
38
  @ApiProperty()
38
39
  @IsNumber()
39
40
  idExercice: number;
40
41
 
42
+ @ApiProperty()
43
+ @IsNumber()
44
+ annuity: number;
45
+
46
+ @ApiProperty()
47
+ @IsString()
48
+ unlockDate: string;
49
+
50
+ @ApiProperty()
51
+ @IsString()
52
+ firstDueDate: string;
53
+
54
+ @ApiProperty()
55
+ @IsNumber()
56
+ commission: number;
57
+
58
+ @ApiProperty()
59
+ @IsNumber()
60
+ insurance: number;
61
+
62
+ @ApiProperty()
63
+ @IsBoolean()
64
+ @ToBoolean()
65
+ shouldProrate: boolean;
66
+
41
67
  @ApiPropertyOptional()
42
68
  files?: File[];
69
+ }
70
+
71
+ export class CreateEarlyRepayment {
72
+ @ApiProperty()
73
+ @IsNumber()
74
+ amount: number;
75
+
76
+ @ApiProperty()
77
+ @IsDate()
78
+ date: Date;
79
+
80
+ @ApiProperty()
81
+ @IsNumber()
82
+ annuity: number;
43
83
  }
@@ -0,0 +1,9 @@
1
+ export type ReadLoanSchedule = {
2
+ date: string;
3
+ annuity: number;
4
+ interest: number;
5
+ insurance: number;
6
+ commission: number;
7
+ capital: number;
8
+ remain: number;
9
+ };
@@ -1,8 +1,10 @@
1
- import { IsNumber, IsOptional, IsString } from 'class-validator';
1
+ import { IsOptional, IsString } from 'class-validator';
2
2
  import { ApiPropertyOptional } from '../../../../utils';
3
3
 
4
4
  export class UpdateLoanForm {
5
5
  @ApiPropertyOptional()
6
+ @IsString()
7
+ @IsOptional()
6
8
  name?: string;
7
9
 
8
10
  @ApiPropertyOptional()
@@ -14,34 +16,4 @@ export class UpdateLoanForm {
14
16
  @IsString()
15
17
  @IsOptional()
16
18
  number?: string;
17
-
18
- @ApiPropertyOptional()
19
- @IsNumber()
20
- @IsOptional()
21
- amount?: number;
22
-
23
- @ApiPropertyOptional()
24
- @IsNumber()
25
- @IsOptional()
26
- assetBeforeExercice?: number;
27
-
28
- @ApiPropertyOptional()
29
- @IsNumber()
30
- @IsOptional()
31
- assetAfterExercice?: number;
32
-
33
- @ApiPropertyOptional()
34
- @IsNumber()
35
- @IsOptional()
36
- idExercice?: number;
37
-
38
- @ApiPropertyOptional()
39
- @IsNumber()
40
- @IsOptional()
41
- monthDuration?: number;
42
-
43
- @ApiPropertyOptional()
44
- @IsNumber()
45
- @IsOptional()
46
- rate?: number;
47
19
  }
@@ -1,10 +1,49 @@
1
1
  import {
2
- IsEnum, IsInt, IsOptional, IsString,
2
+ IsDate,
3
+ IsEnum, IsInt, IsNumber, IsOptional, IsString,
3
4
  } from 'class-validator';
4
5
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
5
6
  import { LogType } from '../../../Enum/Log';
6
7
 
7
8
  export class QueryLogPagination {
9
+ @ApiPropertyOptional()
10
+ @IsOptional()
11
+ @IsNumber()
12
+ limit?: number = 25;
13
+
14
+ @ApiPropertyOptional()
15
+ @IsOptional()
16
+ @IsNumber()
17
+ page?: number = 1;
18
+
19
+ @ApiPropertyOptional()
20
+ @IsOptional()
21
+ @IsDate()
22
+ dateStart?: Date;
23
+
24
+ @ApiPropertyOptional()
25
+ @IsOptional()
26
+ @IsDate()
27
+ dateEnd?: Date;
28
+
29
+ @ApiPropertyOptional()
30
+ @IsOptional()
31
+ @IsNumber()
32
+ @IsEnum(LogType)
33
+ idTypeLog: number;
34
+
35
+ @ApiPropertyOptional()
36
+ @IsOptional()
37
+ @IsNumber()
38
+ idSociety?: number;
39
+
40
+ @ApiPropertyOptional()
41
+ @IsOptional()
42
+ @IsNumber()
43
+ idUser?: number;
44
+ }
45
+
46
+ export class QueryLogPaginationByUser {
8
47
  @ApiPropertyOptional()
9
48
  @IsOptional()
10
49
  @IsInt()
@@ -1,8 +1,16 @@
1
- import { IsString } from 'class-validator';
2
- import { ApiProperty } from '../../../../utils';
1
+ import { IsOptional, IsString } from 'class-validator';
2
+ import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
3
3
 
4
4
  export class CreateStripeConnection {
5
5
  @ApiProperty()
6
6
  @IsString()
7
7
  code: string;
8
+ }
9
+
10
+ export class CreateStripePortals {
11
+ @ApiPropertyOptional()
12
+ @IsString()
13
+ @IsOptional()
14
+ stripeCustomerId?: string;
15
+
8
16
  }
@@ -2,6 +2,7 @@ import { ISociety } from './ISociety';
2
2
  import { IExercice } from './IExercice';
3
3
  import { IAccount } from './IAccount';
4
4
  import { ILoanFile } from './ILoanFile';
5
+ import { ILoanEarlyRepayment } from './ILoanEarlyRepayment';
5
6
 
6
7
  export interface ILoan {
7
8
  id?: number;
@@ -14,6 +15,11 @@ export interface ILoan {
14
15
  assetAfterExercice: number;
15
16
  monthDuration?: number;
16
17
  rate?: number;
18
+ annuity: number | null;
19
+ unlockDate: Date | null;
20
+ firstDueDate: Date | null;
21
+ commission: number | null;
22
+ insurance: number | null;
17
23
  idExercice: number;
18
24
  idSociety: number;
19
25
  idAccountRefund: number;
@@ -33,4 +39,5 @@ export interface ILoan {
33
39
  accountCommission?: IAccount;
34
40
  accountReleaseLoanCapital?: IAccount;
35
41
  loanFiles?: ILoanFile[];
42
+ earlyRepayments?: ILoanEarlyRepayment[];
36
43
  }
@@ -0,0 +1,13 @@
1
+ import { ILoan } from './ILoan';
2
+
3
+ export interface ILoanEarlyRepayment {
4
+ id?: number;
5
+ amount: number;
6
+ date: Date;
7
+ annuity: number;
8
+ idLoan: number;
9
+ createdAt?: Date;
10
+ updatedAt?: Date;
11
+
12
+ loan?: ILoan;
13
+ }
package/ts/types/index.ts CHANGED
@@ -333,6 +333,7 @@ export * from './Interface/models/IExpertAnnuary';
333
333
  export * from './Interface/models/IUserTimeSlot';
334
334
  export * from './Interface/models/ICompanyCreationForm';
335
335
  export * from './Interface/models/IAnnotation';
336
+ export * from './Interface/models/ILoanEarlyRepayment';
336
337
 
337
338
 
338
339
  // Schemas
@@ -544,6 +545,7 @@ export * from './Enum/Contest';
544
545
  export * from './Enum/LetterResponseType';
545
546
 
546
547
  // Interfaces API
548
+ export * from './Interface/api/exercice/ReadExercice';
547
549
  export * from './Interface/api/kilometricAllowance/ReadKilometricAllowance';
548
550
  export * from './Interface/api/cashAndExpense/Query';
549
551
  export * from './Interface/api/cerfa/das2';
@@ -814,6 +816,7 @@ export * from './Interface/api/promoCode/UpdatePromoCode';
814
816
  export * from './Interface/api/promoCode/CreatePromoCode';
815
817
  export * from './Interface/api/balanceBankAccount/CreateBudgetBalanceBankAccount';
816
818
  export * from './Interface/api/loan/CreateLoan';
819
+ export * from './Interface/api/loan/ReadLoan';
817
820
  export * from './Interface/api/stock/StocksType';
818
821
  export * from './Interface/api/lettering/QueryRegroupLettering';
819
822
  // export * from './Interface/api/stock/StockEntries';