@silexpert/core 1.3.205-7 → 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 (85) hide show
  1. package/dist/cjs/api/resources/User.js.map +1 -1
  2. package/dist/cjs/api/resources.d.ts +0 -2
  3. package/dist/cjs/api/resources.d.ts.map +1 -1
  4. package/dist/cjs/api/resources.js +0 -2
  5. package/dist/cjs/api/resources.js.map +1 -1
  6. package/dist/cjs/types/Interface/api/team/UpdateTeamsForUser.d.ts +1 -1
  7. package/dist/cjs/types/Interface/api/team/UpdateTeamsForUser.d.ts.map +1 -1
  8. package/dist/cjs/types/Interface/api/team/UpdateTeamsForUser.js +4 -5
  9. package/dist/cjs/types/Interface/api/team/UpdateTeamsForUser.js.map +1 -1
  10. package/dist/cjs/types/Interface/api/user/UpdateCoworker.d.ts +0 -1
  11. package/dist/cjs/types/Interface/api/user/UpdateCoworker.d.ts.map +1 -1
  12. package/dist/cjs/types/Interface/api/user/UpdateCoworker.js +0 -6
  13. package/dist/cjs/types/Interface/api/user/UpdateCoworker.js.map +1 -1
  14. package/dist/cjs/types/index.d.ts +0 -4
  15. package/dist/cjs/types/index.d.ts.map +1 -1
  16. package/dist/cjs/types/index.js +0 -4
  17. package/dist/cjs/types/index.js.map +1 -1
  18. package/dist/mjs/api/resources/User.js.map +1 -1
  19. package/dist/mjs/api/resources.d.ts +0 -2
  20. package/dist/mjs/api/resources.d.ts.map +1 -1
  21. package/dist/mjs/api/resources.js +0 -2
  22. package/dist/mjs/api/resources.js.map +1 -1
  23. package/dist/mjs/types/Interface/api/team/UpdateTeamsForUser.d.ts +1 -1
  24. package/dist/mjs/types/Interface/api/team/UpdateTeamsForUser.d.ts.map +1 -1
  25. package/dist/mjs/types/Interface/api/team/UpdateTeamsForUser.js +6 -7
  26. package/dist/mjs/types/Interface/api/team/UpdateTeamsForUser.js.map +1 -1
  27. package/dist/mjs/types/Interface/api/user/UpdateCoworker.d.ts +0 -1
  28. package/dist/mjs/types/Interface/api/user/UpdateCoworker.d.ts.map +1 -1
  29. package/dist/mjs/types/Interface/api/user/UpdateCoworker.js +0 -7
  30. package/dist/mjs/types/Interface/api/user/UpdateCoworker.js.map +1 -1
  31. package/dist/mjs/types/index.d.ts +0 -4
  32. package/dist/mjs/types/index.d.ts.map +1 -1
  33. package/dist/mjs/types/index.js +0 -4
  34. package/dist/mjs/types/index.js.map +1 -1
  35. package/package.json +1 -1
  36. package/ts/api/resources/User.ts +2 -2
  37. package/ts/api/resources.ts +0 -2
  38. package/ts/types/Interface/api/team/UpdateTeamsForUser.ts +4 -5
  39. package/ts/types/Interface/api/user/UpdateCoworker.ts +0 -5
  40. package/ts/types/index.ts +0 -5
  41. package/dist/cjs/api/resources/UsersHistory.d.ts +0 -11
  42. package/dist/cjs/api/resources/UsersHistory.d.ts.map +0 -1
  43. package/dist/cjs/api/resources/UsersHistory.js +0 -26
  44. package/dist/cjs/api/resources/UsersHistory.js.map +0 -1
  45. package/dist/cjs/types/Enum/UsersHistory.d.ts +0 -17
  46. package/dist/cjs/types/Enum/UsersHistory.d.ts.map +0 -1
  47. package/dist/cjs/types/Enum/UsersHistory.js +0 -41
  48. package/dist/cjs/types/Enum/UsersHistory.js.map +0 -1
  49. package/dist/cjs/types/Interface/api/usersHistory/Create.d.ts +0 -9
  50. package/dist/cjs/types/Interface/api/usersHistory/Create.d.ts.map +0 -1
  51. package/dist/cjs/types/Interface/api/usersHistory/Create.js +0 -40
  52. package/dist/cjs/types/Interface/api/usersHistory/Create.js.map +0 -1
  53. package/dist/cjs/types/Interface/api/usersHistory/Update.d.ts +0 -8
  54. package/dist/cjs/types/Interface/api/usersHistory/Update.d.ts.map +0 -1
  55. package/dist/cjs/types/Interface/api/usersHistory/Update.js +0 -36
  56. package/dist/cjs/types/Interface/api/usersHistory/Update.js.map +0 -1
  57. package/dist/cjs/types/Interface/models/IUsersHistory.d.ts +0 -20
  58. package/dist/cjs/types/Interface/models/IUsersHistory.d.ts.map +0 -1
  59. package/dist/cjs/types/Interface/models/IUsersHistory.js +0 -3
  60. package/dist/cjs/types/Interface/models/IUsersHistory.js.map +0 -1
  61. package/dist/mjs/api/resources/UsersHistory.d.ts +0 -11
  62. package/dist/mjs/api/resources/UsersHistory.d.ts.map +0 -1
  63. package/dist/mjs/api/resources/UsersHistory.js +0 -28
  64. package/dist/mjs/api/resources/UsersHistory.js.map +0 -1
  65. package/dist/mjs/types/Enum/UsersHistory.d.ts +0 -17
  66. package/dist/mjs/types/Enum/UsersHistory.d.ts.map +0 -1
  67. package/dist/mjs/types/Enum/UsersHistory.js +0 -38
  68. package/dist/mjs/types/Enum/UsersHistory.js.map +0 -1
  69. package/dist/mjs/types/Interface/api/usersHistory/Create.d.ts +0 -9
  70. package/dist/mjs/types/Interface/api/usersHistory/Create.d.ts.map +0 -1
  71. package/dist/mjs/types/Interface/api/usersHistory/Create.js +0 -40
  72. package/dist/mjs/types/Interface/api/usersHistory/Create.js.map +0 -1
  73. package/dist/mjs/types/Interface/api/usersHistory/Update.d.ts +0 -8
  74. package/dist/mjs/types/Interface/api/usersHistory/Update.d.ts.map +0 -1
  75. package/dist/mjs/types/Interface/api/usersHistory/Update.js +0 -35
  76. package/dist/mjs/types/Interface/api/usersHistory/Update.js.map +0 -1
  77. package/dist/mjs/types/Interface/models/IUsersHistory.d.ts +0 -20
  78. package/dist/mjs/types/Interface/models/IUsersHistory.d.ts.map +0 -1
  79. package/dist/mjs/types/Interface/models/IUsersHistory.js +0 -2
  80. package/dist/mjs/types/Interface/models/IUsersHistory.js.map +0 -1
  81. package/ts/api/resources/UsersHistory.ts +0 -35
  82. package/ts/types/Enum/UsersHistory.ts +0 -42
  83. package/ts/types/Interface/api/usersHistory/Create.ts +0 -23
  84. package/ts/types/Interface/api/usersHistory/Update.ts +0 -21
  85. package/ts/types/Interface/models/IUsersHistory.ts +0 -23
@@ -1,20 +0,0 @@
1
- import { IUser } from './IUser';
2
- import { TypeUserHistory } from '../../Enum/UsersHistory';
3
- export interface IUsersHistory {
4
- id?: number;
5
- idUser: number;
6
- idAuthor: number;
7
- comment?: string | null;
8
- actionType: TypeUserHistory;
9
- metadata?: IMetadata | null;
10
- createdAt?: Date | null;
11
- updatedAt?: Date | null;
12
- user?: IUser;
13
- author?: IUser;
14
- }
15
- export interface IMetadata {
16
- leaveId: number[];
17
- joinId: number[];
18
- stayId: number[];
19
- }
20
- //# sourceMappingURL=IUsersHistory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IUsersHistory.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IUsersHistory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,WAAW,aAAa;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,eAAe,CAAC;IAC5B,QAAQ,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAIxB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB;AACD,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=IUsersHistory.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IUsersHistory.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IUsersHistory.ts"],"names":[],"mappings":"","sourcesContent":["import { IUser } from './IUser';\nimport { TypeUserHistory } from '../../Enum/UsersHistory';\n\nexport interface IUsersHistory {\n id?: number;\n idUser: number;\n idAuthor: number;\n comment?: string | null;\n actionType: TypeUserHistory;\n metadata?: IMetadata | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n\n\n // Relations\n user?: IUser;\n author?: IUser;\n}\nexport interface IMetadata {\n leaveId: number[];\n joinId: number[];\n stayId: number[];\n}\n"]}
@@ -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 { IMetadata, 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?: IMetadata;
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 { IMetadata, 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?: IMetadata;
21
- }
@@ -1,23 +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?: IMetadata | null;
11
- createdAt?: Date | null;
12
- updatedAt?: Date | null;
13
-
14
-
15
- // Relations
16
- user?: IUser;
17
- author?: IUser;
18
- }
19
- export interface IMetadata {
20
- leaveId: number[];
21
- joinId: number[];
22
- stayId: number[];
23
- }