@silexpert/core 1.2.55 → 1.2.57
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/api/resources/Payment.d.ts +2 -1
- package/dist/cjs/api/resources/Payment.d.ts.map +1 -1
- package/dist/cjs/api/resources/Payment.js +3 -0
- package/dist/cjs/api/resources/Payment.js.map +1 -1
- package/dist/cjs/types/Enum/Role.d.ts +2 -1
- package/dist/cjs/types/Enum/Role.d.ts.map +1 -1
- package/dist/cjs/types/Enum/Role.js +1 -0
- package/dist/cjs/types/Enum/Role.js.map +1 -1
- package/dist/cjs/types/Enum/RoleDetail.d.ts +12 -0
- package/dist/cjs/types/Enum/RoleDetail.d.ts.map +1 -1
- package/dist/cjs/types/Enum/RoleDetail.js +12 -0
- package/dist/cjs/types/Enum/RoleDetail.js.map +1 -1
- package/dist/cjs/types/Interface/api/kilometricAllowance/ReadKilometricAllowance.d.ts +4 -3
- package/dist/cjs/types/Interface/api/kilometricAllowance/ReadKilometricAllowance.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/kilometricAllowance/ReadKilometricAllowance.js.map +1 -1
- package/dist/cjs/types/Interface/api/payment/Query.d.ts +8 -0
- package/dist/cjs/types/Interface/api/payment/Query.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/payment/Query.js +26 -1
- package/dist/cjs/types/Interface/api/payment/Query.js.map +1 -1
- package/dist/cjs/types/Interface/api/regulation/Create.d.ts +1 -1
- package/dist/cjs/types/Interface/api/regulation/Create.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/regulation/Create.js +6 -8
- package/dist/cjs/types/Interface/api/regulation/Create.js.map +1 -1
- package/dist/cjs/types/Interface/api/task/QueryCountTask.d.ts +1 -1
- package/dist/cjs/types/Interface/api/task/QueryCountTask.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/task/QueryCountTask.js +2 -2
- package/dist/cjs/types/Interface/api/task/QueryCountTask.js.map +1 -1
- package/dist/cjs/utils/task.d.ts +11 -3
- package/dist/cjs/utils/task.d.ts.map +1 -1
- package/dist/cjs/utils/task.js +25 -3
- package/dist/cjs/utils/task.js.map +1 -1
- package/dist/mjs/api/resources/Payment.d.ts +2 -1
- package/dist/mjs/api/resources/Payment.d.ts.map +1 -1
- package/dist/mjs/api/resources/Payment.js +3 -0
- package/dist/mjs/api/resources/Payment.js.map +1 -1
- package/dist/mjs/types/Enum/Role.d.ts +2 -1
- package/dist/mjs/types/Enum/Role.d.ts.map +1 -1
- package/dist/mjs/types/Enum/Role.js +1 -0
- package/dist/mjs/types/Enum/Role.js.map +1 -1
- package/dist/mjs/types/Enum/RoleDetail.d.ts +12 -0
- package/dist/mjs/types/Enum/RoleDetail.d.ts.map +1 -1
- package/dist/mjs/types/Enum/RoleDetail.js +12 -0
- package/dist/mjs/types/Enum/RoleDetail.js.map +1 -1
- package/dist/mjs/types/Interface/api/kilometricAllowance/ReadKilometricAllowance.d.ts +4 -3
- package/dist/mjs/types/Interface/api/kilometricAllowance/ReadKilometricAllowance.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/kilometricAllowance/ReadKilometricAllowance.js.map +1 -1
- package/dist/mjs/types/Interface/api/payment/Query.d.ts +8 -0
- package/dist/mjs/types/Interface/api/payment/Query.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/payment/Query.js +31 -1
- package/dist/mjs/types/Interface/api/payment/Query.js.map +1 -1
- package/dist/mjs/types/Interface/api/regulation/Create.d.ts +1 -1
- package/dist/mjs/types/Interface/api/regulation/Create.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/regulation/Create.js +7 -9
- package/dist/mjs/types/Interface/api/regulation/Create.js.map +1 -1
- package/dist/mjs/types/Interface/api/task/QueryCountTask.d.ts +1 -1
- package/dist/mjs/types/Interface/api/task/QueryCountTask.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/task/QueryCountTask.js +2 -2
- package/dist/mjs/types/Interface/api/task/QueryCountTask.js.map +1 -1
- package/dist/mjs/utils/task.d.ts +11 -3
- package/dist/mjs/utils/task.d.ts.map +1 -1
- package/dist/mjs/utils/task.js +24 -2
- package/dist/mjs/utils/task.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Payment.ts +9 -1
- package/ts/types/Enum/Role.ts +1 -0
- package/ts/types/Enum/RoleDetail.ts +12 -0
- package/ts/types/Interface/api/kilometricAllowance/ReadKilometricAllowance.ts +4 -3
- package/ts/types/Interface/api/payment/Query.ts +25 -1
- package/ts/types/Interface/api/regulation/Create.ts +5 -7
- package/ts/types/Interface/api/task/QueryCountTask.ts +2 -2
- package/ts/utils/task.ts +27 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.57",
|
|
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",
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
QueryMonthlyPayment,
|
|
10
10
|
QueryPayment,
|
|
11
11
|
QueryPaymentCsv,
|
|
12
|
+
QueryPayments,
|
|
12
13
|
QueryPaymentInvoice,
|
|
13
14
|
QueryPaymentRecoveryPaginated,
|
|
14
15
|
QueryPaymentRecoveryStatistic,
|
|
@@ -135,8 +136,15 @@ export class Payment extends Resource {
|
|
|
135
136
|
): Promise<ReadPaymentRecoveryStatistic> {
|
|
136
137
|
return this.axios.$get('/payments-recovery/statistics', { params: query, signal });
|
|
137
138
|
}
|
|
138
|
-
|
|
139
|
+
|
|
139
140
|
askProcess(idPaymentRecovery: number, payload: AskProcessPaymentRecovery): Promise<IPaymentRecovery> {
|
|
140
141
|
return this.axios.$post(`/payments-recovery/${idPaymentRecovery}/contact`, payload);
|
|
141
142
|
}
|
|
143
|
+
|
|
144
|
+
getAll(
|
|
145
|
+
query: QueryPayments,
|
|
146
|
+
signal: AbortSignal,
|
|
147
|
+
): Promise<IPayment[]> {
|
|
148
|
+
return this.axios.$get('/payments', { params: query, signal });
|
|
149
|
+
}
|
|
142
150
|
}
|
package/ts/types/Enum/Role.ts
CHANGED
|
@@ -503,4 +503,16 @@ export const RoleDetail = {
|
|
|
503
503
|
cnVpn: 'COMPTABLE',
|
|
504
504
|
isGrade: false,
|
|
505
505
|
},
|
|
506
|
+
INTERNAL_ACCOUNTANT: {
|
|
507
|
+
id: Role.INTERNAL_ACCOUNTANT,
|
|
508
|
+
name: 'Comptable Interne',
|
|
509
|
+
colorPrimary: '#8765D0',
|
|
510
|
+
colorSecondary: '#DED7F6',
|
|
511
|
+
handledInUserSocietyPermissionTable: false,
|
|
512
|
+
isService: false,
|
|
513
|
+
subRole: false,
|
|
514
|
+
isInWebmail: false,
|
|
515
|
+
cnVpn: 'COMPTABLE',
|
|
516
|
+
isGrade: false,
|
|
517
|
+
},
|
|
506
518
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ISocietyPartner } from '../../..';
|
|
2
2
|
import { ISocietyVehicle } from '../../models/ISocietyVehicle';
|
|
3
3
|
|
|
4
|
-
export type
|
|
4
|
+
export type ReadKilometricAllowanceByYearInfoPerYear = {
|
|
5
|
+
vehicle?: ISocietyVehicle;
|
|
5
6
|
year: string;
|
|
6
7
|
amount: number;
|
|
7
8
|
kilometers: number;
|
|
@@ -11,12 +12,12 @@ export type ReadKilometricAllowanceByVehicle = {
|
|
|
11
12
|
vehicle: ISocietyVehicle;
|
|
12
13
|
amount: number;
|
|
13
14
|
kilometers: number;
|
|
14
|
-
informationsPerYear:
|
|
15
|
+
informationsPerYear: ReadKilometricAllowanceByYearInfoPerYear[];
|
|
15
16
|
};
|
|
16
17
|
|
|
17
18
|
export type ReadKilometricAllowanceByPartner = {
|
|
18
19
|
partner: ISocietyPartner;
|
|
19
20
|
amount: number;
|
|
20
21
|
kilometers: number;
|
|
21
|
-
informationsPerYear:
|
|
22
|
+
informationsPerYear: ReadKilometricAllowanceByYearInfoPerYear[];
|
|
22
23
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IsBoolean, IsDate, IsOptional } from 'class-validator';
|
|
1
|
+
import { IsBoolean, IsDate, IsIn, IsOptional, IsString } from 'class-validator';
|
|
2
2
|
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
3
3
|
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
4
4
|
|
|
@@ -12,6 +12,30 @@ export class QueryPayment {
|
|
|
12
12
|
endDate: Date;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
export class QueryPayments {
|
|
16
|
+
/**
|
|
17
|
+
* Reference used in paymentDirectDebitHistory
|
|
18
|
+
*/
|
|
19
|
+
@ApiProperty()
|
|
20
|
+
@IsString()
|
|
21
|
+
reference: string;
|
|
22
|
+
|
|
23
|
+
@ApiPropertyOptional()
|
|
24
|
+
@IsOptional()
|
|
25
|
+
@IsString({
|
|
26
|
+
each: true,
|
|
27
|
+
})
|
|
28
|
+
@IsIn(['directDebitHistory'], { each: true })
|
|
29
|
+
include?: string[];
|
|
30
|
+
|
|
31
|
+
@ApiPropertyOptional()
|
|
32
|
+
@IsOptional()
|
|
33
|
+
@IsString({
|
|
34
|
+
each: true,
|
|
35
|
+
})
|
|
36
|
+
attributes?: string[];
|
|
37
|
+
}
|
|
38
|
+
|
|
15
39
|
export class QuerySocietyUnpaid {
|
|
16
40
|
@ApiPropertyOptional()
|
|
17
41
|
@IsOptional()
|
|
@@ -20,13 +20,6 @@ export class CreateRegulation {
|
|
|
20
20
|
@IsDate()
|
|
21
21
|
date: Date;
|
|
22
22
|
|
|
23
|
-
@ApiPropertyOptional()
|
|
24
|
-
@IsOptional()
|
|
25
|
-
@IsInt({
|
|
26
|
-
each: true,
|
|
27
|
-
})
|
|
28
|
-
idPayments?: number[];
|
|
29
|
-
|
|
30
23
|
@ApiPropertyOptional()
|
|
31
24
|
@IsOptional()
|
|
32
25
|
@IsBoolean()
|
|
@@ -47,4 +40,9 @@ export class CreateRegulation {
|
|
|
47
40
|
@IsOptional()
|
|
48
41
|
@IsEnum(UnpaidReason)
|
|
49
42
|
reasonUnpaid?: UnpaidReason;
|
|
43
|
+
|
|
44
|
+
@ApiPropertyOptional()
|
|
45
|
+
@IsOptional()
|
|
46
|
+
@IsString()
|
|
47
|
+
paymentReference?: string;
|
|
50
48
|
}
|
package/ts/utils/task.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { Role } from '../types/Enum/Role';
|
|
2
2
|
import { TaskResponseType, RoleAvailableForTask } from '../types/Enum/TaskResponseType';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Use getListIdRolesUsedForTask instead
|
|
6
|
+
* @param listRoles
|
|
7
|
+
* @returns
|
|
8
|
+
* @deprecated
|
|
9
|
+
*/
|
|
10
|
+
const getIdRoleUsedForTask = (listRoles: Role[]): Role => {
|
|
5
11
|
let idRole = 0;
|
|
6
12
|
if (listRoles.includes(Role.COMMERCIAL)) {
|
|
7
13
|
idRole = Role.COMMERCIAL;
|
|
@@ -43,12 +49,29 @@ const getIdRoleUsedForTask = (listRoles: number[]): number => {
|
|
|
43
49
|
// return idRole;
|
|
44
50
|
// };
|
|
45
51
|
|
|
46
|
-
const getIdRoleUsedForAttribution = (isIntern: boolean, idTaskType: number):
|
|
52
|
+
const getIdRoleUsedForAttribution = (isIntern: boolean, idTaskType: number): Role[] => {
|
|
47
53
|
const taskTypeList = isIntern === true ? TaskResponseType.INTERN.types : TaskResponseType.EXTERN.types;
|
|
48
|
-
return taskTypeList.
|
|
54
|
+
return taskTypeList.filter((taskType) => taskType.id === idTaskType).map(r => r.role);
|
|
49
55
|
};
|
|
50
56
|
|
|
51
57
|
const getIdRoleUsedForGetTaskOfUser = (idRole: number): boolean =>
|
|
52
58
|
!!Object.values(RoleAvailableForTask).find((role) => role === idRole);
|
|
53
59
|
|
|
54
|
-
|
|
60
|
+
const getListIdRolesUsedForTask = (listRoles: Role[]): Role[] => {
|
|
61
|
+
const listIdRoles:Role[] = listRoles.filter(r => [
|
|
62
|
+
Role.COMMERCIAL,
|
|
63
|
+
Role.JURIDIC,
|
|
64
|
+
Role.SOCIAL,
|
|
65
|
+
Role.FACTURATION,
|
|
66
|
+
Role.CUSTOMER_SUCCESS,
|
|
67
|
+
Role.TECHNICAL_ADVISOR,
|
|
68
|
+
Role.ON_BOARDER,
|
|
69
|
+
Role.TERMINATION,
|
|
70
|
+
Role.LITIGE,
|
|
71
|
+
Role.FRONT_OFFICE,
|
|
72
|
+
Role.DATA_OFFICER,
|
|
73
|
+
].includes(r));
|
|
74
|
+
return listIdRoles;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export { getIdRoleUsedForTask, getIdRoleUsedForAttribution, getIdRoleUsedForGetTaskOfUser, getListIdRolesUsedForTask };
|