@silexpert/core 1.3.205-6 → 1.3.205

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 (64) hide show
  1. package/dist/cjs/api/resources.d.ts +0 -2
  2. package/dist/cjs/api/resources.d.ts.map +1 -1
  3. package/dist/cjs/api/resources.js +0 -2
  4. package/dist/cjs/api/resources.js.map +1 -1
  5. package/dist/cjs/types/index.d.ts +0 -4
  6. package/dist/cjs/types/index.d.ts.map +1 -1
  7. package/dist/cjs/types/index.js +0 -4
  8. package/dist/cjs/types/index.js.map +1 -1
  9. package/dist/mjs/api/resources.d.ts +0 -2
  10. package/dist/mjs/api/resources.d.ts.map +1 -1
  11. package/dist/mjs/api/resources.js +0 -2
  12. package/dist/mjs/api/resources.js.map +1 -1
  13. package/dist/mjs/types/index.d.ts +0 -4
  14. package/dist/mjs/types/index.d.ts.map +1 -1
  15. package/dist/mjs/types/index.js +0 -4
  16. package/dist/mjs/types/index.js.map +1 -1
  17. package/package.json +1 -1
  18. package/ts/api/resources.ts +0 -2
  19. package/ts/types/index.ts +0 -5
  20. package/dist/cjs/api/resources/UsersHistory.d.ts +0 -11
  21. package/dist/cjs/api/resources/UsersHistory.d.ts.map +0 -1
  22. package/dist/cjs/api/resources/UsersHistory.js +0 -26
  23. package/dist/cjs/api/resources/UsersHistory.js.map +0 -1
  24. package/dist/cjs/types/Enum/UsersHistory.d.ts +0 -17
  25. package/dist/cjs/types/Enum/UsersHistory.d.ts.map +0 -1
  26. package/dist/cjs/types/Enum/UsersHistory.js +0 -41
  27. package/dist/cjs/types/Enum/UsersHistory.js.map +0 -1
  28. package/dist/cjs/types/Interface/api/usersHistory/Create.d.ts +0 -9
  29. package/dist/cjs/types/Interface/api/usersHistory/Create.d.ts.map +0 -1
  30. package/dist/cjs/types/Interface/api/usersHistory/Create.js +0 -40
  31. package/dist/cjs/types/Interface/api/usersHistory/Create.js.map +0 -1
  32. package/dist/cjs/types/Interface/api/usersHistory/Update.d.ts +0 -8
  33. package/dist/cjs/types/Interface/api/usersHistory/Update.d.ts.map +0 -1
  34. package/dist/cjs/types/Interface/api/usersHistory/Update.js +0 -36
  35. package/dist/cjs/types/Interface/api/usersHistory/Update.js.map +0 -1
  36. package/dist/cjs/types/Interface/models/IUsersHistory.d.ts +0 -15
  37. package/dist/cjs/types/Interface/models/IUsersHistory.d.ts.map +0 -1
  38. package/dist/cjs/types/Interface/models/IUsersHistory.js +0 -3
  39. package/dist/cjs/types/Interface/models/IUsersHistory.js.map +0 -1
  40. package/dist/mjs/api/resources/UsersHistory.d.ts +0 -11
  41. package/dist/mjs/api/resources/UsersHistory.d.ts.map +0 -1
  42. package/dist/mjs/api/resources/UsersHistory.js +0 -28
  43. package/dist/mjs/api/resources/UsersHistory.js.map +0 -1
  44. package/dist/mjs/types/Enum/UsersHistory.d.ts +0 -17
  45. package/dist/mjs/types/Enum/UsersHistory.d.ts.map +0 -1
  46. package/dist/mjs/types/Enum/UsersHistory.js +0 -38
  47. package/dist/mjs/types/Enum/UsersHistory.js.map +0 -1
  48. package/dist/mjs/types/Interface/api/usersHistory/Create.d.ts +0 -9
  49. package/dist/mjs/types/Interface/api/usersHistory/Create.d.ts.map +0 -1
  50. package/dist/mjs/types/Interface/api/usersHistory/Create.js +0 -40
  51. package/dist/mjs/types/Interface/api/usersHistory/Create.js.map +0 -1
  52. package/dist/mjs/types/Interface/api/usersHistory/Update.d.ts +0 -8
  53. package/dist/mjs/types/Interface/api/usersHistory/Update.d.ts.map +0 -1
  54. package/dist/mjs/types/Interface/api/usersHistory/Update.js +0 -35
  55. package/dist/mjs/types/Interface/api/usersHistory/Update.js.map +0 -1
  56. package/dist/mjs/types/Interface/models/IUsersHistory.d.ts +0 -15
  57. package/dist/mjs/types/Interface/models/IUsersHistory.d.ts.map +0 -1
  58. package/dist/mjs/types/Interface/models/IUsersHistory.js +0 -2
  59. package/dist/mjs/types/Interface/models/IUsersHistory.js.map +0 -1
  60. package/ts/api/resources/UsersHistory.ts +0 -35
  61. package/ts/types/Enum/UsersHistory.ts +0 -42
  62. package/ts/types/Interface/api/usersHistory/Create.ts +0 -23
  63. package/ts/types/Interface/api/usersHistory/Update.ts +0 -21
  64. package/ts/types/Interface/models/IUsersHistory.ts +0 -18
@@ -1,35 +0,0 @@
1
- import { Resource } from '../Resource';
2
- import { IUsersHistory, CreateUsersHistory, UpdateUsersHistory } from '../../types';
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
- }
@@ -1,42 +0,0 @@
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,23 +0,0 @@
1
- import { IsEnum, IsInt, IsOptional, IsString } from 'class-validator';
2
- import { ApiProperty, ApiPropertyOptional } from '../../../../utils/decorators';
3
- import { TypeUserHistory } from '../../../Enum/UsersHistory';
4
- import { IUsersHistory } from '../../models/IUsersHistory';
5
-
6
- export class CreateUsersHistory implements Omit<IUsersHistory, 'id' | 'createdAt' | 'updatedAt' | 'idAuthor'> {
7
- @ApiProperty()
8
- @IsInt()
9
- idUser: number;
10
-
11
- @ApiPropertyOptional()
12
- @IsOptional()
13
- @IsString()
14
- comment?: string;
15
-
16
- @ApiProperty()
17
- @IsEnum(TypeUserHistory)
18
- actionType: TypeUserHistory;
19
-
20
- @ApiPropertyOptional({ type: 'object' })
21
- @IsOptional()
22
- metadata?: Record<string, unknown>;
23
- }
@@ -1,21 +0,0 @@
1
- import { IsEnum, IsOptional, IsString } from 'class-validator';
2
- import { ApiPropertyOptional } from '../../../../utils/decorators';
3
- import { TypeUserHistory } from '../../../Enum/UsersHistory';
4
- import { IUsersHistory } from '../../models/IUsersHistory';
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' })
19
- @IsOptional()
20
- metadata?: Record<string, unknown>;
21
- }
@@ -1,18 +0,0 @@
1
- import { IUser } from './IUser';
2
- import { TypeUserHistory } from '../../Enum/UsersHistory';
3
-
4
- export interface IUsersHistory {
5
- id?: number;
6
- idUser: number;
7
- idAuthor: number;
8
- comment?: string | null;
9
- actionType: TypeUserHistory;
10
- metadata?: Record<string, unknown> | null;
11
- createdAt?: Date | null;
12
- updatedAt?: Date | null;
13
-
14
-
15
- // Relations
16
- user?: IUser;
17
- author?: IUser;
18
- }