@silexpert/core 2.0.13 → 2.0.15
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/api/resources/Docoon.d.ts +1 -0
- package/dist/api/resources/Docoon.d.ts.map +1 -1
- package/dist/api/resources/Docoon.js +3 -0
- package/dist/api/resources/Docoon.js.map +1 -1
- package/dist/api/resources/User.d.ts +7 -1
- package/dist/api/resources/User.d.ts.map +1 -1
- package/dist/api/resources/User.js +19 -0
- package/dist/api/resources/User.js.map +1 -1
- package/dist/api/resources/UsersHistory.d.ts +11 -0
- package/dist/api/resources/UsersHistory.d.ts.map +1 -0
- package/dist/api/resources/UsersHistory.js +28 -0
- package/dist/api/resources/UsersHistory.js.map +1 -0
- package/dist/api/resources.d.ts +2 -0
- package/dist/api/resources.d.ts.map +1 -1
- package/dist/api/resources.js +2 -0
- package/dist/api/resources.js.map +1 -1
- package/dist/types/Enum/UsersHistory.d.ts +17 -0
- package/dist/types/Enum/UsersHistory.d.ts.map +1 -0
- package/dist/types/Enum/UsersHistory.js +38 -0
- package/dist/types/Enum/UsersHistory.js.map +1 -0
- package/dist/types/Interface/api/docoon/Query.d.ts +1 -2
- package/dist/types/Interface/api/docoon/Query.d.ts.map +1 -1
- package/dist/types/Interface/api/docoon/Query.js +0 -9
- package/dist/types/Interface/api/docoon/Query.js.map +1 -1
- package/dist/types/Interface/api/team/UpdateTeamsForUser.d.ts +1 -1
- package/dist/types/Interface/api/team/UpdateTeamsForUser.d.ts.map +1 -1
- package/dist/types/Interface/api/team/UpdateTeamsForUser.js +7 -6
- package/dist/types/Interface/api/team/UpdateTeamsForUser.js.map +1 -1
- package/dist/types/Interface/api/user/UpdateCoworker.d.ts +1 -0
- package/dist/types/Interface/api/user/UpdateCoworker.d.ts.map +1 -1
- package/dist/types/Interface/api/user/UpdateCoworker.js +7 -0
- package/dist/types/Interface/api/user/UpdateCoworker.js.map +1 -1
- package/dist/types/Interface/api/usersHistory/Create.d.ts +9 -0
- package/dist/types/Interface/api/usersHistory/Create.d.ts.map +1 -0
- package/dist/types/Interface/api/usersHistory/Create.js +40 -0
- package/dist/types/Interface/api/usersHistory/Create.js.map +1 -0
- package/dist/types/Interface/api/usersHistory/Update.d.ts +8 -0
- package/dist/types/Interface/api/usersHistory/Update.d.ts.map +1 -0
- package/dist/types/Interface/api/usersHistory/Update.js +35 -0
- package/dist/types/Interface/api/usersHistory/Update.js.map +1 -0
- package/dist/types/Interface/models/IEInvoicingEligibilityRequest.d.ts +10 -0
- package/dist/types/Interface/models/IEInvoicingEligibilityRequest.d.ts.map +1 -0
- package/dist/types/Interface/models/IEInvoicingEligibilityRequest.js +10 -0
- package/dist/types/Interface/models/IEInvoicingEligibilityRequest.js.map +1 -0
- package/dist/types/Interface/models/IUsersHistory.d.ts +20 -0
- package/dist/types/Interface/models/IUsersHistory.d.ts.map +1 -0
- package/dist/types/Interface/models/IUsersHistory.js +2 -0
- package/dist/types/Interface/models/IUsersHistory.js.map +1 -0
- package/dist/types/index.d.ts +5 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +5 -1
- package/dist/types/index.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Docoon.ts +4 -0
- package/ts/api/resources/User.ts +28 -1
- package/ts/api/resources/UsersHistory.ts +35 -0
- package/ts/api/resources.ts +2 -0
- package/ts/types/Enum/UsersHistory.ts +42 -0
- package/ts/types/Interface/api/docoon/Query.ts +1 -9
- package/ts/types/Interface/api/team/UpdateTeamsForUser.ts +6 -4
- package/ts/types/Interface/api/user/UpdateCoworker.ts +5 -0
- package/ts/types/Interface/api/usersHistory/Create.ts +25 -0
- package/ts/types/Interface/api/usersHistory/Update.ts +21 -0
- package/ts/types/Interface/models/IEInvoicingEligibilityRequest.ts +12 -0
- package/ts/types/Interface/models/IUsersHistory.ts +24 -0
- package/ts/types/index.ts +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.15",
|
|
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
|
"type": "module",
|
|
@@ -5,4 +5,8 @@ export class Docoon extends Resource {
|
|
|
5
5
|
getDirectoryLine(params: QueryDirectoryLine): Promise<ReadDirectoryLine> {
|
|
6
6
|
return this.axios.$get('/docoon/directory-line', { params });
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
getDirectoyLineForSociety(idSociety: number, params: QueryDirectoryLine): Promise<ReadDirectoryLine> {
|
|
10
|
+
return this.axios.$get(`/societies/${idSociety}/docoon/directory-line`, { params });
|
|
11
|
+
}
|
|
8
12
|
}
|
package/ts/api/resources/User.ts
CHANGED
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
CreateCollaboraterDetail,
|
|
27
27
|
IWorkingSchedule,
|
|
28
28
|
ICollaboraterDetail,
|
|
29
|
+
IUsersHistory,
|
|
29
30
|
} from '../../types/index.js';
|
|
30
31
|
|
|
31
32
|
export class User extends Resource {
|
|
@@ -189,7 +190,6 @@ export class User extends Resource {
|
|
|
189
190
|
registerProspect(body: RegisterProspectBody): Promise<RegisterProspectResponse> {
|
|
190
191
|
return this.axios.$post('users/prospect', body);
|
|
191
192
|
}
|
|
192
|
-
|
|
193
193
|
updateCoworkerWorkingSchedules(idUser: number, workingSchedules: IWorkingSchedule[]): Promise<IWorkingSchedule[]> {
|
|
194
194
|
return this.axios.$post(`users/coworker/${idUser}/working-schedules`, workingSchedules);
|
|
195
195
|
}
|
|
@@ -212,4 +212,31 @@ export class User extends Resource {
|
|
|
212
212
|
updateCollaboraterDetail(id: number, params: Partial<ICollaboraterDetail>): Promise<ICollaboraterDetail> {
|
|
213
213
|
return this.axios.$put(`collaboraters-details/${id}`, params);
|
|
214
214
|
}
|
|
215
|
+
|
|
216
|
+
//user history
|
|
217
|
+
|
|
218
|
+
createUserHistory(body: IUsersHistory): Promise<IUsersHistory> {
|
|
219
|
+
return this.axios.$post('usersHistory', body);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
getAllUserHistory(): Promise<IUsersHistory[]> {
|
|
223
|
+
return this.axios.$get('usersHistory');
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
getUserHistoryById(id: number): Promise<IUsersHistory> {
|
|
227
|
+
return this.axios.$get(`usersHistory/${id}`);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
getUserHistoryByUserID(id: number): Promise<IUsersHistory[]> {
|
|
231
|
+
return this.axios.$get(`usersHistory/user/${id}`);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
updateUserHistory(id: number, body: IUsersHistory): Promise<IUsersHistory> {
|
|
235
|
+
return this.axios.$put(`usersHistory/${id}`, body);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
deleteUserHistory(id: number): Promise<number> {
|
|
239
|
+
return this.axios.$delete(`usersHistory/${id}`);
|
|
240
|
+
}
|
|
241
|
+
|
|
215
242
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Resource } from '../Resource.js';
|
|
2
|
+
import { IUsersHistory, CreateUsersHistory, UpdateUsersHistory } from '../../types/index.js';
|
|
3
|
+
|
|
4
|
+
export class UsersHistory extends Resource {
|
|
5
|
+
createUserHistory(body: CreateUsersHistory): Promise<IUsersHistory> {
|
|
6
|
+
return this.axios.$post('usersHistory', body);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
getAllUserHistory(signal?: AbortSignal): Promise<IUsersHistory[]> {
|
|
10
|
+
return this.axios.$get('usersHistory', {
|
|
11
|
+
...signal && { signal }
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
getUserHistoryById(id: number, signal?: AbortSignal): Promise<IUsersHistory> {
|
|
16
|
+
return this.axios.$get(`usersHistory/${id}`, {
|
|
17
|
+
...signal && { signal }
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
getUserHistoryByUserID(idUser: number, signal?: AbortSignal): Promise<IUsersHistory[]> {
|
|
22
|
+
return this.axios.$get(`usersHistory/user/${idUser}`, {
|
|
23
|
+
...signal && { signal }
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
updateUserHistory(id: number, body: UpdateUsersHistory): Promise<IUsersHistory> {
|
|
28
|
+
return this.axios.$put(`usersHistory/${id}`, body);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
deleteUserHistory(id: number): Promise<boolean> {
|
|
32
|
+
return this.axios.$delete(`usersHistory/${id}`);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
}
|
package/ts/api/resources.ts
CHANGED
|
@@ -192,6 +192,7 @@ import { LoginApproval } from './resources/LoginApproval.js';
|
|
|
192
192
|
import { SocietyApproval } from './resources/SocietyApproval.js';
|
|
193
193
|
import { Docoon } from './resources/Docoon.js';
|
|
194
194
|
import { Acd } from './resources/Acd.js';
|
|
195
|
+
import { UsersHistory } from './resources/UsersHistory.js';
|
|
195
196
|
|
|
196
197
|
export const resources = {
|
|
197
198
|
budgetInsight: BudgetInsight,
|
|
@@ -387,5 +388,6 @@ export const resources = {
|
|
|
387
388
|
loginApproval: LoginApproval,
|
|
388
389
|
societyApproval: SocietyApproval,
|
|
389
390
|
docoon: Docoon,
|
|
391
|
+
usersHistory: UsersHistory,
|
|
390
392
|
acd: Acd,
|
|
391
393
|
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export enum TypeUserHistory {
|
|
2
|
+
// Cycle de vie Compte
|
|
3
|
+
CREATE = 1,
|
|
4
|
+
UPDATE = 2,
|
|
5
|
+
DELETE = 3,
|
|
6
|
+
RESTORE = 4,
|
|
7
|
+
|
|
8
|
+
// Validation & Modifications Spécifiques
|
|
9
|
+
INFO_UPDATE = 5, // Info ok
|
|
10
|
+
ROLE_UPDATE = 6, // Role ok
|
|
11
|
+
|
|
12
|
+
// Sécurité
|
|
13
|
+
PASSWORD_UPDATE = 7,
|
|
14
|
+
|
|
15
|
+
// Gestion Matériel
|
|
16
|
+
EQUIPMENT_ASSIGN = 8,
|
|
17
|
+
EQUIPMENT_BROKEN = 9,
|
|
18
|
+
EQUIPMENT_RETURN = 10,
|
|
19
|
+
EQUIPMENT_LOST = 11,
|
|
20
|
+
|
|
21
|
+
// Communication
|
|
22
|
+
MAIL_SENT_TO_TS = 12, // Mail envoyé à TS
|
|
23
|
+
|
|
24
|
+
//Equipe
|
|
25
|
+
TEAM_MOUVEMENT = 13,
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const TypeUserHistoryLabels: Record<TypeUserHistory, string> = {
|
|
29
|
+
[TypeUserHistory.CREATE]: 'Création',
|
|
30
|
+
[TypeUserHistory.UPDATE]: 'Mise à jour',
|
|
31
|
+
[TypeUserHistory.DELETE]: 'Suppression',
|
|
32
|
+
[TypeUserHistory.RESTORE]: 'Restauration',
|
|
33
|
+
[TypeUserHistory.INFO_UPDATE]: 'Mise à jour Info',
|
|
34
|
+
[TypeUserHistory.ROLE_UPDATE]: 'Mise à jour Rôle',
|
|
35
|
+
[TypeUserHistory.PASSWORD_UPDATE]: 'Changement Mot de passe',
|
|
36
|
+
[TypeUserHistory.EQUIPMENT_ASSIGN]: 'Assignation Matériel',
|
|
37
|
+
[TypeUserHistory.EQUIPMENT_BROKEN]: 'Matériel Cassé',
|
|
38
|
+
[TypeUserHistory.EQUIPMENT_RETURN]: 'Retour Matériel',
|
|
39
|
+
[TypeUserHistory.EQUIPMENT_LOST]: 'Matériel Perdu',
|
|
40
|
+
[TypeUserHistory.MAIL_SENT_TO_TS]: 'Mail envoyé à TS',
|
|
41
|
+
[TypeUserHistory.TEAM_MOUVEMENT]: 'Changement d\'équipe',
|
|
42
|
+
};
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import { IsString, IsOptional, IsInt } from 'class-validator';
|
|
2
2
|
import { ApiPropertyOptional } from '@nestjs/swagger';
|
|
3
|
-
|
|
4
3
|
export class QueryDirectoryLine {
|
|
5
|
-
@ApiPropertyOptional()
|
|
6
4
|
@IsString()
|
|
7
|
-
|
|
8
|
-
siretOrSiren?: string;
|
|
9
|
-
|
|
10
|
-
@ApiPropertyOptional()
|
|
11
|
-
@IsInt()
|
|
12
|
-
@IsOptional()
|
|
13
|
-
idSociety?: number;
|
|
5
|
+
siretOrSiren: string;
|
|
14
6
|
|
|
15
7
|
@ApiPropertyOptional()
|
|
16
8
|
@IsInt()
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IsArray, IsBoolean, IsInt,
|
|
1
|
+
import { IsArray, IsBoolean, IsInt, IsOptional } from 'class-validator';
|
|
2
2
|
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
3
3
|
import { ToBoolean } from '../../../../utils/transforms/boolean.transform.js';
|
|
4
4
|
|
|
@@ -14,8 +14,10 @@ export class UpdateTeamsForUser {
|
|
|
14
14
|
@ToBoolean()
|
|
15
15
|
replace?: boolean;
|
|
16
16
|
|
|
17
|
-
@ApiPropertyOptional()
|
|
17
|
+
@ApiPropertyOptional({ type: [Number] })
|
|
18
18
|
@IsOptional()
|
|
19
|
-
@
|
|
20
|
-
|
|
19
|
+
@IsArray()
|
|
20
|
+
@IsInt({ each: true })
|
|
21
|
+
oldTeamIds?: number[];
|
|
22
|
+
|
|
21
23
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IsEnum, IsInt, IsOptional, IsString } from 'class-validator';
|
|
2
|
+
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
3
|
+
import { TypeUserHistory } from '../../../Enum/UsersHistory.js';
|
|
4
|
+
import { IUsersHistory, IMetadata } from '../../models/IUsersHistory.js';
|
|
5
|
+
|
|
6
|
+
export class CreateUsersHistory implements Omit<IUsersHistory, 'id' | 'createdAt' | 'updatedAt' | 'idAuthor'> {
|
|
7
|
+
@ApiProperty()
|
|
8
|
+
@IsInt()
|
|
9
|
+
idUser: number;
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@ApiPropertyOptional()
|
|
14
|
+
@IsOptional()
|
|
15
|
+
@IsString()
|
|
16
|
+
comment?: string;
|
|
17
|
+
|
|
18
|
+
@ApiProperty()
|
|
19
|
+
@IsEnum(TypeUserHistory)
|
|
20
|
+
actionType: TypeUserHistory;
|
|
21
|
+
|
|
22
|
+
@ApiPropertyOptional({ type: 'object', additionalProperties: true })
|
|
23
|
+
@IsOptional()
|
|
24
|
+
metadata?: IMetadata;
|
|
25
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IsEnum, IsOptional, IsString } from 'class-validator';
|
|
2
|
+
import { ApiPropertyOptional } from '@nestjs/swagger';
|
|
3
|
+
import { TypeUserHistory } from '../../../Enum/UsersHistory.js';
|
|
4
|
+
import { IUsersHistory, IMetadata } from '../../models/IUsersHistory.js';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export class UpdateUsersHistory implements Partial<Omit<IUsersHistory, 'id' | 'idUser' | 'idAuthor'>> {
|
|
8
|
+
@ApiPropertyOptional()
|
|
9
|
+
@IsOptional()
|
|
10
|
+
@IsString()
|
|
11
|
+
comment?: string;
|
|
12
|
+
|
|
13
|
+
@ApiPropertyOptional()
|
|
14
|
+
@IsOptional()
|
|
15
|
+
@IsEnum(TypeUserHistory)
|
|
16
|
+
actionType?: TypeUserHistory;
|
|
17
|
+
|
|
18
|
+
@ApiPropertyOptional({ type: 'object', additionalProperties: true })
|
|
19
|
+
@IsOptional()
|
|
20
|
+
metadata?: IMetadata;
|
|
21
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IUser } from './IUser.js';
|
|
2
|
+
import { TypeUserHistory } from '../../Enum/UsersHistory.js';
|
|
3
|
+
|
|
4
|
+
export interface IUsersHistory {
|
|
5
|
+
id?: number;
|
|
6
|
+
idUser: number;
|
|
7
|
+
idAuthor?: number | null;
|
|
8
|
+
comment?: string | null;
|
|
9
|
+
actionType: TypeUserHistory;
|
|
10
|
+
createdAt?: Date | null;
|
|
11
|
+
updatedAt?: Date | null;
|
|
12
|
+
metadata?: IMetadata;
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
// Relations
|
|
16
|
+
user?: IUser;
|
|
17
|
+
author?: IUser;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface IMetadata {
|
|
21
|
+
leaveId?: number[];
|
|
22
|
+
joinId?: number[];
|
|
23
|
+
stayId?: number[];
|
|
24
|
+
}
|
package/ts/types/index.ts
CHANGED
|
@@ -338,6 +338,8 @@ export * from './Interface/models/IDocumentRequest.js';
|
|
|
338
338
|
export * from './Interface/models/IInformationRequest.js';
|
|
339
339
|
export * from './Interface/models/IRevenueMovement.js';
|
|
340
340
|
export * from './Interface/models/IRevenueSnapshot.js';
|
|
341
|
+
export * from './Interface/models/IEInvoicingEligibilityRequest.js';
|
|
342
|
+
export * from './Interface/models/IUsersHistory.js';
|
|
341
343
|
|
|
342
344
|
// Schemas
|
|
343
345
|
export * from './Interface/schemas/IRegistrationDetail.js';
|
|
@@ -512,7 +514,6 @@ export * from './Enum/Annotation.js';
|
|
|
512
514
|
export * from './Enum/ProcessingState.js';
|
|
513
515
|
export * from './Enum/InpiType.js';
|
|
514
516
|
export * from './Enum/DepositDocumentType.js';
|
|
515
|
-
export * from './Enum/Exercice.js';
|
|
516
517
|
export * from './Enum/StatusSignature.js';
|
|
517
518
|
export * from './Enum/BankCollectingState.js';
|
|
518
519
|
export * from './Enum/Phone.js';
|
|
@@ -580,6 +581,7 @@ export * from './Enum/InformationRequestType.js';
|
|
|
580
581
|
export * from './Enum/InformationRequestState.js';
|
|
581
582
|
export * from './Enum/Revenue.js';
|
|
582
583
|
export * from './Enum/EbookIntention.js';
|
|
584
|
+
export * from './Enum/UsersHistory.js';
|
|
583
585
|
|
|
584
586
|
// Interfaces API
|
|
585
587
|
export * from './Interface/api/acd/Create.js';
|
|
@@ -808,6 +810,8 @@ export * from './Interface/api/constitutionHistory/QueryPaginatedConstitutionHis
|
|
|
808
810
|
export * from './Interface/api/userSpecialDay/BodyUserSpecialDay.js';
|
|
809
811
|
export * from './Interface/api/userSpecialDay/QueryUserSpecialDay.js';
|
|
810
812
|
export * from './Interface/api/oldExportInfo/OldExpertInfos.js';
|
|
813
|
+
export * from './Interface/api/usersHistory/Create.js';
|
|
814
|
+
export * from './Interface/api/usersHistory/Update.js';
|
|
811
815
|
|
|
812
816
|
// export * from './Interface/api/survey/QuerySurvey.js';
|
|
813
817
|
export * from './Interface/api/survey/ReadSurvey.js';
|