@silexpert/core 0.4.255 → 0.4.258
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/es/api/resources/Loan.d.ts +1 -1
- package/es/api/resources/Loan.d.ts.map +1 -1
- package/es/api/resources/Loan.js +13 -2
- package/es/api/resources/Loan.js.map +1 -1
- package/es/types/Enum/FolderFile.d.ts +6 -0
- package/es/types/Enum/FolderFile.d.ts.map +1 -0
- package/es/types/Enum/FolderFile.js +7 -0
- package/es/types/Enum/FolderFile.js.map +1 -0
- package/es/types/Enum/Ged.d.ts +2 -1
- package/es/types/Enum/Ged.d.ts.map +1 -1
- package/es/types/Enum/Ged.js +2 -2
- package/es/types/Enum/Ged.js.map +1 -1
- package/es/types/Enum/Office.d.ts +19 -0
- package/es/types/Enum/Office.d.ts.map +1 -0
- package/es/types/Enum/Office.js +19 -0
- package/es/types/Enum/Office.js.map +1 -0
- package/es/types/Interface/api/accountingTransaction/DeleteInvoices.d.ts +2 -2
- package/es/types/Interface/api/accountingTransaction/DeleteInvoices.d.ts.map +1 -1
- package/es/types/Interface/api/accountingTransaction/DeleteInvoices.js +5 -5
- package/es/types/Interface/api/accountingTransaction/DeleteInvoices.js.map +1 -1
- package/es/types/Interface/api/loan/CreateLoan.d.ts +3 -0
- package/es/types/Interface/api/loan/CreateLoan.d.ts.map +1 -1
- package/es/types/Interface/api/loan/CreateLoan.js +23 -1
- package/es/types/Interface/api/loan/CreateLoan.js.map +1 -1
- package/es/types/Interface/api/loan/UpdateLoan.d.ts +2 -0
- package/es/types/Interface/api/loan/UpdateLoan.d.ts.map +1 -1
- package/es/types/Interface/api/loan/UpdateLoan.js +25 -0
- package/es/types/Interface/api/loan/UpdateLoan.js.map +1 -1
- package/es/types/Interface/models/ILoan.d.ts +4 -0
- package/es/types/Interface/models/ILoan.d.ts.map +1 -1
- package/es/types/Interface/models/ILoan.js.map +1 -1
- package/es/types/Interface/models/ILoanFile.d.ts +12 -0
- package/es/types/Interface/models/ILoanFile.d.ts.map +1 -0
- package/es/types/Interface/models/ILoanFile.js +2 -0
- package/es/types/Interface/models/ILoanFile.js.map +1 -0
- package/es/types/Interface/models/ILog.d.ts +2 -0
- package/es/types/Interface/models/ILog.d.ts.map +1 -1
- package/es/types/Interface/models/ILog.js.map +1 -1
- package/es/types/index.d.ts +3 -0
- package/es/types/index.d.ts.map +1 -1
- package/es/types/index.js +3 -0
- package/es/types/index.js.map +1 -1
- package/js/api/resources/Loan.js +19 -2
- package/js/api/resources/Loan.js.map +1 -1
- package/js/types/Enum/FolderFile.js +13 -0
- package/js/types/Enum/FolderFile.js.map +1 -0
- package/js/types/Enum/Ged.js +2 -2
- package/js/types/Enum/Ged.js.map +1 -1
- package/js/types/Enum/Office.js +24 -0
- package/js/types/Enum/Office.js.map +1 -0
- package/js/types/Interface/api/accountingTransaction/DeleteInvoices.js +2 -2
- package/js/types/Interface/api/accountingTransaction/DeleteInvoices.js.map +1 -1
- package/js/types/Interface/api/loan/CreateLoan.js +13 -5
- package/js/types/Interface/api/loan/CreateLoan.js.map +1 -1
- package/js/types/Interface/api/loan/UpdateLoan.js +12 -6
- package/js/types/Interface/api/loan/UpdateLoan.js.map +1 -1
- package/js/types/Interface/models/ILoanFile.js +6 -0
- package/js/types/Interface/models/ILoanFile.js.map +1 -0
- package/js/types/index.js +36 -0
- package/js/types/index.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Loan.ts +14 -2
- package/ts/types/Enum/FolderFile.ts +5 -0
- package/ts/types/Enum/Ged.ts +3 -3
- package/ts/types/Enum/Office.ts +18 -0
- package/ts/types/Interface/api/accountingTransaction/DeleteInvoices.ts +5 -5
- package/ts/types/Interface/api/loan/CreateLoan.ts +20 -1
- package/ts/types/Interface/api/loan/UpdateLoan.ts +23 -0
- package/ts/types/Interface/models/ILoan.ts +4 -0
- package/ts/types/Interface/models/ILoanFile.ts +14 -0
- package/ts/types/Interface/models/ILog.ts +2 -0
- package/ts/types/index.ts +3 -0
package/ts/api/resources/Loan.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { forEach } from 'lodash';
|
|
1
2
|
import { Resource } from '../Resource';
|
|
2
3
|
import {
|
|
3
4
|
CreateLoanForm, IAccount, ILoan, UpdateLoanForm,
|
|
@@ -12,8 +13,19 @@ export class Loan extends Resource {
|
|
|
12
13
|
return this.axios.$get(`/loan/${params.idLoan}`);
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
createLoan(
|
|
16
|
-
|
|
16
|
+
createLoan(params: CreateLoanForm): Promise<ILoan> {
|
|
17
|
+
const formData = new FormData();
|
|
18
|
+
|
|
19
|
+
forEach(params, (value, key) => {
|
|
20
|
+
if (value) {
|
|
21
|
+
formData.append(key, `${value}`);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
params.files?.forEach((file) => {
|
|
25
|
+
formData.append('files', file);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
return this.axios.$post('/loan', formData, { headers: { 'Content-Type': 'multipart/form-data' } });
|
|
17
29
|
}
|
|
18
30
|
|
|
19
31
|
updateLoan(idLoan: number, payload: UpdateLoanForm): Promise<ILoan> {
|
package/ts/types/Enum/Ged.ts
CHANGED
|
@@ -28,8 +28,8 @@ export enum GedFolder {
|
|
|
28
28
|
// Insurance = 22,
|
|
29
29
|
CABINET_INVOICES = 23,
|
|
30
30
|
OTHER = 24,
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
VEHICLES = 25,
|
|
32
|
+
BORROWING_TABLES = 26,
|
|
33
33
|
// RSI & URSSAF = 27,
|
|
34
34
|
// Previous GA balance & PV = 28,
|
|
35
35
|
// Slips for the CFE = 29,
|
|
@@ -68,4 +68,4 @@ export enum GedFileType {
|
|
|
68
68
|
REVISION_GUIDE = 18,
|
|
69
69
|
SUMMARY_NOTE = 19,
|
|
70
70
|
BALANCESHEET_NOTE = 20,
|
|
71
|
-
}
|
|
71
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
-
IsBoolean,
|
|
2
|
+
IsBoolean, IsDateString, IsIn, IsNumber, IsOptional,
|
|
3
3
|
} from 'class-validator';
|
|
4
4
|
import { AccountingJournal } from '../../..';
|
|
5
5
|
import { ApiProperty, ApiPropertyOptional } from '../../../..';
|
|
@@ -7,12 +7,12 @@ import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
|
7
7
|
|
|
8
8
|
export class QueryDeleteInvoices {
|
|
9
9
|
@ApiProperty()
|
|
10
|
-
@
|
|
11
|
-
startDate:
|
|
10
|
+
@IsDateString()
|
|
11
|
+
startDate: string;
|
|
12
12
|
|
|
13
13
|
@ApiProperty()
|
|
14
|
-
@
|
|
15
|
-
endDate:
|
|
14
|
+
@IsDateString()
|
|
15
|
+
endDate: string;
|
|
16
16
|
|
|
17
17
|
@ApiProperty()
|
|
18
18
|
@IsNumber()
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IsNumber, IsOptional } from 'class-validator';
|
|
2
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
2
3
|
|
|
3
4
|
export class CreateLoanForm {
|
|
4
5
|
@ApiProperty({ description: 'Désignation' })
|
|
@@ -8,17 +9,35 @@ export class CreateLoanForm {
|
|
|
8
9
|
lenderDesignation: string;
|
|
9
10
|
|
|
10
11
|
@ApiProperty()
|
|
12
|
+
@IsNumber()
|
|
11
13
|
number: number;
|
|
12
14
|
|
|
13
15
|
@ApiProperty()
|
|
16
|
+
@IsNumber()
|
|
14
17
|
amount: number;
|
|
15
18
|
|
|
16
19
|
@ApiProperty()
|
|
20
|
+
@IsNumber()
|
|
17
21
|
assetBeforeExercice: number;
|
|
18
22
|
|
|
19
23
|
@ApiProperty()
|
|
24
|
+
@IsNumber()
|
|
20
25
|
assetAfterExercice: number;
|
|
21
26
|
|
|
27
|
+
@ApiPropertyOptional()
|
|
28
|
+
@IsNumber()
|
|
29
|
+
@IsOptional()
|
|
30
|
+
monthDuration?: number;
|
|
31
|
+
|
|
32
|
+
@ApiPropertyOptional()
|
|
33
|
+
@IsNumber()
|
|
34
|
+
@IsOptional()
|
|
35
|
+
rate?: number;
|
|
36
|
+
|
|
22
37
|
@ApiProperty()
|
|
38
|
+
@IsNumber()
|
|
23
39
|
idExercice: number;
|
|
40
|
+
|
|
41
|
+
@ApiPropertyOptional()
|
|
42
|
+
files?: File[];
|
|
24
43
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IsNumber, IsOptional, IsString } from 'class-validator';
|
|
1
2
|
import { ApiPropertyOptional } from '../../../../utils';
|
|
2
3
|
|
|
3
4
|
export class UpdateLoanForm {
|
|
@@ -5,20 +6,42 @@ export class UpdateLoanForm {
|
|
|
5
6
|
name?: string;
|
|
6
7
|
|
|
7
8
|
@ApiPropertyOptional()
|
|
9
|
+
@IsString()
|
|
10
|
+
@IsOptional()
|
|
8
11
|
lenderDesignation?: string;
|
|
9
12
|
|
|
10
13
|
@ApiPropertyOptional()
|
|
14
|
+
@IsNumber()
|
|
15
|
+
@IsOptional()
|
|
11
16
|
number?: number;
|
|
12
17
|
|
|
13
18
|
@ApiPropertyOptional()
|
|
19
|
+
@IsNumber()
|
|
20
|
+
@IsOptional()
|
|
14
21
|
amount?: number;
|
|
15
22
|
|
|
16
23
|
@ApiPropertyOptional()
|
|
24
|
+
@IsNumber()
|
|
25
|
+
@IsOptional()
|
|
17
26
|
assetBeforeExercice?: number;
|
|
18
27
|
|
|
19
28
|
@ApiPropertyOptional()
|
|
29
|
+
@IsNumber()
|
|
30
|
+
@IsOptional()
|
|
20
31
|
assetAfterExercice?: number;
|
|
21
32
|
|
|
22
33
|
@ApiPropertyOptional()
|
|
34
|
+
@IsNumber()
|
|
35
|
+
@IsOptional()
|
|
23
36
|
idExercice?: number;
|
|
37
|
+
|
|
38
|
+
@ApiPropertyOptional()
|
|
39
|
+
@IsNumber()
|
|
40
|
+
@IsOptional()
|
|
41
|
+
monthDuration?: number;
|
|
42
|
+
|
|
43
|
+
@ApiPropertyOptional()
|
|
44
|
+
@IsNumber()
|
|
45
|
+
@IsOptional()
|
|
46
|
+
rate?: number;
|
|
24
47
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ISociety } from './ISociety';
|
|
2
2
|
import { IExercice } from './IExercice';
|
|
3
3
|
import { IAccount } from './IAccount';
|
|
4
|
+
import { ILoanFile } from './ILoanFile';
|
|
4
5
|
|
|
5
6
|
export interface ILoan {
|
|
6
7
|
id?: number;
|
|
@@ -11,6 +12,8 @@ export interface ILoan {
|
|
|
11
12
|
amount: number;
|
|
12
13
|
assetBeforeExercice: number;
|
|
13
14
|
assetAfterExercice: number;
|
|
15
|
+
monthDuration?: number;
|
|
16
|
+
rate?: number;
|
|
14
17
|
idExercice: number;
|
|
15
18
|
idSociety: number;
|
|
16
19
|
idAccountRefund: number;
|
|
@@ -27,4 +30,5 @@ export interface ILoan {
|
|
|
27
30
|
accountBenefit?: IAccount;
|
|
28
31
|
accountInsurance?: IAccount;
|
|
29
32
|
accountCommission?: IAccount;
|
|
33
|
+
loanFiles?: ILoanFile[];
|
|
30
34
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IFile } from './IFile';
|
|
2
|
+
import { ILoan } from './ILoan';
|
|
3
|
+
|
|
4
|
+
export interface ILoanFile {
|
|
5
|
+
id: number;
|
|
6
|
+
idFile: number;
|
|
7
|
+
idLoan: number;
|
|
8
|
+
createdAt?: Date | null;
|
|
9
|
+
updatedAt?: Date | null;
|
|
10
|
+
|
|
11
|
+
// Associations
|
|
12
|
+
loan: ILoan;
|
|
13
|
+
file: IFile;
|
|
14
|
+
}
|
package/ts/types/index.ts
CHANGED
|
@@ -310,6 +310,7 @@ export * from './Interface/models/ITask';
|
|
|
310
310
|
export * from './Interface/models/IMobileNotificationLog';
|
|
311
311
|
export * from './Interface/models/IMobileNotificationSetting';
|
|
312
312
|
export * from './Interface/models/ITimeRecorder';
|
|
313
|
+
export * from './Interface/models/ILoanFile';
|
|
313
314
|
|
|
314
315
|
// Forms
|
|
315
316
|
export * from './Form/FormAuthenticate';
|
|
@@ -327,6 +328,7 @@ export * from './Enum/Quality';
|
|
|
327
328
|
export * from './Enum/AbsenceType';
|
|
328
329
|
export * from './Enum/Role';
|
|
329
330
|
export * from './Enum/RoleDetail';
|
|
331
|
+
export * from './Enum/Office';
|
|
330
332
|
export * from './Enum/PrestationOption';
|
|
331
333
|
export * from './Enum/TimeCounterType';
|
|
332
334
|
export * from './Enum/MailAuto';
|
|
@@ -428,6 +430,7 @@ export * from './Enum/InternalService';
|
|
|
428
430
|
export * from './Enum/SocietyTypeEvent';
|
|
429
431
|
export * from './Enum/Call';
|
|
430
432
|
export * from './Enum/ConnectionError';
|
|
433
|
+
export * from './Enum/FolderFile';
|
|
431
434
|
|
|
432
435
|
// Interfaces API
|
|
433
436
|
export * from './Interface/api/partnerTransactionType/ReadPartnerTransactionType';
|